Skip to content

Commit

Permalink
Merge pull request #800 from alphagov/additional-webchat-analytics
Browse files Browse the repository at this point in the history
Track when HMRC webchat is offered to users in analytics
  • Loading branch information
daibach committed May 26, 2016
2 parents 4294f71 + 97681c9 commit 2acd6a4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/assets/javascripts/webchat.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
if (message.evt === 'opened') {
webchat.$banner.addClass('open');
webchat.$banner.attr('aria-hidden', false);
GOVUK.analytics.trackEvent('webchat', 'offered');
} else if (message.evt === 'closed') {
webchat.$banner.removeClass('open');
webchat.$banner.attr('aria-hidden', true);
Expand Down

0 comments on commit 2acd6a4

Please sign in to comment.