Page MenuHomeMiraheze

The method disableCookies is registered more than once in "_paq" variable
Closed, ResolvedPublic

Description

Seeing this "The method disableCookies is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Matomo trackers documentation: https://developer.matomo.org/guides/tracking-javascript-guide#multiple-piwik-trackers" in the console.log.

Event Timeline

Paladox triaged this task as Normal priority.Oct 7 2022, 20:24
Unknown Object (User) added a comment.Oct 13 2022, 06:35

I dont think this is an issue with the extension, but Matomo itself, as it definitely isn't defined twice within the extension.

Is this a huge issue or something quite minor?

Reception123 lowered the priority of this task from Normal to Low.Jan 11 2023, 19:22

Triaging as low as there doesn't seem to be a huge effect because of this.

Is this a huge issue or something quite minor?

Minor, see P479. Basically the code is being repeated twice.

If I had to guess, MatomoAnalyticsHooks::matomoScript, a function listening to the SkinAfterBottomScripts hook, is being called twice, for some bizarre reason most likely.

<s>I've narrowed it down to the string. I've made a stand-alone script and am getting the same error as the extension.</s>

Forget the above, it was because of using var_dump in my script. No problems with the string in PHP 8.0.27.

OrangeStar assigned this task to Unknown Object (User).
Unknown Object (User) added a comment.Jan 29 2023, 17:20

My local test shows it fixing it also. Interesting that here it didn't and made it disappear completely. Anyway, thanks!