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

Update analytics doc to include google-plugin-gtag #27065

Closed
2 tasks
meganesu opened this issue Sep 25, 2020 · 12 comments · Fixed by #27081
Closed
2 tasks

Update analytics doc to include google-plugin-gtag #27065

meganesu opened this issue Sep 25, 2020 · 12 comments · Fixed by #27081
Assignees
Labels
good first issue Issue that doesn't require previous experience with Gatsby type: documentation An issue or pull request for improving or updating Gatsby's documentation

Comments

@meganesu
Copy link
Contributor

meganesu commented Sep 25, 2020

Summary

The existing docs about adding Google analytics recommend using the gatsby-plugin-google-analytics. Under the hood, this plugin uses Google's analytics.js file.

However, Google has a guide recommending users upgrade to gtag.js instead. There is another plugin (gatsby-plugin-gtag) which uses gtag.js.

Motivation

The gtag.js file works with all Google services. Here are a few resources with more information about the difference between gtag.js and analytics.js:

Steps to resolve this issue

Open a pull request

@meganesu meganesu added type: documentation An issue or pull request for improving or updating Gatsby's documentation Hacktoberfest good first issue Issue that doesn't require previous experience with Gatsby labels Sep 25, 2020
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Sep 25, 2020
@meganesu meganesu removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Sep 25, 2020
@meganesu
Copy link
Contributor Author

There's still an open question around what to do with the existing section for how to use gatsby-plugin-google-analytics.

  • Option 1: Keep the section, and add some guidance on how users should decide whether to use gatsby-plugin-google-analytics or gatsby-plugin-gtag.
  • Option 2: Always recommend using gatsby-plugin-gtag. Remove the section on gatsby-plugin-google-analytics and instead list it under the "Other Gatsby analytics plugins" section.

@98lenvi
Copy link
Contributor

98lenvi commented Sep 26, 2020

Hi @meganesu, I can help with this! Can you assign the issue to me?

I'm going to proceed with option 1,

@wardpeet
Copy link
Contributor

wardpeet commented Oct 1, 2020

@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 😂, 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.

@meganesu
Copy link
Contributor Author

meganesu commented Oct 1, 2020

@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.

@98lenvi
Copy link
Contributor

98lenvi commented Oct 2, 2020

@meganesu, Hi! can you check the PR now? I have made the changes.

@akgupta0777
Copy link

Is this necessary that the issue assigned to somebody only He/She can do?
I am new to Github and Open Source Development.

@LekoArts

@LekoArts
Copy link
Contributor

LekoArts commented Oct 5, 2020

@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).

@akgupta0777
Copy link

Thanks I understood now.

@muescha
Copy link
Contributor

muescha commented Jan 7, 2021

i think we should also update the readme in gatsby-plugin-google-analytics

@akgupta0777
Copy link

Can I do this thing updating in readme task ?

@muescha
Copy link
Contributor

muescha commented Jan 7, 2021

@akgupta0777 sorry i did read your help to late :(

i have done a PR

@akgupta0777
Copy link

@muescha It's ok, not a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issue that doesn't require previous experience with Gatsby type: documentation An issue or pull request for improving or updating Gatsby's documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants