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
The Plausible JavaScript snippet offer enhanced measurements and configuration for tailoring to how you want to use Plausible.
7
+
The Plausible script offers enhanced measurements and configuration options to tailor tracking to your needs.
8
8
9
-
Optional measurements can enabled when adding a new site to your Plausible account or in the "**Site Installation**" area of the "**General**" section in your [site settings](website-settings.md).
9
+
You can enable optional measurements for form submissions, outbound link clicks and file downloads when adding a new site to your Plausible account, or later in the "**Site installation**" area under "**General**" in your [site settings](website-settings.md).
10
+
11
+
There are also additional measurement options that you can set up manually if needed.
| Form submissions | Automatically [track form submissions](form-submissions-tracking.md)|
22
+
| 404 error pages | Allows you to set up [404 error pages tracking](error-pages-tracking-404.md)|
23
+
| Hashed page paths | Allows you to set up page paths that use a `#` in the URL ([hash-based routing](hash-based-routing.md)) |
24
+
| Custom events | Allows you to [track custom events](custom-event-goals.md) such as link clicks, form submits and any other HTML element clicks |
25
+
| Custom properties | Allows you to attach [custom properties](/custom-props/introduction) (also known as custom dimensions in Google Analytics) when sending a pageview or custom event to create custom metrics |
26
+
| Ecommerce revenue | Allows you to assign dynamic [monetary values](ecommerce-revenue-tracking.md) to custom events and track revenue attribution |
27
+
28
+
<summary>
29
+
30
+
## Advanced tracking options
31
+
32
+
</summary>
20
33
21
-
## `plausible.init()` configuration
34
+
###`plausible.init()` configuration
22
35
23
36
Additionally, `plausible.init()` can be called with different options further enhance its behavior. Supported options are:
24
37
@@ -35,25 +48,6 @@ Additionally, `plausible.init()` can be called with different options further en
35
48
| logging |`boolean`|`true`| Enable/disable logging done by script |
36
49
| transformRequest |`function(payload)`| – | Modify or filter events before sending (e.g. [for custom locations](/custom-locations))|
37
50
38
-
39
-
## Advanced tracking recipes
40
-
41
-
### Tracking 404 error pages
42
-
43
-
See guide for [tracking 404 error pages](error-pages-tracking-404.md)
44
-
45
-
### Tracking custom events
46
-
47
-
See guide for [tracking custom events such as link clicks or any other HTML element clicks](custom-event-goals.md)
48
-
49
-
### Attaching custom properties
50
-
51
-
See guide for [attaching custom properties](/custom-props/introduction) (also known as custom dimensions in Google Analytics) when sending a pageview or custom event to create custom metrics.
52
-
53
-
### Ecommerce revenue
54
-
55
-
See guide for [assigning dynamic monetary values](ecommerce-revenue-tracking.md) to custom events and track revenue attribution
56
-
57
51
### Manual pageviews
58
52
59
53
By default, the Plausible script triggers a pageview when it's first loaded. It also attaches listeners to the History API and will automatically trigger pageviews when you use `history.pushState`. This is useful for most websites but we also allow disabling `autoCapturePageviews` in case you want full control over when pageviews are triggered on your website.
@@ -80,7 +74,6 @@ Triggering pageviews manually allows you to provide a special option named `url`
80
74
81
75
It's especially helpful to redact and aggregate multiple pages whose URLs contain identifiers that are specific to users. [Learn more about specifying custom URLs in your events](custom-locations.md).
82
76
83
-
84
77
#### Track custom query parameters for complete page URLs
85
78
86
79
By default, Plausible strips all query parameters for privacy purposes [except for](top-referrers.md)`ref`, `source`, `utm_source`, `utm_medium`, `utm_campaign`, `utm_content` and `utm_term`.
@@ -92,3 +85,5 @@ By using the manual script extension, you can also track custom query parameters
92
85
:::tip Want to track outbound link clicks or file downloads cloaked with pretty URLs?
93
86
See these [step-by-step instructions](custom-automatic-link-tracking.md) for how to do that.
0 commit comments