You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -61,13 +70,13 @@ If you want to link analytics use with anything inside the container (for exampl
61
70
62
71
#### Tracking routes
63
72
64
-
This plugin will fire a new event called `gatsby-route-change` whenever a route is changed in your Gatsby application. To record this in Google Tag Manager, we will need to add a trigger to the desired tag to listen for the event:
73
+
This plugin will fire a new event called `gatsby-route-change`(or as in the `gatsby-config.js` configured `routeChangeEventName`) whenever a route is changed in your Gatsby application. To record this in Google Tag Manager, we will need to add a trigger to the desired tag to listen for the event:
65
74
66
75
1. Visit the [Google Tag Manager console](https://tagmanager.google.com/) and click on the workspace for your site.
67
76
2. Navigate to the desired tag using the 'Tags' tab of the menu on the right hand side.
68
77
3. Under "Triggering", click the pencil icon, then the "+" button to add a new trigger.
69
78
4. In the "Choose a trigger" window, click on the "+" button again.
70
-
5. Choose the trigger type by clicking the pencil button and clicking "Custom event". For event name, enter `gatsby-route-change`.
79
+
5. Choose the trigger type by clicking the pencil button and clicking "Custom event". For event name, enter `gatsby-route-change` (or as in the `gatsby-config.js` configured `routeChangeEventName`).
71
80
72
81
This tag will now catch every route change in Gatsby, and you can add Google tag services as you wish to it.
0 commit comments