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

Installs GTM instead of just GA4 #2801

Merged
merged 2 commits into from
Jan 17, 2024
Merged

Installs GTM instead of just GA4 #2801

merged 2 commits into from
Jan 17, 2024

Conversation

cjyabraham
Copy link
Contributor

To allow us more flexibility we want to install GTM in place of just GA4. We will also be including a HubSpot tracking code using GTM. See cncf/cncf.io#823

Signed-off-by: Chris Abraham <cjyabraham@gmail.com>
Copy link

netlify bot commented Jan 15, 2024

Deploy Preview for cncfglossary ready!

Name Link
🔨 Latest commit 7533168
🔍 Latest deploy log https://app.netlify.com/sites/cncfglossary/deploys/65a4fc52cdc58a0008779c5a
😎 Deploy Preview https://deploy-preview-2801--cncfglossary.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Signed-off-by: Chris Abraham <cjyabraham@gmail.com>
@jihoon-seo jihoon-seo added the maintainers Use this label if PR requires maintainers to take action label Jan 16, 2024
@@ -4,6 +4,12 @@
{{ partial "head.html" . }}
</head>
<body class="td-{{ .Kind }}">
{{ if hugo.IsProduction }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From this line, I expected that the lines L9-L10 would not appear in Netlify preview (because it's not prod),
but in the source of the preview, those lines are rendered.

My questions are:

  1. Is this right? Does Hugo presume Netlify previews as prod?
    (Or, it's just Hugo cannot tell Netlify previews and the real prod (https://glossary.cncf.io) apart?)
  2. Would be there no problem if GTM tags are inserted in Netlify preview sites?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's not correct. Previews should not have analytics and should not be true for IsProduction. It's not a huge concern, however, as it has been how this site has been working from the beginning with Google Analytics and GTM should not be any different.

I suggest we split this problem out as an independent issue and not allow it to hold up merging this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@seokho-son seokho-son left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)
Thanks @cjyabraham !

Copy link
Collaborator

@jihoon-seo jihoon-seo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

@jihoon-seo jihoon-seo merged commit 9665c77 into main Jan 17, 2024
7 checks passed
@jihoon-seo jihoon-seo deleted the gtm branch January 17, 2024 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintainers Use this label if PR requires maintainers to take action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants