@Risingson opened this Issue on November 28th 2019

image
seems like actions of a single user are counted as unique visits

@tsteur commented on November 28th 2019 Member

I would suspect this is due to https://github.com/matomo-org/matomo/pull/14360 maybe? Are you using the userId feature?

@Risingson commented on November 28th 2019

You are right i am using the userID on mobile apps. I am sure the mentioned change is related. But still: Triggering an action should not count a unique visit, should it?

@tsteur commented on November 28th 2019 Member

Not sure what you mean? Triggering an action should indeed not create a new unique visit and it doesn't unless your visitors were to regenerate the visitorId on every request somehow. Not sure how you embed the tracking code into your mobile app? It seems your using maybe a different visitorId each time

@Risingson commented on November 28th 2019

I do not intentionally create a new visitorId. I can provide code if you want me to.

@Risingson commented on November 28th 2019

These are 1 initial visit + 2 action calls of the same session counting as 3 visits obviousely.
image

Normally it would look like this and count one unique visit:
image

the only difference between the tracking code implementations of the 2 above is that the mobile one sets a userID.

@Risingson commented on December 3rd 2019

Any news on this ?

@tsteur commented on December 3rd 2019 Member

It really depends how you track your mobile app. Are you using one of our android or iOS SDKs? Then I would create an issue and ask there. If you implemented it yourself, then maybe have a look at the Tracking API docs: https://developer.matomo.org/api-reference/tracking-api . Maybe you need to set the _id parameter

@Risingson commented on December 3rd 2019

So this is intentional behaviour of a minor release that rips functionality provided up until 3.13.
Nice one.

@mattab commented on December 10th 2019 Member

@Risingson Are you using the official Matomo Android SDK? If so, it would be a bug in the SDK and it would be great if you can open a bug report there, or we can move this report to the Android SDK project?
also refs https://github.com/matomo-org/matomo/issues/15242

@Risingson commented on December 10th 2019

I am not using the Android SDK.
It is a mobile app using webviews (html+js>phonegap). I can send the tracking code if you wish.
As stated the only difference within the tracking code between the browser app and the mobile app is that mobile sets a device ID as user ID. _paq.push(['setUserId', device.uuid]);. Such an UserId is visible in the example screenshot above:
image
Still it looks like as if each action is causing a unique visit count.

@tsteur commented on December 10th 2019 Member

Maybe there are issues with cookies and it always regenerates a random visitorId. If it uses the regular JS tracking code in the webview, it should still identify each visitor based on IP and other critieria (although in a mobile app a lot of the criteria be the same). Can you check if you maybe have trust_visitors_cookies enabled in your config file? You may have enabled it since otherwise some visitors are grouped together even though they are different visitors in webview mobile apps.

What you likely want to do is call _paq.push(['setVisitorId', device.uuid]). The unique visitor ID, must be a 16 characters hexadecimal string.

@tsteur commented on December 10th 2019 Member

Also created a PR that might help: https://github.com/matomo-org/matomo/pull/15258

@Risingson commented on December 14th 2019

Glad to hear you are trying to find a way to fix this. I cannot force people to update the apps on their phones...

Powered by GitHub Issue Mirror