Skip to content

Comments

docs(v2): analytics#1678

Merged
wgao19 merged 3 commits intomasterfrom
wgao19/docs-analytics
Jul 23, 2019
Merged

docs(v2): analytics#1678
wgao19 merged 3 commits intomasterfrom
wgao19/docs-analytics

Conversation

@wgao19
Copy link
Contributor

@wgao19 wgao19 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 July 19, 2019 01:37
@wgao19 wgao19 force-pushed the wgao19/docs-analytics branch from f14354f to 8fa7d3a Compare July 19, 2019 01:37
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jul 19, 2019
@wgao19
Copy link
Contributor Author

wgao19 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 mentioned this pull request Jul 19, 2019
20 tasks
@docusaurus-bot
Copy link
Contributor

@docusaurus-bot
Copy link
Contributor

@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Jul 19, 2019

@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Jul 19, 2019

@wgao19 wgao19 force-pushed the wgao19/docs-analytics branch from 8fa7d3a to 6c47646 Compare July 22, 2019 00:56
@wgao19 wgao19 changed the title WiP docs(v2): analytics docs(v2): analytics Jul 22, 2019
@wgao19
Copy link
Contributor Author

wgao19 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',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its done through themeconfig right ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also written here wan

@wgao19
Copy link
Contributor Author

wgao19 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
Copy link
Contributor

endiliey 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

@wgao19 wgao19 merged commit f2864e0 into master Jul 23, 2019
@wgao19 wgao19 deleted the wgao19/docs-analytics branch July 23, 2019 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants