Skip to content

Commit cb1daf5

Browse files
authored
Update 404 tracking examples (#621)
1 parent 718e8ff commit cb1daf5

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

docs/error-pages-tracking-404.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Your Plausible tracking snippet should be inserted into [the Header (`<head>`) s
4141
Add this code to your 404 page. For instance, if you're using WordPress, your 404 page template will be called `404.php`. It will be located within your theme files.
4242

4343
```html
44-
<script>document.addEventListener('DOMContentLoaded', function () { plausible('404', { props: { path: document.location.pathname } }); });</script>
44+
<script>document.addEventListener('DOMContentLoaded', function () { plausible('404'); });</script>
4545
```
4646

4747
You can place this code anywhere in the `<head>` or `<body>` section of your 404 page template.

docs/google-tag-manager.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ That's it! Now you can go to your website and verify whether Plausible Analytics
9595
5. Create a new GTM Tag called "**Page Not Found Tag**" of type "**Custom HTML**" and paste the following code:
9696

9797
```javascript
98-
<script type="text/javascript">window.plausible("404", { props: { path: document.location.pathname } });</script>
98+
<script type="text/javascript">window.plausible("404");</script>
9999
```
100100

101101
6. Publish all changes.

0 commit comments

Comments
 (0)