Skip to content

Commit 50dd9db

Browse files
committed
Update docs/custom-locations.md
1 parent b10f111 commit 50dd9db

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

docs/custom-locations.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Follow the steps below to learn how you can specify a custom location for your p
1010

1111
## 1. Disable automatic pageviews
1212

13-
To specify a custom location for your event, you must disable automatic pageview tracking. Update your snippet to set `autoCapturePageviews` to `false.
13+
To specify a custom location for your event, you must disable automatic pageview tracking. Update your snippet to set `autoCapturePageviews` to `false`.
1414

1515
```javascript
1616
plausible.init({
@@ -22,20 +22,10 @@ plausible.init({
2222

2323
Once you've added the manual extension, the `pageview` event won't be sent automatically anymore: you'll have to trigger it manually.
2424

25-
To trigger events manually, you need to add the following script after your regular Plausible tracking script:
25+
To trigger your pageview event, call the following javascript function:
2626

27-
```html
28-
<!-- define the `plausible` function to manually trigger events -->
29-
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
30-
```
31-
32-
Once that's done, you can create another script in which you will trigger your pageview event:
33-
34-
```html
35-
<!-- trigger pageview -->
36-
<script>
37-
plausible('pageview');
38-
</script>
27+
```javascript
28+
plausible('pageview')
3929
```
4030

4131
At this point, your pageview events are being triggered just like before, but you haven't defined a custom location yet.

0 commit comments

Comments
 (0)