Closed meganesu closed 4 years ago
There's still an open question around what to do with the existing section for how to use gatsby-plugin-google-analytics
.
gatsby-plugin-google-analytics
or gatsby-plugin-gtag
.gatsby-plugin-gtag
. Remove the section on gatsby-plugin-google-analytics
and instead list it under the "Other Gatsby analytics plugins" section.Hi @meganesu, I can help with this! Can you assign the issue to me?
I'm going to proceed with option 1,
@meganesu I would try to promote gtag as much as we can (option 2). If you follow Google's developer docs and/or copy-paste from analytics itself you get a gtag code and not an analytics code anymore.
I don't think our docs need to be talking about the difference between gtag or analytics. It would only confuse people. We don't want to give users to many options :joy:, users who are invested in analytics probably already know the difference or google about it. We could add a note to the readme files of the plugins so it's documented somewhere.
@wardpeet sounds good, thanks for the recommendation!
@98lenvi thanks for tackling this issue. Could you please update your PR to match @wardpeet's recommendation? Feel free to reach out if you have any questions about the changes.
@meganesu, Hi! can you check the PR now? I have made the changes.
Is this necessary that the issue assigned to somebody only He/She can do? I am new to Github and Open Source Development.
@LekoArts
@akgupta0777 When an issue can only be fixed by one PR (which is the case here) it's common etiquette that a person offers their help and then picks up the work. This should be communicated clearly in the issue so that other people who want to help see that it's already being addressed and not duplicate PRs are opened. To make things clearer we ("Gatsby") assign issues to people then.
In the case of an issue being solvable by multiple PRs (e.g. "solve issue X around the docs") the persons should all comment that they want to change things X,Y,Z so that - again - people are not doing duplicate work.
You can still help out by leaving review comments on the PR (although most of the time the core maintainers do that).
If the person who initially signed up for sending in a PR didn't do that after quite some time (OSS is most of the times in the free time of people so don't expect anyone to instantly create things) you could ask in the issue if you instead could pick it up (or any other person).
Thanks I understood now.
i think we should also update the readme in gatsby-plugin-google-analytics
Can I do this thing updating in readme task ?
@akgupta0777 sorry i did read your help to late :(
i have done a PR
chore(docs): google plugin analytics - upgrade to gtag, fix code
@muescha It's ok, not a problem.
Summary
The existing docs about adding Google analytics recommend using the
gatsby-plugin-google-analytics
. Under the hood, this plugin uses Google'sanalytics.js
file.However, Google has a guide recommending users upgrade to
gtag.js
instead. There is another plugin (gatsby-plugin-gtag
) which usesgtag.js
.Motivation
The
gtag.js
file works with all Google services. Here are a few resources with more information about the difference betweengtag.js
andanalytics.js
:gtag.js
Steps to resolve this issue
gatsby-plugin-gtag
".Open a pull request