Piwik Pro SPA Tag question

I would like to know the SPA issue.

There is a SPA option in Menu > Administration > Sites & apps > Data collection > SPA.
It mentions that if you notice that a page view is recorded twice on a page load, turn on this setting: Tag Manager > Piwik PRO tag (tracking code) > Other options > Track page views manually.

My questions are

  1. if my website has SPA but I do not turn on the SPA option in data collection tab, is it going to have the session break issue in piwik pro? if yes, then usually the new session will be grouped in which channel?
  2. how can I know if page view is recorded twice on a page load?
  3. Track page views manually, where can I find the custom JavaScript code for SPA for piwik pro?

Hi there. Let me answer your questions:

  1. Could you elaborate? If you disable SPA tracking for a single page application, most likely fewer page views will be recorded unless you set up tracking manually via virtual page view tag template.
  2. You can check it in tracker debugger or in tag manager debugger.
  3. Usually it’s enough if you go with a virtual page view tag together with browser history change trigger.
  1. In GA, if I do not set up properly in GTM for virtual pageview, the session will be broken in the traffic report. For example, within 30 mins by default, if I come from display and once I visit the next page, a new session will start and be grouped into organic search in GA. So my question is, in Piwik pro, is it going to have the same issue if I do not turn on the SPA mode?

No, it should be still one session. We do session stitching either based on cookie id or session id. Both should remain the same for the user, assuming that there’s no more than 30 mins inactivity window between events.

What if I turn on the start a new session when the referrer changes option?

For example, I come from wechat/referral, but I made payment via Paypal, is it possible that the source/medium will switch into paypal/referral, creating 2 sessions in this case?

Yes, but only if you enable this option which is disabled by default.

Thank you Kuba for answering this!