Skip to content

Commit

Permalink
Merge pull request #1830 from alphagov/revert-1829-linker-experiment
Browse files Browse the repository at this point in the history
[DO NOT MERGE] [YET] Revert "Change linker code calling approach"
  • Loading branch information
andysellick authored Aug 30, 2019
2 parents 52172a1 + f6ada5b commit 85f9e43
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/analytics/init.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

// Make interface public for virtual pageviews and events
GOVUK.analytics = analytics;
GOVUK.analytics.addLinkedTrackerDomain(secondaryId, 'govuk', 'design-system.service.gov.uk, passport.service.gov.uk, apply-for-eu-settled-status.homeoffice.gov.uk');
GOVUK.analytics.addLinkedTrackerDomain(secondaryId, 'govuk', 'design-system.service.gov.uk');
} else {
GOVUK.analytics = dummyAnalytics
}
Expand Down
14 changes: 0 additions & 14 deletions spec/javascripts/analytics_toolkit/analytics.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,19 +399,5 @@ describe('GOVUK.Analytics', function () {
expect(allArgs).toContain(['test.set', 'displayFeaturesTask', null])
expect(allArgs).toContain(['test.send', 'pageview'])
})

it('adds multiple linked domains to universal analytics', function () {
analytics.addLinkedTrackerDomain('1234', 'test', 'www.example.com, www.something.com')

var allArgs = window.ga.calls.allArgs()
expect(allArgs).toContain(['create', '1234', 'auto', {'name': 'test'}])
expect(allArgs).toContain(['require', 'linker'])
expect(allArgs).toContain(['test.require', 'linker'])
expect(allArgs).toContain(['linker:autoLink', ['www.example.com, www.something.com']])
expect(allArgs).toContain(['test.linker:autoLink', ['www.example.com, www.something.com']])
expect(allArgs).toContain(['test.set', 'anonymizeIp', true])
expect(allArgs).toContain(['test.set', 'displayFeaturesTask', null])
expect(allArgs).toContain(['test.send', 'pageview'])
})
})
})

0 comments on commit 85f9e43

Please sign in to comment.