Skip to content

Commit

Permalink
Bring in new version of analytics
Browse files Browse the repository at this point in the history
Only uses Universal now.

Classic was included in the new API initially to
support older implementations but was removed in
alphagov/govuk_frontend_toolkit#194.
  • Loading branch information
tombye committed Jul 31, 2015
1 parent 1d8aa49 commit 4e18ced
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/_analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
GOVUK.Tracker.load();
var cookieDomain = (document.domain === 'www.beta.digitalmarketplace.service.gov.uk') ? '.digitalmarketplace.service.gov.uk' : document.domain;
var property = (document.domain === 'www.digitalmarketplace.service.gov.uk') ? 'UA-49258698-1' : 'UA-49258698-3';
GOVUK.analytics = new GOVUK.Tracker({
GOVUK.analytics = new GOVUK.Analytics({
universalId: property,
cookieDomain: cookieDomain
});
Expand Down
3 changes: 1 addition & 2 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//= include ../../../node_modules/govuk_frontend_toolkit/javascripts/vendor/polyfills/bind.js
//= include ../../../node_modules/govuk_frontend_toolkit/javascripts/govuk/analytics/tracker.js
//= include ../../../node_modules/govuk_frontend_toolkit/javascripts/govuk/analytics/analytics.js
//= include ../../../node_modules/govuk_frontend_toolkit/javascripts/govuk/analytics/google-analytics-universal-tracker.js
//= include ../../../node_modules/govuk_frontend_toolkit/javascripts/govuk/analytics/google-analytics-classic-tracker.js
//= include ../../../bower_components/jquery/dist/jquery.js
//= include ../../../bower_components/digitalmarketplace-frontend-toolkit/toolkit/javascripts/option-select.js
//= include _analytics.js'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"gulp-shell" : "0.2.9",
"gulp-filelog" : "0.4.1",
"gulp-include": "1.1.1",
"govuk_frontend_toolkit" : "3.5.1"
"govuk_frontend_toolkit" : "4.1.1"
},
"scripts": {
"frontend-install": "./node_modules/bower/bin/bower install",
Expand Down

0 comments on commit 4e18ced

Please sign in to comment.