Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect when the website is a Single Page App (SPA) or a Progressive Web App (PWA) and link to the relevant guide #18066

Closed
mattab opened this issue Sep 27, 2021 · 4 comments · Fixed by #18827
Assignees
Labels
c: Onboarding For issues that make the experience of getting Matomo up and running better. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Sep 27, 2021

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. SKIP (out of scope) Product improvement: Similarly to Improve no data tracked yet please set up tracking code screen #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 🙈

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

@mattab mattab added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. c: Onboarding For issues that make the experience of getting Matomo up and running better. labels Sep 27, 2021
@tsteur
Copy link
Member

tsteur commented Sep 27, 2021

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
Copy link
Member Author

mattab commented Sep 27, 2021

Sounds good to keep this one issue and ignore step 1 👌

@tsteur tsteur added the Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. label Sep 27, 2021
@tsteur tsteur added this to the 4.8.0 milestone Sep 27, 2021
@tsteur
Copy link
Member

tsteur commented Jan 13, 2022

Goal:

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

To be done in this step:

  1. Improve this guide at https://developer.matomo.org/guides/spa-tracking to make it clear it also caters to PWA. If the guide cannot be reused, we need to create 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/ or cover this in a new page. To be looked also how else they differ.

  2. Add a new section "Single Page App (SPA) and Progressive Web App (PWA) to the "Other ways" tab in the "No data screen".

The same content also needs to be added to: The email that we send for "tracking code".
The same content also needs to be shown on the "SitesManager -> Tracking code" page.
It may also be needed in the installation where we show tracking code?

@peterhashair
Copy link
Contributor

Still need this docs to review matomo-org/developer-documentation#614

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Onboarding For issues that make the experience of getting Matomo up and running better. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants