matomo-org / matomo-org/developer-documentation
Update the single-page-tracking tutorial
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 58
- Forks
- 88
- Avg merge
- 6d 3h
- Merged PRs (30d)
- 13
Description
This page is talking about how to use Matomo in SPAs, but it's referring only to hashchange style navigation.
These days, SPAs are almost exclusively using pushState navigation, so it would make sense to update the documentation. The main points are:
- Whenever your app is calling
pushStateorreplaceState, you might want to call thetrackPageViewmethod - Then you probably want to listen to
window.popstateevents and send atrackPageViewmessage as well
Most of the page can stay as it is, I would just replace the bits about hashchange with pushState.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the single-page-tracking tutorial at developer.matomo.org/guides/spa-tracking and review its existing hashchange guidance. Update the relevant sections to cover pushState and replaceState with trackPageView, and popstate events with trackPageView calls. Done means the tutorial accurately explains these SPA navigation patterns while preserving the useful existing content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100