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

Allow using sst.wri.org instead of https://www.googletagmanager.com (gtm) #323

Open
8 of 12 tasks
mariacha opened this issue Sep 25, 2024 · 1 comment
Open
8 of 12 tasks
Assignees

Comments

@mariacha
Copy link
Collaborator

mariacha commented Sep 25, 2024

We've got this https://www.googletagmanager.com two places in our build:
https://github.com/wri/wri_sites/blob/main/modules/wri_common/js/wri_gtm.js

https://github.com/wri/wri_sites/blob/main/themes/custom/ts_wrin/templates/layout/html.html.twig#L67

These need to be swappable with the url sst.wri.org in both places. We can use Content Snippets to accomplish this:

Dev tasks

this ticket is done when

  • An administrator can update the "Analytics URL" content snippet to use https://sst.wri.org/gtm.js instead of https://www.googletagmanager.com.
  • When they do this they see a call to https://sst.wri.org/gtm.js in the "Sources" tab of the browser console.
  • If you view the page's source, the code under the " Google Tag Manager (noscript)" section contains https://sst.wri.org/ not https://www.googletagmanager.com
  • If the administrator has not updated the Analytics URL value, they should continue to see calls to https://www.googletagmanager.com in both tests above.

How to test:

@mariacha mariacha removed their assignment Oct 7, 2024
@monicapatel21 monicapatel21 changed the title Allow using sst.wri.org instead of https://www.googletagmanager.com Allow using sst.wri.org instead of https://www.googletagmanager.com (gtm) Oct 22, 2024
@mariacha mariacha assigned mariacha and unassigned komejo Oct 22, 2024
@mariacha mariacha mentioned this issue Oct 23, 2024
8 tasks
mariacha added a commit that referenced this issue Oct 23, 2024
@mariacha
Copy link
Collaborator Author

This is ready for testing. The url for analytics can be updated at https://develop-wriflagship.pantheonsite.io/admin/content/content_snippets to https://sst.wri.org instead of https://www.googletagmanager.com and then we will want to verify that the analytics data is coming through from develop. @cpmadera passing to you to test out!

@mariacha mariacha assigned cpmadera and unassigned mariacha Oct 29, 2024
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

No branches or pull requests

3 participants