Skip to content

Commit

Permalink
Send analytics event through the GOV.UK Analytics API.
Browse files Browse the repository at this point in the history
https://www.pivotaltracker.com/n/projects/1261204/stories/88175032

This change wraps the GA event in the [newly introduced](alphagov/static#549)
analytics API. This will aid in the migration from GA Classic to Universal Analytics, while
remaining functionally equivalent during the migration.
  • Loading branch information
benilovj committed Mar 2, 2015
1 parent 5bab3c1 commit 7c313f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/javascripts/application/filter-list-items.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
filter._trackTimeout = root.setTimeout(function(){
var pagePath = window.location.pathname.split('/').pop();
if(pagePath){
window._gaq && _gaq.push(['_trackEvent', 'searchBoxFilter', search, pagePath, 0, true]);
GOVUK.analytics.trackEvent('searchBoxFilter', search, {label: pagePath, nonInteraction: true});
}
}, 1000);
},
Expand Down

0 comments on commit 7c313f4

Please sign in to comment.