@mattab opened this Issue on September 27th 2021 Member

Currently, it's hard for people who build SPA or PWA to find the relevant help page and instructions on how to setup Matomo tracking for SPA / PWA.

Suggested steps:

  1. Product improvement: Similarly to https://github.com/matomo-org/matomo/issues/16787 where we currently detect if the "Tracked Website URL" is a WP site, or a drupal site, etc. we could also try and detect if the website/webapp is using an SPA framework or PWA framework, and if so, link people to the developer guide at https://developer.matomo.org/guides/spa-tracking
  2. Add a new section "Single Page App (SPA) and Progressive Web App (PWA) to the "Other ways" tab in the "No data screen" (see screenshot below)
  3. (could also be covered in a separate issue maybe:) Possible documentation improvement: could this guide at https://developer.matomo.org/guides/spa-tracking be improved to make it clear it also caters to PWA? or would the instructions be slightly different and we would need a new section, or even a new page? For example PWA seem to require service workers, and are interested in offline availability, so maybe we could cross link to https://matomo.org/faq/how-to/how-do-i-set-up-matomo-offline-tracking/

Once completed this work should help prevent feedback like the one we just received today: utterly useless for the world of SPAs and PWAs :see_no_evil:

Screenshot from 2021-09-27 17-53-00

@tsteur commented on September 27th 2021 Member

Doing step 2 and 3 sounds fairly easy and we could do that one for now and ignore step 1. For step 3 indeed the guide would need to be changed and it';s generally also a bit more work. We could get away though maybe by mentioning PWA and linking to the offline tracking guide.

@mattab did you maybe want to create a separate issue for these 3 different things or at least for step 1 as that's a bit more work and we won't be doing that one anytime soon likely vs step 2 and 3 is quite quick to do and we might work on it. Or we don't create a new issue and just ignore it for now.

Re step 2) be aware we're also sending instructions for these different tracking techniques by email in plugins/SitesManager/templates/_trackingCodeEmail.twig and on the tracking code page we could mention it as part of the introduction in the JavaScript tracking card.
image

@mattab commented on September 27th 2021 Member

Sounds good to keep this one issue and ignore step 1 :ok_hand:

Powered by GitHub Issue Mirror