Hello,
A few new things to share on this subject! I’ve been able to carry out some experiments with a developer, and these have confirmed that UTM tracking is broken under certain Mac and iOS configurations.
We started by systematically saving parameters in the sessionStorage as soon as the DOM was loaded. The script is deployed directly from the site’s back-office and not from Piwik PRO’s Tag Manager, to run it as soon as possible.
Then, I made sure to store the value of this sessionStorage entry in a custom session dimension. Here’s the JS variable, trigger and tag used:
- Variable (named ‘utm_sessionstorage’ in Tag Manager):
function() { var sessionStorageValue = sessionStorage.getItem('utm_sessionstorage'); return sessionStorageValue || ""; } - Trigger:
- Tag:
I then created a segment that filters sessions to keep only those where this dimension is not empty:
When we apply this segment, we see sessions attached to channels other than ‘Campaign’, which is not normal:
Then, by taking one of the visitor’s ID and checking the session via the session log, we see that UTMs are indeed present in the dimension, but that the source / support is set to direct / direct:
Above all, the vast majority of these sessions are on iOS or Mac. Here are the details of the sessions concerned, with the operating system, its version and the browser and its version:
All these elements point to the removal of URL parameters under certain Mac & iOS configurations. I thought that only advertising identifiers (gclid, fbclid) would be removed by Apple, but this goes beyond that with a total removal… Apparently Windows and Android may also be affected, but to a lesser extent.
We tried to force the reinjection of parameters via a dedicated script that detects when the sessionStorage contains a value, but the URL does not. This script also seems to be blocked…
At this stage, the only solution I can think of would be to use the setCustomUrl command before sending the page view. This would allow the URL to be rebuilt with all the parameters, relying on the sessionStorage when this is filled in, but the URL has no parameters.
What do you think of these observations? I’ve deliberately shared our test method, because I think it would be interesting to carry out this experiment on other sites. Just to confirm.
Thanks in advance.
Have a nice day!





