-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
docs(gatsby-plugin-google-gtag): clarify that this plugin is inactive in dev #9497
Conversation
In reference to gatsbyjs#9436 @tylerbuchea
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 @talolard!
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, actually, @tylerbuchea made good points
As the confused party here I disagree. In other words, "This plugin is automatically disabled in development, and enabled in production." doesn't tell me why I'm not seeing myself in google analytics |
But if people are using gtag plugin instead of GA plugin that's on users to know what's the difference (I think). Unless we somewhere recommend that for GA, people should use gtag plugin (I'm not aware of that). Also I'm not really sure - but can You use gtag without connecting it to GA? If so this would be even more weird reading reference to GA if you aren't even using it with gtag |
Also I don't oppose mentioning GA here - but main point should be that gtag is disabled in development. It can expanded as example that if gtag is connected to GA it will not send traffic data to GA |
I found another Gatsby plugin that also only works in production mode and I really like how they worded their description for this behavior. I thought maybe we could copy them if everyone is cool with it? Also, it's nice for the consumers of these plugins if we have some consistent messaging across the different README's for similar functionality. The explanation in the plugin I'm referencing (https://www.gatsbyjs.org/packages/gatsby-plugin-feed/) reads like this:
So I figured we could update ours to read:
I hear what you're saying though @talolard. Gtag is new and confusing and it should probably be briefly explained in the README what it is and why you should use it. Which I think @pieh suggested when I opened the original PR but I didn't get around to implementing his suggestion. So my plan is that we add this NOTE in to describe just the prod vs dev environment differences and then I'm going to open a new PR that puts a description of what services gtag is capable of handling at the very top of the README so it will be clear that this plugin is for Google Analytics, Google Ads, Campaign Manager, Display & Video 360, and Search Ads 360. I'll include this link to the official Google docs on gtag as well so consumers can read more in-depth if they'd like https://developers.google.com/gtagjs/ Does that sound good to everyone? Can we rally behind that 🎉 |
Also, I think the note should be moved to the top of the README just below the subtext so there is no missing it. |
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 @talolard and @tylerbuchea!
Holy buckets, @talolard — we just merged your PR to Gatsby! 💪💜 Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! |
… in dev (gatsbyjs#9497) In reference to gatsbyjs#9436 @tylerbuchea
In reference to #9436 @tylerbuchea