@JE4GLE opened this Issue on July 29th 2021 Contributor

I set the PageViewId in the JavaScript tracker using the new feature in this pull request: https://github.com/matomo-org/matomo/pull/17655
This is discussed in the follow issue: https://github.com/matomo-org/matomo/issues/16942

When I for example hardcode the PageViewId, I get multiple PageViews. Even if they have the same PageViewId!

Expected Behavior

When two or multiple tracked PageViews have the same PageViewId, they should only be counted as one visit.

Current Behavior

Every tracked PageView gets counted as an individual PageView, even having the same PageViewId.

Possible Solution

Count PageViews with the same PageViewID as one PageView.

Steps to Reproduce (for Bugs)

_paq.push(['setPageViewId', "563adi"]);

Reload page multiple times.


I'm trying to merge the PHP tracker and JavaScript tracker. Everything possible will be tracked by the PHP tracker, then the generated PageViewId will be passed on to the JavaScript tracker. This will track the rest, like browser features or screen resolution.

Your Environment

  • Matomo Version: 4.4.0
  • PHP Version: 7.3
  • Browser: Safari 15
  • Operating System: macOS 12.0
@tsteur commented on July 29th 2021 Member

@JE4GLE from our side this is currently expected behaviour. The same page view ID can be tracked multiple times currently. Defining the pageview ID was mostly meant for being also able to track performance client side while you track the page view server side.

In your tracking code you probably will want to remove "trackPageView" call and replace it by enableHeartBeatTimer. This should probably make it work for your use case to track the page view server side, and the "ping" request from the heart beat timer should eventually send the performance data.

@JE4GLE commented on August 4th 2021 Contributor

I will try removing trackPageView to track the performance, thank you! Does this also track plugin information?

@tsteur commented on August 4th 2021 Member

@JE4GLE I believe it doesn't track plugin information as this data is currently only tracked on the first tracking request within a visit which would be likely your server side "track pageview"

Powered by GitHub Issue Mirror