-
Notifications
You must be signed in to change notification settings - Fork 953
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃搱 Add GTM #119
馃搱 Add GTM #119
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
cc @Pierrci or @SBrandeis if you want to chime in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Co-authored-by: Pierric Cistac <Pierrci@users.noreply.github.com>
<script> | ||
if (["hf.co", "huggingface.co"].includes(window.location.hostname)) { | ||
const script = document.createElement("script"); | ||
script.src = "https://www.googletagmanager.com/gtag/js?id=G-8Q63TH4CSL"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but this should be made configurable through an env var no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's hardcoded on moon-landing so I just did the same thing, but yes I agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep i mean just the id part
gtag("js", new Date()); | ||
/// ^ See https://developers.google.com/tag-platform/gtagjs/install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's missing:
gtag("config", "G-8Q63TH4CSL")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah maybe, I thought it was redundant with ?id=G-8Q63TH4CSL
in the URL of the script, but maybe it's not indeed
following Hub setup.
closes #114