Open mariacha opened 2 months ago
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!
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
analytics_url
{{ contentSnippets.analytics_url }}
wri_common
javascript drupal settings in this function: https://github.com/wri/wri_sites/blob/main/modules/wri_common/wri_common.module#L522drupalSettings.wri_common.analytics_url
this ticket is done when
https://sst.wri.org/gtm.js
instead ofhttps://www.googletagmanager.com
.https://sst.wri.org/gtm.js
in the "Sources" tab of the browser console.https://sst.wri.org/
nothttps://www.googletagmanager.com
https://www.googletagmanager.com
in both tests above.How to test:
<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WGH5WB9"
string.https://sst.wri.org/