PageViews vs manual counted Impressions via Event

I have an issue with counted pageviews. We have a single page application and when it loads we fire a “trackPageView” and directly after that we fire an event which we call “impression”.

The issue is, that we now have 21.000 pageviews but 60.000 counted impressions. I would expect almost same numbers. Does someone have an idea why this gap exists?

We have same problem.

We have a Custom Report to track pageview for specific url (contains string “service”) and an event call “Service views” that fire on pageviews when url contains string “service”.

In a single day, pageviews for each page on Custom Report are 20/30% bigger than “Service views” event.

Hi @fieby, @SimoneF
Are you sure one of your trigger (for the impression / event) isn’t triggered twice or so?

Yes, i am sure.

Furthermore, in this case pageviews should be double, but pageviews evolution graph has same trend in numbers before and after the activation of the event “Service views”.

I noticed that in “segmented visit log” some session fire both (pageviews and event) and other fire only pageviews (not event) but i don’t find significant differences in these sessions.

I don’t understand why sometimes event is trigged and other times no.

Hi @SimoneF
It can depends for example on the actions sequence…
For example in your code, if the event is triggered before the Matomo bootstrap, it could be lost.

Also, I would like to be sure if the custom report is the source of the problem, of if this is due to raw data (then to tracking)
Can you check, with no segment, in page views report and in events reports that the values are different?

Yes, I had already done this check. Page views standard report values and custom report values are the same. Only event values are different.

Hi @SimoneF
Then you mean data of Events reports and events data in custom reports are different?
In this case, which version of custom reports do you use?
Is there a difference each period type? (day, week, month, year…)
Do you use the Hit metric for the event measure in the custom reports?

No, i mean i have three reports that, in my opinion, should show same number:

  • standard report “Behaviour → Pages”
  • Custom report with Dimension “Page Url” and metrics “pageviews”
  • Event report “Behaviour → Pages” defined in tag manager with trigger type pageview

Custom report and Event have same filter on Page Url (e.g. "Page Url contains “moon”).

So, if i consider a specific page (eg ) i expect pageviews across the three reports to be the same, but isn’t.

Standard report and Custom report show same number, Event report number is 20/30% smaller.

Hi @SimoneF

Sorry, I don’t understand what you mean, as tag manager is a tracking mean, and I don’t see the link to the report… How did you built this last report? Is it also a custom report (as you mention a filter)? Can you share its full definition?

Sorry i wrote wrong. Last report is a standard event report:

  • Event report “Behaviour → Events”

Event is defined by tag manager with trigger type pageview anf filter on Page Url (e.g. "Page Url contains “moon”).

Hi @SimoneF
Can you check in the visits log if all moon page view has its associated event?
Which version of Matomo do you use?

As I wrote in a previous message:

So, not all moon page has its associated event, if that’s what you meant.
I use Matomo version 4.15.1

Hi @SimoneF
Then your preblem seems to come from tracking.
Just to be sure, how exactly do you track the page view and also the view event?