Skip to content

Commit 216d1d8

Browse files
authored
Update adding-analytics.md (#27624)
1 parent a6bebe4 commit 216d1d8

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

docs/docs/adding-analytics.md

+11-7
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,28 @@ You should now have a Tracking ID; take note of it, as your website will need to
2626

2727
You can find this tracking ID later by going to `Admin > Tracking Info > Tracking Code`.
2828

29-
## Using `gatsby-plugin-gtag`
29+
## Using `gatsby-plugin-google-gtag`
3030

3131
Now, it's time to configure Gatsby to send page views to your Google Analytics account.
3232

33-
We are going to use `gatsby-plugin-gtag`. For other analytics options (including Google Tag Manager), check [other Gatsby analytics plugins](#other-gatsby-analytics-plugins).
33+
We are going to use `gatsby-plugin-google-gtag`. For other analytics options (including Google Tag Manager), check [other Gatsby analytics plugins](#other-gatsby-analytics-plugins).
3434

3535
```shell
36-
npm install gatsby-plugin-gtag
36+
npm install gatsby-plugin-google-gtag
3737
```
3838

3939
```js:title=gatsby-config.js
4040
module.exports = {
4141
plugins: [
4242
{
43-
resolve: `gatsby-plugin-gtag`,
43+
resolve: `gatsby-plugin-google-gtag`,
4444
options: {
45-
// replace `UA-XXXXXXXXX-X` with your own Google Analytics Tracking ID
46-
trackingId: `UA-XXXXXXXX-X`,
45+
// You can add multiple tracking ids and a pageview event will be fired for all of them.
46+
trackingIds: [
47+
"GA-TRACKING_ID", // Google Analytics / GA
48+
"AW-CONVERSION_ID", // Google Ads / Adwords / AW
49+
"DC-FLOODIGHT_ID", // Marketing Platform advertising products (Display & Video 360, Search Ads 360, and Campaign Manager)
50+
],
4751
},
4852
},
4953
],
@@ -52,7 +56,7 @@ module.exports = {
5256

5357
> Note: Read more about [gatsby-config.js](/docs/gatsby-config/)
5458
55-
Full documentation for the plugin can be found [here](/packages/gatsby-plugin-gtag/).
59+
Full documentation for the plugin can be found [here](/packages/gatsby-plugin-google-gtag/).
5660

5761
There are a number of extra configuration options--both with the Gatsby plugin and also in your Google Analytics account--so you can tailor things to meet your website's needs.
5862

0 commit comments

Comments
 (0)