Skip to content

Commit

Permalink
Merge pull request #2152 from alphagov/remove-govuk-tracker
Browse files Browse the repository at this point in the history
Remove GOVUKTracker
  • Loading branch information
kevindew authored Apr 30, 2020
2 parents bcac7e8 + dbe7e82 commit fd68a4b
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 326 deletions.
1 change: 0 additions & 1 deletion app/assets/javascripts/analytics.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//= require govuk_publishing_components/lib/cookie-functions
//= require analytics/pii
//= require analytics_toolkit/google-analytics-universal-tracker
//= require analytics_toolkit/govuk-tracker
//= require analytics_toolkit/analytics
//= require analytics_toolkit/print-intent
//= require analytics_toolkit/error-tracking
Expand Down
4 changes: 1 addition & 3 deletions app/assets/javascripts/analytics/init.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ var analyticsInit = function() {
var analytics = new GOVUK.StaticAnalytics({
universalId: universalId,
cookieDomain: cookieDomain,
allowLinker: true,
// This is served by Fastly in production, and returns an empty 200 response
govukTrackerUrl: '<%= asset_path "/static/a" %>'
allowLinker: true
});

// Make interface public for virtual pageviews and events
Expand Down
6 changes: 0 additions & 6 deletions app/assets/javascripts/analytics_toolkit/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
delete config.universalId
this.trackers.push(new GOVUK.GoogleAnalyticsUniversalTracker(universalId, config))
}
if (typeof config.govukTrackerUrl !== 'undefined') {
var govukTrackerUrl = config.govukTrackerUrl
delete config.govukTrackerUrl
this.trackers.push(new GOVUK.GOVUKTracker(govukTrackerUrl))
}
}

var PIISafe = function (value) {
Expand All @@ -38,7 +33,6 @@

Analytics.load = function () {
GOVUK.GoogleAnalyticsUniversalTracker.load()
GOVUK.GOVUKTracker.load()
}

Analytics.prototype.defaultPathForTrackPageview = function (location) {
Expand Down
134 changes: 0 additions & 134 deletions app/assets/javascripts/analytics_toolkit/govuk-tracker.js

This file was deleted.

182 changes: 0 additions & 182 deletions spec/javascripts/analytics_toolkit/govuk-tracker.spec.js

This file was deleted.

0 comments on commit fd68a4b

Please sign in to comment.