Commit Graph

14 Commits

Author SHA1 Message Date
stvnrlly
b6bc02eb6b us → u.s. 2022-12-06 11:03:47 -05:00
Ryan Ahearn
bb2d57b27b Update tests to use most recent jest and supporting libraries 2022-10-27 11:12:39 -04:00
James Moffet
e53d12733a branding 2022-07-20 15:23:54 -07:00
Tom Byers
8a98c73b08 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
2020-02-20 11:46:19 +00:00
Tom Byers
0885dde2c1 Update Google Analytics tracker config
Removes the following fields from the tracker
config:
- `name`, which was erroring due to it
  including a `.`
- `displayFeaturesTask` which seems to be
  deprecated

Also refactors the `create` command to put all
fields into the options parameter, as shown in the
developer docs:

https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers
2020-01-22 12:10:01 +00:00
Tom Byers
5de29f2389 Fix Google Analytics tracking code 2020-01-20 10:05:15 +00:00
Tom Byers
a67cd65f47 Make Google Analytics cookies expire in 1 year 2020-01-20 10:05:06 +00:00
Tom Byers
1a97c6028c Add event tracking to window.GOVUK.analytics
app/assets/javascripts/errorTracking.js sent
events to `window.ga`.

This extends the API of `window.GOVUK.Analytics`
to include support for sending events so all
calls to `window.ga` can use it instead of direct
access.

This use of `window.ga` was missed from the
initial work on `window.GOVUK.Anaytics`.
2020-01-20 10:04:56 +00:00
Tom Byers
a8d6df9b04 Wrap analytics code in GOVUK interface
Wraps our analytics code in a stripped down
version of GOVUK.Analytics to allow us to plug in
the GOVUK code for consent.
2020-01-20 10:03:18 +00:00
Leo Hemsted
66db735e09 Revert "Merge pull request #3238 from alphagov/cookies-update"
This reverts commit eec4bec761, reversing
changes made to 64480e2fff.
2020-01-15 14:40:48 +00:00
Tom Byers
749e199e63 Fix Google Analytics tracking code 2020-01-15 11:56:38 +00:00
Tom Byers
dce6a46df6 Make Google Analytics cookies expire in 1 year 2020-01-14 14:16:00 +00:00
Tom Byers
b6e37a6ac8 Add event tracking to window.GOVUK.analytics
app/assets/javascripts/errorTracking.js sent
events to `window.ga`.

This extends the API of `window.GOVUK.Analytics`
to include support for sending events so all
calls to `window.ga` can use it instead of direct
access.

This use of `window.ga` was missed from the
initial work on `window.GOVUK.Anaytics`.
2020-01-14 11:28:06 +00:00
Tom Byers
0954435afb Wrap analytics code in GOVUK interface
Wraps our analytics code in a stripped down
version of GOVUK.Analytics to allow us to plug in
the GOVUK code for consent.
2020-01-03 17:28:33 +00:00