# Can't seem to get simple Page View tracking right

**URL:** <https://community.piwik.pro/t/cant-seem-to-get-simple-page-view-tracking-right/695>\
**Category:** Data collection and tags\
**Created:** [June 2, 2022, 8:10pm UTC](https://community.piwik.pro/t/cant-seem-to-get-simple-page-view-tracking-right/695 "2022-06-02T20:10:29Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![robin.astle](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/robin.astle/32/441_2.png) [@robin.astle](https://community.piwik.pro/u/robin.astle)\
**Post date:** [June 2, 2022, 8:10pm UTC](https://community.piwik.pro/t/cant-seem-to-get-simple-page-view-tracking-right/695/1 "2022-06-02T20:10:29Z")

</div>

We have a react site (not SPA) with quite some dynamic content on the pages.  
Out of the box this results in a lot of duplicate page view events being logged, we managed to bring it down by setting stuff to manual and using the react integration to push a pageview event manually.

However we still get automatic page view events being pushed towards piwik. What am I doing wrong ☹ ?

---

<div class="post-metadata">

**Author:** ![Admin](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Admin](https://community.piwik.pro/u/Admin)\
**Post date:** [June 2, 2022, 8:20pm UTC](https://community.piwik.pro/t/cant-seem-to-get-simple-page-view-tracking-right/695/2 "2022-06-02T20:20:27Z")

</div>

Most likely you have [this setting](https://help.piwik.pro/support/collecting-data/how-to-track-a-single-page-application/) enabled. You don’t need it if all the events are controlled manually. 🙂 Also, those additional events might be created by a full page reload since the Piwik PRO tag in tag manager tracks by default the page view. Of course, that also can be disabled.

---

<div class="post-metadata">

**Author:** ![robin.astle](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/robin.astle/32/441_2.png) [@robin.astle](https://community.piwik.pro/u/robin.astle)\
**Post date:** [June 3, 2022, 6:50am UTC](https://community.piwik.pro/t/cant-seem-to-get-simple-page-view-tracking-right/695/3 "2022-06-03T06:50:31Z")

</div>

We’ve played around with the SPA setting but it’s currently not enabled yet we see automatic triggers happening.

For full context: the piwik code snipped is injected through this gatsby plugin: [gatsby-plugin-piwik-pro | Gatsby (gatsbyjs.com)](https://www.gatsbyjs.com/plugins/gatsby-plugin-piwik-pro/)

---

<div class="post-metadata">

**Author:** ![robin.astle](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/robin.astle/32/441_2.png) [@robin.astle](https://community.piwik.pro/u/robin.astle)\
**Post date:** [June 3, 2022, 7:00am UTC](https://community.piwik.pro/t/cant-seem-to-get-simple-page-view-tracking-right/695/4 "2022-06-03T07:00:47Z")

</div>

![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/176c55ca7bc92200791eee5d2cc6ecc282587358.png)  
Also I noticed that the automatically triggered event is sending different data (or at least logging stuff differently in the console).  
I was thinking we could maybe use some trigger to filter out the automatic one but I can’t seen to target the manually send one as this only has a title which I can’t target in a trigger as far as I know.

---

<div class="post-metadata">

**Author:** ![robin.astle](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/robin.astle/32/441_2.png) [@robin.astle](https://community.piwik.pro/u/robin.astle)\
**Post date:** [June 3, 2022, 7:02am UTC](https://community.piwik.pro/t/cant-seem-to-get-simple-page-view-tracking-right/695/5 "2022-06-03T07:02:26Z")

</div>

How can we disable the default page view tracking?

---

<div class="post-metadata">

**Author:** ![Admin](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Admin](https://community.piwik.pro/u/Admin)\
**Post date:** [June 3, 2022, 7:37am UTC](https://community.piwik.pro/t/cant-seem-to-get-simple-page-view-tracking-right/695/6 "2022-06-03T07:37:58Z")

</div>

Main menu → Tag Manager → Tags → Piwik PRO tag

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/47819ba470a36bceb5f5d7e4e713cef892a19aed.jpeg)

You can also use the [Tag manager debug mode](https://help.piwik.pro/support/tag-manager/debug-mode/) to check which tags are firing.

---

<div class="post-metadata">

**Author:** ![robin.astle](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/robin.astle/32/441_2.png) [@robin.astle](https://community.piwik.pro/u/robin.astle)\
**Post date:** [June 3, 2022, 8:03am UTC](https://community.piwik.pro/t/cant-seem-to-get-simple-page-view-tracking-right/695/7 "2022-06-03T08:03:15Z")

</div>

Unfortunately that is enabled, yet we see automatic logging of page views as per my previous screenshot.  
Looks like a bug .

---

<div class="post-metadata">

**Author:** ![robin.astle](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/robin.astle/32/441_2.png) [@robin.astle](https://community.piwik.pro/u/robin.astle)\
**Post date:** [June 3, 2022, 8:18am UTC](https://community.piwik.pro/t/cant-seem-to-get-simple-page-view-tracking-right/695/8 "2022-06-03T08:18:01Z")

</div>

In debug mode it shows only 1 tag being fired.  
However in the console we see 2 entries (see above screenshot)  
And in the tracker debigger we also see 2 entries:

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/a4dc2c7b3ee3abceb4d76ed7bda0a35a2f025cd5.png)

---

<div class="post-metadata">

**Author:** ![robin.astle](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/robin.astle/32/441_2.png) [@robin.astle](https://community.piwik.pro/u/robin.astle)\
**Post date:** [June 7, 2022, 10:31am UTC](https://community.piwik.pro/t/cant-seem-to-get-simple-page-view-tracking-right/695/9 "2022-06-07T10:31:03Z")

</div>

I figured out the ghost loggings… the gatsby plugin we use to inject the react dependency on our site is actually doing more, it’s also firing a manual pageView event which in our case is being hit at the wrong moment.  
We’ll probably either make our own gatsby plugin or ask the author of this to fix this 🙂  
[gatsby-plugin-piwik-pro/gatsby-browser.js at main · leevi978/gatsby-plugin-piwik-pro · GitHub](https://github.com/leevi978/gatsby-plugin-piwik-pro/blob/main/gatsby-browser.js)

Thanks @Admin for your insights it did really help to solve things, we’ll get there.

---

<div class="post-metadata">

**Author:** ![Admin](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Admin](https://community.piwik.pro/u/Admin)\
**Post date:** [June 7, 2022, 10:59am UTC](https://community.piwik.pro/t/cant-seem-to-get-simple-page-view-tracking-right/695/10 "2022-06-07T10:59:34Z")

</div>

Great that you figured it out. 🙂 Thanks for the link - I’ll forward it to our integrations team and maybe together with the author we’ll be able to make it more usable. 🙂
