May potentially be related to #6270
trackPageViewis not called on the search page since
trackSiteSearchis already being called
// We recommend not to call trackPageView() on the Site Search Result page
The steps to reproduce this issue
The above steps will result in more content interactions than content impressions for the content block that is interacted with.
I believe the issue emanates from the fact that on back navigation, all content impressions are not registered in Piwik even though a call is made via
trackAllContentImpressions, because a call to
trackPageView is not made to force Piwik to register the impressions?
As per Content Tracking section:
We won't send an impression of the same content block twice if you call this method multiple times unless trackPageView() is called meanwhile. This is useful for single page applications.
After a bit of further investigation, it does not seem that failure to call
trackPageView is the cause of this issue. Manually, adding a call to
trackPageView still allowed reproduction of the issue
I had a quick look in the code... while impressions may be only tracked once within a pageview, an interaction may be tracked multiple times from what I see. Basically what you want would be maybe "Unique Impressions" and "Unique interactions"?
See https://github.com/matomo-org/matomo/issues/6272 where I explained behaviour.
Also in the code I'm seeing that an interaction could be tracked without an impression being tracked I think. See https://github.com/matomo-org/matomo/issues/6270
Thanks for taking a look @tsteur . I think a primary issue here is when i navigate back to the page containing content impressions, and
trackAllContentImpressions is invoked via
, this new call is not reflected in Piwik. i.e. the impressions count is not incremented.
However, clicking on any content block immediately increments the count for that content block's
trackAllContentImpressionswill be ignored even after
created https://github.com/matomo-org/matomo/pull/14002 re