nationalarchives / legacy-tna-google-tag-manager-scripts

All scripts to be added into google tag manager can be found here.
MIT License
4 stars 1 forks source link

Tracking onsite/offsite users (SearchUI) #89

Closed hoake closed 4 years ago

hoake commented 5 years ago

Script development for

Tasks that look for div id and send to the dataLayer

The following needs to be pushed to the dataLayer before gtm.js loads like content group tracking

Custom dimension tracking

Collect the ending text value after the last "-" that is wrapped in the following div.

<div id="version">
    Version 6.0 - August 2019 - OnSitePublic or Offsite etc
</div>

and push to the dataLayer as:

customDimension8=e.g. OnSitePublic

If div id does not exist do nothing (or whatever the meta tag look up is)

Acceptance/test criteria