AmazingDreams / vue-matomo

Vue plugin for Matomo Analytics
MIT License
282 stars 61 forks source link

Automated tracking #76

Closed KyreusR closed 4 years ago

KyreusR commented 4 years ago

Is it possible to disable any automated tracking done by vue-matomo?

We have multiple vue components where we only want to track some button clicks. But even with trackInitialView: false vue-matomo sends a request when the page gets loaded. Is there a way to disable this behavior?

jordan-boyer commented 4 years ago

Can you tell me what kind of request is made ?

KyreusR commented 4 years ago

A get request with the given trackingUrl and as action_name the the content of the title node of the html file.

jordan-boyer commented 4 years ago

If it's a get it's normal, this do not track the user but only download the resources to do so eventually.

AmazingDreams commented 4 years ago

I think you can use this config:

  router: undefined, // Or simply omit, disables navigation event tracking
  enableLinkTracking: false,
  trackInitialView: false, // You stated you are already doing this

If possible can you provide the config you are using?

KyreusR commented 4 years ago

I am currently using this config: { host: '', siteId: 36, trackerFileName: 'piwik', trackerUrl: '', enableLinkTracking: false, router: undefined, trackInitialView: false, debug: true, preInitActions: [] }

I don't think this request is "normal" because it shows as action on the matomo webinterface. And we only want it to show on the webinterface, when someone presses a button and not when navigating to that page.

AmazingDreams commented 4 years ago

Hmm weird, I'll see if I can set up a reproduction

KyreusR commented 4 years ago

Hey again, I just wanted to let you know, that we found our issue and it was as expected not on your end. In the one component where the initial trackPageView request got sent was still an old js file included. This one hat an own instance of matomo declared and did the trackPageView manually. We've removed the import and now everything works fine.

Sorry for wasting your time.

AmazingDreams commented 4 years ago

Ah cool, don't worry about it. I hadn't really gotten around to more than a quick change of the options, so it's fine. Thanks for getting back!