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
Copy file name to clipboardExpand all lines: docs/google-tag-manager.md
+1-61Lines changed: 1 addition & 61 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,64 +4,4 @@ title: How to add the script to your site using Google Tag Manager
4
4
5
5
import useBaseUrl from '@docusaurus/useBaseUrl';
6
6
7
-
This document walks through how you can set up Plausible Analytics using Google Tag Manager.
8
-
9
-
## Google Tag Manager Template
10
-
11
-
In order to make the process easier, we have published a template that makes setting up Plausible Analytics with Google Tag Manager simple and code free.
12
-
13
-
The simplest way to install the custom template is to locate it in the [Google Tag Manager template gallery](https://tagmanager.google.com/gallery/#/) where you can install it directly from your Google Tag Manager dashboard. Here's the direct link to the [Plausible Analytics GTM template](https://tagmanager.google.com/gallery/#/owners/plausible/templates/plausible-gtm-template).
Once you’ve installed the template, you should create a new Tag that uses it. To do this:
18
-
19
-
* In the main Google Tag Manager dashboard, browse to "**Tags**" and click "**New**" to create a new tag
20
-
21
-
<img alt="Plausible GTM Template New Tag" src={useBaseUrl('img/plausible-gtm-template-new-tag.png')}/>
22
-
23
-
* From the list of available tag templates, choose the Plausible Analytics tag template you just installed
24
-
25
-
<img alt="Plausible GTM Template New Tag Template" src={useBaseUrl('img/plausible-gtm-template-new-tag-template.png')}/>
26
-
27
-
* The only mandatory field in the tag configuration is the "**Script ID**" that can be found in the Plausible Analytics dashboard under "**Site Settings**" > "**Site Installation**" > "**Google Tag Manager**"
28
-
29
-
<img alt="Plausible GTM Template New Tag Script ID" src={useBaseUrl('img/plausible-gtm-template-new-tag-script-id.png')}/>
30
-
31
-
* Other optional configuration options are described below in the section "**Tag Configuration**"
32
-
33
-
<img alt="Plausible GTM Template New Tag Script ID" src={useBaseUrl('img/plausible-gtm-template-new-tag-configuration-options.png')}/>
34
-
35
-
* For the tag trigger, you should select "**All Pages**" - "**Page View**", which will ensure that Plausible will capture data on all pages
36
-
37
-
<img alt="Plausible GTM Template New Tag Trigger" src={useBaseUrl('img/plausible-gtm-template-trigger.png')}/>
38
-
39
-
## Tag Configuration
40
-
41
-
The tag has the following optional configuration options:
|**Form Submissions**| Whether to [track form submissions](/docs/form-submissions-tracking.md)|
47
-
|**Outbound Links**| Automatically [track clicks on outbound links](/docs/outbound-link-click-tracking)|
48
-
|**Hash Based Routing**| Automatically track page paths that use a `#` in the URL, [described here](/docs/hash-based-routing)|
49
-
|**Custom Properties**| Allows you to attach [custom properties](/docs/custom-props/introduction) (also known as custom dimensions in Google Analytics) when sending a pageview event. These can be configured using Google Tag Manager variables |
50
-
51
-
<details>
52
-
<summary>Advanced configuration options</summary>
53
-
54
-
|**Optional Configuration**|**Explanation**|
55
-
|---------------------------|-----------------|
56
-
|**Auto Capture Pageviews**| Whether to automatically capture pageviews. If this is unchecked, the script will be loaded and ready to receive events but no pageviews will be sent. You would need to recreate pageview events by creating another tag with the trigger Page View or similar to send the event manually |
57
-
|**Capture on Localhost**| Whether to capture events on localhost |
58
-
|**Logging**| Whether to log to console on ignored events. When enabled, any ignored events are logged to the browser console with a warning |
59
-
60
-
61
-
</details>
62
-
63
-
## Troubleshooting
64
-
65
-
You can test that everything is working as expected by using Google Tag Manager’s Preview mode. You can enter Preview mode by clicking the blue Preview button in the Google Tag Manager dashboard. This opens a new tab with your website running the GTM container where you can see if Plausible Analytics is running and capturing data properly. In the Tag Assistant Preview tab, you can see additional information about the events that trigger the tag and the data that is being sent.
66
-
67
-
For more details on the Plausible Analytics Google Tag Manager template, please [see our guide](https://plausible.io/gtm-template).
7
+
We have published a template that makes setting up Plausible Analytics with Google Tag Manager simple. For more details on the Plausible Analytics Google Tag Manager template, please [see our guide](https://plausible.io/gtm-template).
0 commit comments