Quantcast
Channel: Matomo forums - Latest topics
Viewing all articles
Browse latest Browse all 13970

Allow multiple trackpageview on SPA

$
0
0

@benval wrote:

Hi,

I am not sure what category to put this in, since it is an issue I have. Maybe it should be put in feature suggestions instead.

I am working on a single page application, and I want to track the time spent in the different parts of the page. In other words, I would like to send a new pageview to Piwik, every time the fragments in the URL change.

For the moment I keep track of the fragment changes, using window.onhashchange and it works, but when I try to send a new trackPageView request to Piwik nothing happens (is registered).

My problem is similar to the one described in this post (https://forum.piwik.org/t/how-to-force-a-second-trackpageview/4670 ), but back then it was resolved using synchronous tracking instead of asynchronous tracking. If my understanding is correct, that is no longer possible since synchronous tracking was deprecated (https://github.com/piwik/piwik/issues/8246)

With GA it is possible to use something called Autotrack, to track the fragment changes and send a new pageview.
Is there anyway of sending multiple pageviews from one page and have them registered in Piwik?

Thanks,
Benjamin

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 13970

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>