grpc.io icon indicating copy to clipboard operation
grpc.io copied to clipboard

script for gtm

Open Gayathri625 opened this issue 1 year ago • 2 comments

Created partials to embed Google Tag Manager (GTM) script. GTM container ID is dynamically fetched from config.yaml, ensuring that tags fired are sent to their assigned GTM container

Gayathri625 avatar Jul 02 '24 09:07 Gayathri625

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: Gayathri625 (62c06a4ac309396b862dcc1bddc3cda7c6932f67, 16e1b565a72b4e35afc9648a772cebdaa0669560, c06f1823aef3c9ead148af56d8b76445cc64deb0)

Instead of modifying the theme in grpc/grpc.io-docsy#6 could we instead add these with layouts/partials/hooks/head-end.html and body-end.html? Or is it a problem having them at the end of head/body?

Yeah we can gtm.html can be placed anywhere in the head. gtm-noscript.html is to track the events in browsers with JavaScript disabled. Placing gtm-noscript.html at the end of the body might cause some events to be missed, but this won't be a major issue since users with JavaScript disabled are rare

Gayathri625 avatar Jul 03 '24 09:07 Gayathri625

Instead of modifying the theme in grpc/grpc.io-docsy#6 could we instead add these with layouts/partials/hooks/head-end.html and body-end.html? Or is it a problem having them at the end of head/body?

Yeah we can gtm.html can be placed anywhere in the head. gtm-noscript.html is to track the events in browsers with JavaScript disabled. Placing gtm-noscript.html at the end of the body might cause some events to be missed, but this won't be a major issue since users with JavaScript disabled are rare

Ok great, let's try it this way and abandon the other PR. I see you have made the changes here already, is this ready to be merged?

temawi avatar Jul 04 '24 18:07 temawi

Instead of modifying the theme in grpc/grpc.io-docsy#6 could we instead add these with layouts/partials/hooks/head-end.html and body-end.html? Or is it a problem having them at the end of head/body?

Yeah we can gtm.html can be placed anywhere in the head. gtm-noscript.html is to track the events in browsers with JavaScript disabled. Placing gtm-noscript.html at the end of the body might cause some events to be missed, but this won't be a major issue since users with JavaScript disabled are rare

Ok great, let's try it this way and abandon the other PR. I see you have made the changes here already, is this ready to be merged?

yes, it is ready to merge

Gayathri625 avatar Jul 05 '24 02:07 Gayathri625