Skip to content

Commit a7aaefb

Browse files
Update script-extensions.md
1 parent 64a36ba commit a7aaefb

File tree

1 file changed

+18
-23
lines changed

1 file changed

+18
-23
lines changed

docs/script-extensions.md

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ title: Enable optional measurements
44

55
import useBaseUrl from '@docusaurus/useBaseUrl';
66

7-
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.
88

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.
1012

1113
<img alt="Enable optional enhanced measurements" src={useBaseUrl('img/onboarding-enable-enhanced-tracking.png')} />
1214

@@ -17,8 +19,19 @@ Here's the list of our optional measurements:
1719
| Outbound links | Automatically [track clicks on outbound links](outbound-link-click-tracking.md) |
1820
| File downloads | Automatically [track file downloads](file-downloads-tracking.md) |
1921
| 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>
2033

21-
## `plausible.init()` configuration
34+
### `plausible.init()` configuration
2235

2336
Additionally, `plausible.init()` can be called with different options further enhance its behavior. Supported options are:
2437

@@ -35,25 +48,6 @@ Additionally, `plausible.init()` can be called with different options further en
3548
| logging | `boolean` | `true` | Enable/disable logging done by script |
3649
| transformRequest | `function(payload)` || Modify or filter events before sending (e.g. [for custom locations](/custom-locations))|
3750

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-
5751
### Manual pageviews
5852

5953
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`
8074

8175
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).
8276

83-
8477
#### Track custom query parameters for complete page URLs
8578

8679
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
9285
:::tip Want to track outbound link clicks or file downloads cloaked with pretty URLs?
9386
See these [step-by-step instructions](custom-automatic-link-tracking.md) for how to do that.
9487
:::
88+
89+
</details>

0 commit comments

Comments
 (0)