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
+18-14Lines changed: 18 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,40 +5,44 @@ This document walks through how you can set up Plausible Analytics using Google
5
5
6
6
## Google Tag Manager Template
7
7
8
-
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. (You can find the source code for the Google Tag Manager template used [here](https://github.com/plausible/plausible-gtm-template))
8
+
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.
9
9
10
-
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.
10
+
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).
11
11
12
12
Once you’ve installed the template, you should create a new Tag that uses it. To do this:
13
-
* In the main Google Tag Manager dashboard, browse to Tags and click New to create a new tag
13
+
14
+
* In the main Google Tag Manager dashboard, browse to "**Tags**" and click "**New**" to create a new tag
14
15
* From the list of available tag templates, choose the Plausible Analytics tag template you just installed
15
-
* 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 (other optional configuration options are described below in the section Tag Configuration)
16
-
* For the tag trigger, you should select All Pages - Page View, which will ensure that Plausible will capture data on all pages
16
+
* 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**"
17
+
* Other optional configuration options are described below in the section "**Tag Configuration**"
18
+
* For the tag trigger, you should select "**All Pages**" - "**Page View**", which will ensure that Plausible will capture data on all pages
17
19
18
20
## Tag Configuration
19
21
20
22
The tag has the following optional configuration options:
21
23
22
24
|**Optional Configuration**|**Explanation**|
23
25
|---------------------------|-----------------|
24
-
|**File Downloads**| Automatically [track file downloads](/docs/file-downloads-tracking)(enabled by default) |
25
-
|**Form Submissions**| Whether to [track form submissions](/docs/form-submissions-tracking.md)(enabled by default)|
26
-
|**Outbound Links**| Automatically [track clicks on outbound links](/docs/outbound-link-click-tracking)(enabled by default) |
27
-
|**Hash Based Routing**| Automatically track page paths that use a `#` in the URL, [described here](/docs/hash-based-routing)(disabled by default) |
28
-
|**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.|
|**Form Submissions**| Whether to [track form submissions](/docs/form-submissions-tracking.md)|
28
+
|**Outbound Links**| Automatically [track clicks on outbound links](/docs/outbound-link-click-tracking)|
29
+
|**Hash Based Routing**| Automatically track page paths that use a `#` in the URL, [described here](/docs/hash-based-routing)|
30
+
|**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 |
29
31
30
32
<details>
31
33
<summary>Advanced configuration options</summary>
32
34
33
35
|**Optional Configuration**|**Explanation**|
34
36
|---------------------------|-----------------|
35
-
|**Auto Capture Pageviews**| Whether to automatically capture pageviews (enabled by default)|
36
-
|**Capture on Localhost**| Whether to capture events on localhost (disabled by default) |
37
-
|**Logging**| Whether to log to console on ignored events (enabled by default)|
37
+
|**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|
38
+
|**Capture on Localhost**| Whether to capture events on localhost |
39
+
|**Logging**| Whether to log to console on ignored events. When enabled, any ignored events are logged to the browser console with a warning|
38
40
39
41
40
42
</details>
41
43
42
44
## Troubleshooting
43
45
44
-
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.
46
+
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.
47
+
48
+
For more details on the Plausible Analytics Google Tag Manager template, please [see our guide](https://plausible.io/gtm-template).
0 commit comments