Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Google Analytics classic #194

Merged
merged 6 commits into from
May 26, 2015
Merged

Remove Google Analytics classic #194

merged 6 commits into from
May 26, 2015

Conversation

fofr
Copy link
Contributor

@fofr fofr commented May 21, 2015

On 2 June we plan to deprecate Google Analytics classic on GOV.UK, from then on we will only use Universal analytics. Google Analytics classic data collection techniques are being deprecated by Google. We should no longer support classic and new tracking should use only Universal.

  • Remove classic tracker and tests
  • Remove classic specific method arguments (eg custom variable slot and name)
  • No longer load the old ga.js library
  • Keep an Analytics object as a wrapper for all analytics trackers.

GOVUK.Analytics was formerly a namespace used by slimmer. This has been removed and all apps using slimmer updated. Usage goes from:
GOVUK.analytics = new GOVUK.Tracker(…) to GOVUK.analytics = new GOVUK.Analytics(…)

Because the Tracker and TrackerSpec files have been renamed, when reviewing I suggest looking at the individual commits.

An example of how apps will update after this change:
https://github.com/alphagov/government-service-design-manual/compare/remove-classic-analytics

cc @edds @tombye @alicebartlett @benilovj

fofr added 6 commits May 14, 2015 11:07
Google Analytics classic data collection techniques are being
deprecated by Google. We no longer need to support classic and any new
tracking should use only Universal.
Simplify tracker object by moving for loops into a single method which
gets passed the function to call on each tracker and the arguments to
give it.

Add some protection against methods not existing on the trackers.
GOVUK.Analytics was formerly a namespace used by slimmer. This has been
removed and all apps using slimmer updated.

Usage goes from
`GOVUK.analytics = new GOVUK.Tracker(…)`
to
`GOVUK.analytics = new GOVUK.Analytics(…)`

The analytics object becomes the container for trackers.
* Remove references to classic, classic’s custom variables and classic
specific implementation.
* Refer to the new Analytics object rather than Tracker
* Update the init example.
Remove duplication of `beforeEach`
@edds
Copy link
Contributor

edds commented May 21, 2015

What is the rational behind moving from Tracker to Analytics? I thought the benefit of doing the original work was when we wanted to remove classic we could just remove the calls from the Tracker object and consuming applications wouldn't have to change.

@fofr
Copy link
Contributor Author

fofr commented May 21, 2015

Tracker has been renamed because the object is a collective representation of all analytics. When originally written the slimmer GOVUK.Analytics namespace prevented this, although this was always the intention.

In any case, most consuming applications will need to remove their references to google-analytics-classic-tracker.js. It also makes sense to remove classic specific parameters at this point, eg name and scope values passed to setDimension.

@fofr
Copy link
Contributor Author

fofr commented May 26, 2015

Is this good to merge?

@edds
Copy link
Contributor

edds commented May 26, 2015

Sorry, will have a look at the actual changes in a moment.

edds added a commit that referenced this pull request May 26, 2015
@edds edds merged commit ea34e8e into master May 26, 2015
@edds edds deleted the remove-classic-analytics branch May 26, 2015 12:08
@fofr
Copy link
Contributor Author

fofr commented May 26, 2015

Thanks @edds 😄

fofr added a commit that referenced this pull request May 26, 2015
- Remove Google Analytics classic
#194
  - References to google-analytics-classic-tracker.js should be removed
- Rename GOVUK.Tracker to GOVUK.Analytics
  - References to GOVUK.Tracker should be updated
gemmaleigh pushed a commit to alphagov/govuk_elements that referenced this pull request Jun 9, 2015
# 4.0.1

- Fix: stop multiline text from dropping below phase tag.

# 4.0.0

- Remove Google Analytics classic
alphagov/govuk_frontend_toolkit#194
  - References to google-analytics-classic-tracker.js should be removed
- Rename GOVUK.Tracker to GOVUK.Analytics
  - References to GOVUK.Tracker should be updated
tombye added a commit to Crown-Commercial-Service/digitalmarketplace-buyer-frontend that referenced this pull request Jul 30, 2015
Only uses Universal now.

Classic was included in the new API initially to
support older implementations but was removed in
alphagov/govuk_frontend_toolkit#194.
tombye added a commit to Crown-Commercial-Service/digitalmarketplace-buyer-frontend that referenced this pull request Jul 31, 2015
Only uses Universal now.

Classic was included in the new API initially to
support older implementations but was removed in
alphagov/govuk_frontend_toolkit#194.
gemmaleigh added a commit to alphagov/service-manual-frontend that referenced this pull request Apr 25, 2016
# 4.10.0

- Allow New Transport font stack to be overridden by apps using
`$toolkit-font-stack`
and `$toolkit-font-stack-tabular` (PR #230)

# 4.9.1

- Fix phase banner alignment (PR #266)

# 4.9.0

- Add websafe organisation colours
- Split colours into two files with backwards-compatible colours.scss
replacement

# 4.8.2

- Add GOV.UK lint to lint scss files (PR #260)
- Remove reference to old colour palette (PR #256)
- Fix link to GOV.UK elements - tabular data

# 4.8.1

- Update DEFRA brand colour to new green (PR #249)

# 4.8.0

- Pass cohort name to analytics when using multivariate test (PR #251)

# 4.7.0

- Add 'mailto' tracking to GOV.UK Analytics (PR #244)

# 4.6.1

- Use the Sass variable $light-blue for link active and hover colours
(PR #242)

# 4.6.0

- Add breadcrumb styles, separator images and documentation (PR #236)
- Add fallback image for the back link (PR #235)

# 4.5.0

- Find and auto-start JavaScript modules from markup:
`data-module="module-name"`(PR #227)

# 4.4.0

- Add helpers partial for functions
- Add px to em function and documentation

# 4.3.0

- Allow javascript error tracking to be filtered to avoid noise from
plugins

# 4.2.1

- Track download links using events not pageviews

# 4.2.0

- Add two analytics plugins for download and external link tracking
- Update typography mixins to be mobile first (PR #157)

# 4.1.1

- Update Accessible Media Player to remove dependency on $.browser (PR
#206)

# 4.1.0

- Add support for sending the `page` option to
`GOVUK.analytics.trackEvent` (PR #203)

# 4.0.1

- Fix: stop multiline text from dropping below phase tag.

# 4.0.0

- Remove Google Analytics classic
alphagov/govuk_frontend_toolkit#194
  - References to google-analytics-classic-tracker.js should be removed
- Rename GOVUK.Tracker to GOVUK.Analytics
  - References to GOVUK.Tracker should be updated

# 3.5.1

- Changes Analytics API library to accept one, both or neither of the
analytics tracking codes. This means we can start removing classic
tracking codes from apps.

#3.5.0

- Adds cross domain tracking to Analytics API library:
alphagov/govuk_frontend_toolkit#185
- Adds sass variables for discovery and live phases

#3.4.2

- Fix: Before this fix, when a user fell into variant 0 of a
multivariate test,
the data wouldn't be reported to Google correctly because of a broken
null check in the code block that opts the user into the Google Content
Experiment.

# 3.4.1

- Fix: Make the error colour a darker red for greater contrast and to
meet WCAG 2.0 AAAA
(this was meant to go into 3.3.1 but was lost from history)
- Add `$focus-colour` variable (#180)

# 3.4.0

- multivariate-test.js: add support for using Google Content
Experiments as the reporting
backend for multivariate tests

# 3.3.1

- Fix: Make the error colour a darker red for greater contrast and to
meet WCAG 2.0 AAAA

# 3.3.0

- Add: Analytics - pageview tracking for a print attempt

# 3.2.1

- Fix: Analytics - don't run error and print plugins on load

# 3.2.0

- Add: Analytics API
alphagov/govuk_frontend_toolkit#162
https://github.com/alphagov/govuk_frontend_toolkit/blob/master/docs/anal
ytics.md

# 3.1.0

- Fix: outdent to add right margin rather than only left
- Fix: add missing semi-colons in JavaScript files
- Fix: use box-sizing mixin in column mixin to support more browsers
- Add: ability to specify float direction on column mixin
- Add: Sass-lint tests

# 3.0.1

- Fix a bug with the npm publishing. npm requires a version change to
publish a package.

# 3.0.0

- Change publishing method to not use git submodules in
govuk_frontend_toolkit_npm.
  This is a major version bump because it will move the toolkit from
  `./node_modules/govuk_frontend_toolkit/govuk_frontend_toolkit/`
  to `./node_modules/govuk_frontend_toolkit/`, which will break
relative imports in Sass.
- Fix typo in Sass comment
gemmaleigh added a commit to alphagov/service-manual-frontend that referenced this pull request Apr 25, 2016
# 4.10.0

- Allow New Transport font stack to be overridden by apps using
`$toolkit-font-stack`
and `$toolkit-font-stack-tabular` (PR #230)

# 4.9.1

- Fix phase banner alignment (PR #266)

# 4.9.0

- Add websafe organisation colours
- Split colours into two files with backwards-compatible colours.scss
replacement

# 4.8.2

- Add GOV.UK lint to lint scss files (PR #260)
- Remove reference to old colour palette (PR #256)
- Fix link to GOV.UK elements - tabular data

# 4.8.1

- Update DEFRA brand colour to new green (PR #249)

# 4.8.0

- Pass cohort name to analytics when using multivariate test (PR #251)

# 4.7.0

- Add 'mailto' tracking to GOV.UK Analytics (PR #244)

# 4.6.1

- Use the Sass variable $light-blue for link active and hover colours
(PR #242)

# 4.6.0

- Add breadcrumb styles, separator images and documentation (PR #236)
- Add fallback image for the back link (PR #235)

# 4.5.0

- Find and auto-start JavaScript modules from markup:
`data-module="module-name"`(PR #227)

# 4.4.0

- Add helpers partial for functions
- Add px to em function and documentation

# 4.3.0

- Allow javascript error tracking to be filtered to avoid noise from
plugins

# 4.2.1

- Track download links using events not pageviews

# 4.2.0

- Add two analytics plugins for download and external link tracking
- Update typography mixins to be mobile first (PR #157)

# 4.1.1

- Update Accessible Media Player to remove dependency on $.browser (PR
#206)

# 4.1.0

- Add support for sending the `page` option to
`GOVUK.analytics.trackEvent` (PR #203)

# 4.0.1

- Fix: stop multiline text from dropping below phase tag.

# 4.0.0

- Remove Google Analytics classic
alphagov/govuk_frontend_toolkit#194
  - References to google-analytics-classic-tracker.js should be removed
- Rename GOVUK.Tracker to GOVUK.Analytics
  - References to GOVUK.Tracker should be updated

# 3.5.1

- Changes Analytics API library to accept one, both or neither of the
analytics tracking codes. This means we can start removing classic
tracking codes from apps.

#3.5.0

- Adds cross domain tracking to Analytics API library:
alphagov/govuk_frontend_toolkit#185
- Adds sass variables for discovery and live phases

#3.4.2

- Fix: Before this fix, when a user fell into variant 0 of a
multivariate test,
the data wouldn't be reported to Google correctly because of a broken
null check in the code block that opts the user into the Google Content
Experiment.

# 3.4.1

- Fix: Make the error colour a darker red for greater contrast and to
meet WCAG 2.0 AAAA
(this was meant to go into 3.3.1 but was lost from history)
- Add `$focus-colour` variable (#180)

# 3.4.0

- multivariate-test.js: add support for using Google Content
Experiments as the reporting
backend for multivariate tests

# 3.3.1

- Fix: Make the error colour a darker red for greater contrast and to
meet WCAG 2.0 AAAA

# 3.3.0

- Add: Analytics - pageview tracking for a print attempt

# 3.2.1

- Fix: Analytics - don't run error and print plugins on load

# 3.2.0

- Add: Analytics API
alphagov/govuk_frontend_toolkit#162
https://github.com/alphagov/govuk_frontend_toolkit/blob/master/docs/anal
ytics.md

# 3.1.0

- Fix: outdent to add right margin rather than only left
- Fix: add missing semi-colons in JavaScript files
- Fix: use box-sizing mixin in column mixin to support more browsers
- Add: ability to specify float direction on column mixin
- Add: Sass-lint tests

# 3.0.1

- Fix a bug with the npm publishing. npm requires a version change to
publish a package.

# 3.0.0

- Change publishing method to not use git submodules in
govuk_frontend_toolkit_npm.
  This is a major version bump because it will move the toolkit from
  `./node_modules/govuk_frontend_toolkit/govuk_frontend_toolkit/`
  to `./node_modules/govuk_frontend_toolkit/`, which will break
relative imports in Sass.
- Fix typo in Sass comment
gemmaleigh added a commit to alphagov/service-manual-frontend that referenced this pull request Apr 26, 2016
# 4.10.0

- Allow New Transport font stack to be overridden by apps using
`$toolkit-font-stack`
and `$toolkit-font-stack-tabular` (PR #230)

# 4.9.1

- Fix phase banner alignment (PR #266)

# 4.9.0

- Add websafe organisation colours
- Split colours into two files with backwards-compatible colours.scss
replacement

# 4.8.2

- Add GOV.UK lint to lint scss files (PR #260)
- Remove reference to old colour palette (PR #256)
- Fix link to GOV.UK elements - tabular data

# 4.8.1

- Update DEFRA brand colour to new green (PR #249)

# 4.8.0

- Pass cohort name to analytics when using multivariate test (PR #251)

# 4.7.0

- Add 'mailto' tracking to GOV.UK Analytics (PR #244)

# 4.6.1

- Use the Sass variable $light-blue for link active and hover colours
(PR #242)

# 4.6.0

- Add breadcrumb styles, separator images and documentation (PR #236)
- Add fallback image for the back link (PR #235)

# 4.5.0

- Find and auto-start JavaScript modules from markup:
`data-module="module-name"`(PR #227)

# 4.4.0

- Add helpers partial for functions
- Add px to em function and documentation

# 4.3.0

- Allow javascript error tracking to be filtered to avoid noise from
plugins

# 4.2.1

- Track download links using events not pageviews

# 4.2.0

- Add two analytics plugins for download and external link tracking
- Update typography mixins to be mobile first (PR #157)

# 4.1.1

- Update Accessible Media Player to remove dependency on $.browser (PR
#206)

# 4.1.0

- Add support for sending the `page` option to
`GOVUK.analytics.trackEvent` (PR #203)

# 4.0.1

- Fix: stop multiline text from dropping below phase tag.

# 4.0.0

- Remove Google Analytics classic
alphagov/govuk_frontend_toolkit#194
  - References to google-analytics-classic-tracker.js should be removed
- Rename GOVUK.Tracker to GOVUK.Analytics
  - References to GOVUK.Tracker should be updated

# 3.5.1

- Changes Analytics API library to accept one, both or neither of the
analytics tracking codes. This means we can start removing classic
tracking codes from apps.

#3.5.0

- Adds cross domain tracking to Analytics API library:
alphagov/govuk_frontend_toolkit#185
- Adds sass variables for discovery and live phases

#3.4.2

- Fix: Before this fix, when a user fell into variant 0 of a
multivariate test,
the data wouldn't be reported to Google correctly because of a broken
null check in the code block that opts the user into the Google Content
Experiment.

# 3.4.1

- Fix: Make the error colour a darker red for greater contrast and to
meet WCAG 2.0 AAAA
(this was meant to go into 3.3.1 but was lost from history)
- Add `$focus-colour` variable (#180)

# 3.4.0

- multivariate-test.js: add support for using Google Content
Experiments as the reporting
backend for multivariate tests

# 3.3.1

- Fix: Make the error colour a darker red for greater contrast and to
meet WCAG 2.0 AAAA

# 3.3.0

- Add: Analytics - pageview tracking for a print attempt

# 3.2.1

- Fix: Analytics - don't run error and print plugins on load

# 3.2.0

- Add: Analytics API
alphagov/govuk_frontend_toolkit#162
https://github.com/alphagov/govuk_frontend_toolkit/blob/master/docs/anal
ytics.md

# 3.1.0

- Fix: outdent to add right margin rather than only left
- Fix: add missing semi-colons in JavaScript files
- Fix: use box-sizing mixin in column mixin to support more browsers
- Add: ability to specify float direction on column mixin
- Add: Sass-lint tests

# 3.0.1

- Fix a bug with the npm publishing. npm requires a version change to
publish a package.

# 3.0.0

- Change publishing method to not use git submodules in
govuk_frontend_toolkit_npm.
  This is a major version bump because it will move the toolkit from
  `./node_modules/govuk_frontend_toolkit/govuk_frontend_toolkit/`
  to `./node_modules/govuk_frontend_toolkit/`, which will break
relative imports in Sass.
- Fix typo in Sass comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants