-
Notifications
You must be signed in to change notification settings - Fork 109
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
Update data.gov Google Analytics tag (analytics.js) to the GA4 (gtag.js) #3571
Comments
Search |
Based on comments at the TTS Digital Council, we should first enroll in GSA's GA360 enterprise analytics program. This will give our UA implementation another year of life and then GA360 admins will create a GA4 account for us, after which developers can create implementation tickets. |
Discussion at IRL was we update our own existing account and enroll in the GSA GA 360 |
It turns out we lost the whole block |
We determined that the CKAN templates were being overwritten by other CKAN plugins. Fuhu was able to resolve this with this PR: GSA/catalog.data.gov#1084. This likely also contributed to the lost of overall views in the GA reports. I've updated the PR with the GA4 tracking code. Once this is deployed we can verify if data is flowing into the GA4 property. |
Verified that the new gtag javascript was being used in the data.gov static site. I've update the tracking code to use the GA4 version. Once this is deployed, I can verify that data is flowing into the GA4 property from the static sites. Once that verification is complete, this story can be marked complete. |
I verified that data is flowing into the GA4 from both catalog.data.gov and the 11ty site. Examples: |
@dlennox24 what we discussed about making sure that sdg and resources are included in the Data.gov GA4, can we include that here, and then we can close ticket |
I added https://sdg.data.gov/ and https://resources.data.gov/ to the acceptance criteria and moved this back to in progress. These sites don't have the new GA4 tag/code added to them yet. |
I've added the new GA4 code to resources and sdg. The PRs are currently pending review and approval. |
@dlennox24 will close after confirming data is flowing |
User Story
In order to benefit from the new generation of Google Analytics, data.gov teams wants upgrade to Google's GA4 (gtag.js) tagging solution.
Acceptance Criteria
[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using BDD.]
THEN we see
https://www.googletagmanager.com/gtag/js
in the source codeAND visitor data are collected to the new GA4 properties on the GA dashboard.
THEN we see
https://www.googletagmanager.com/gtag/js
in the source codeAND visitor data are collected to the new GA4 properties on the GA dashboard.
THEN we see
https://www.googletagmanager.com/gtag/js
in the source codeAND visitor data are collected to the new GA4 properties on the GA dashboard.
THEN we see
https://www.googletagmanager.com/gtag/js
in the source codeAND visitor data are collected to the new GA4 properties on the GA dashboard.
Background
We got email notification from Google to encourage for the upgrade.
Security Considerations (required)
Developer will need to gain access to the GA dashboard to configure GA4 properties.
Sketch
Leave both old generationanalytics.js
snippet and new generationgtag.js
snippet on for a while, verify it is working expected before takinganalytics.js
off.The text was updated successfully, but these errors were encountered: