mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-02 23:47:42 -04:00
Make analytics send the same title for all pages
Sets it on the tracker which means this value gets sent for each: - pageview - event See: https://developers.google.com/analytics/devguides/collection/analyticsjs/pages We can only test that this has been set on the tracker, not how that effects what is sent to GA, in the JS tests. This change has been tested in-browser with the Chrome Analytics Debugger. This revealed the contents of what is in the beacon sent to GA and allowed confirmation the title was being set correctly. See: https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna/related
This commit is contained in:
@@ -231,8 +231,8 @@ describe("Cookie settings", () => {
|
||||
expect(window.GOVUK.initAnalytics).toHaveBeenCalled();
|
||||
|
||||
expect(window.ga).toHaveBeenCalled();
|
||||
// the first 4 calls are configuration
|
||||
expect(window.ga.mock.calls[4]).toEqual(['send', 'pageview', '/privacy']);
|
||||
// the first 5 calls are configuration
|
||||
expect(window.ga.mock.calls[5]).toEqual(['send', 'pageview', '/privacy']);
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user