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

Matomo may track a page view even though it was a different request when a plugin was disabled #16569

Closed
tsteur opened this issue Oct 13, 2020 · 1 comment · Fixed by #16570
Closed
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Oct 13, 2020

Say you are using a plugin that sends tracking requests like Form Analytics.

If you disable this plugin, then the tracking code containing Form Analytics may still be cached in some browsers and these clients keep sending form tracking requests. Because the plugin is disabled, no action it would be found to handle this tracking request so it would fall back to tracking a page view even though it isn't a page view. This could result for example in actions being tracked with no action title but the URL where it happened. Of course it would result in more page views.

I suppose there be two ways to fix it:

  1. Have the JS tracker caching set so it always verifies the version the browser has cached is the latest version. Downside: Every user needs to make sure to get caching right plus it may result in additional requests to the server causing more server load plus things get slower in the client.
  2. Only track a page view when action_name tracking URL parameter is set. Downside: Breaking change if someone doesn't send this parameter. Would need to be solved as part of some major release.
  3. Custom request parameter: Require all custom tracking plugins to send an additional parameter and if no specific action was found, ignore that request if that parameter is present.
@tsteur tsteur added the Bug For errors / faults / flaws / inconsistencies etc. label Oct 13, 2020
@tsteur tsteur changed the title Matomo by default tracks page view even though it was a different request Matomo may track a page view even though it was a different request when a plugin was disabled Oct 13, 2020
@tsteur tsteur self-assigned this Oct 13, 2020
@tsteur tsteur added this to the 4.0.0-RC milestone Oct 13, 2020
@tsteur
Copy link
Member Author

tsteur commented Oct 18, 2020

We went with option three, a new request parameter.

Documented in https://developer.matomo.org/api-reference/tracking-api we added a new HTTP Tracking parameter &ca=1. ca basically stands for custom action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant