Skip to content

Commit

Permalink
Merge pull request #1896 from alphagov/disable-adfeatures
Browse files Browse the repository at this point in the history
Set allowAdFeatures on linker tracker to false
  • Loading branch information
andysellick authored Oct 7, 2019
2 parents ba5c012 + 39e2314 commit dfb089f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@

sendToGa(name + '.set', 'anonymizeIp', true)
sendToGa(name + '.set', 'displayFeaturesTask', null)
sendToGa(name + '.set', 'allowAdFeatures', false)
sendToGa(name + '.set', 'title', pii.stripPII(document.title))
sendToGa(name + '.set', 'location', pii.stripPII(window.location.href))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ describe('GOVUK.GoogleAnalyticsUniversalTracker', function () {
it('requires and configures the linker plugin', function () {
expect(window.ga.calls.argsFor(callIndex + 1)).toEqual(['testTracker.require', 'linker'])
})
it('disables Ad features', function () {
expect(window.ga.calls.allArgs()).toContain(['set', 'allowAdFeatures', false])
})
it('configures the domain', function () {
expect(window.ga.calls.argsFor(callIndex + 2)).toEqual(['testTracker.linker:autoLink', ['some.service.gov.uk']])
})
Expand Down

0 comments on commit dfb089f

Please sign in to comment.