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

docs(v2): analytics #1678

Merged
merged 3 commits into from Jul 23, 2019

Conversation

@wgao19
Copy link
Collaborator

commented Jul 19, 2019

Motivation

Addressing #1640, add docs for adding analytics

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@wgao19 wgao19 requested review from endiliey and yangshun as code owners Jul 19, 2019

@wgao19 wgao19 force-pushed the wgao19/docs-analytics branch from f14354f to 8fa7d3a Jul 19, 2019

@wgao19

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 19, 2019

Hey @yangshun got a question:

We provide trackingId via themeConfig, but classic theme does not use the gtag plugin isn't it? what uses it is the gtag plugin specified in preset, then, wouldn't specifying trackingId in themeConfig be conceptually confusing?

Please let me know, then I'll make changes in this PR to reflect the idea.

@wgao19 wgao19 referenced this pull request Jul 19, 2019
12 of 19 tasks complete
@docusaurus-bot

This comment has been minimized.

Copy link
Collaborator

commented Jul 19, 2019

Deploy preview for docusaurus-2 ready!

Built with commit f14354f

https://deploy-preview-1678--docusaurus-2.netlify.com

@docusaurus-bot

This comment has been minimized.

Copy link
Collaborator

commented Jul 19, 2019

Deploy preview for docusaurus-preview ready!

Built with commit f14354f

https://deploy-preview-1678--docusaurus-preview.netlify.com

@docusaurus-bot

This comment has been minimized.

Copy link
Collaborator

commented Jul 19, 2019

Deploy preview for docusaurus-2 ready!

Built with commit 77a3757

https://deploy-preview-1678--docusaurus-2.netlify.com

@docusaurus-bot

This comment has been minimized.

Copy link
Collaborator

commented Jul 19, 2019

Deploy preview for docusaurus-preview ready!

Built with commit 77a3757

https://deploy-preview-1678--docusaurus-preview.netlify.com

@wgao19 wgao19 force-pushed the wgao19/docs-analytics branch from 8fa7d3a to 6c47646 Jul 22, 2019

@wgao19 wgao19 changed the title WiP docs(v2): analytics docs(v2): analytics Jul 22, 2019

@wgao19

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 22, 2019

@yangshun @endiliey updated this PR to include GA and gtag. Please take a look if the sections make sense. Thanks!

[
'@docusaurus/plugin-google-gtag',
{
trackingID: 'UA-142857148-5',

This comment has been minimized.

Copy link
@endiliey

endiliey Jul 22, 2019

Collaborator

its done through themeconfig right ?

This comment has been minimized.

Copy link
@wgao19

wgao19 Jul 22, 2019

Author Collaborator

Recommended that in the "analytics" section and purposely moved how to manually set it up via plugins to this "advanced guide: plugins" section.

This comment has been minimized.

Copy link
@endiliey

endiliey Jul 22, 2019

Collaborator

yep. what i mean is that

// docusaurus.config.js
module.exports = {
  plugins: [
    [
      '@docusaurus/plugin-google-analytics',
      {
        trackingID: 'UA-142857148-5',
      },
    ],
  ],
};

is essentially the same as

```js
// docusaurus.config.js
module.exports = {
  plugins: ['@docusaurus/plugin-google-analytics',]
};

because tracking id needs to be done in themeConfig instead

cc the plugin author @yangshun for clarify

This comment has been minimized.

Copy link
@wgao19

wgao19 Jul 23, 2019

Author Collaborator

Also written here wan

@wgao19

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 22, 2019

By the way, @endiliey it seems that the link from analytics to sections in the advanced plugins page is once again not landing on the headings correctly...

@endiliey

This comment has been minimized.

Copy link
Collaborator

commented Jul 22, 2019

@wgao19 file issue or send screencast

By the way, @endiliey it seems that the link from analytics to sections in the advanced plugins page is once again not landing on the headings correctly..

Its due to wrong link check 77a3757

website/docs/analytics.md Outdated Show resolved Hide resolved

@wgao19 wgao19 merged commit f2864e0 into master Jul 23, 2019

4 checks passed

ci/circleci: lint-prettier Your tests passed on CircleCI!
Details
ci/circleci: tests Your tests passed on CircleCI!
Details
deploy/netlify Deploy preview ready!
Details
netlify/docusaurus-2/deploy-preview Deploy preview ready!
Details

@wgao19 wgao19 deleted the wgao19/docs-analytics branch Jul 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.