Make JSON usage in piwik.js a bit more stable and reduce conflict with other libraries #11023
Labels
Enhancement
For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Some sites seem to still have problems with errors like
JSON2.stringify is not a function
. We already fixed some compatibility issues with prototype library etc.I think what would make it safer is to no longer use
JSON2
maybe, but instead egJSON_PIWIK
or some similar naming? This prevents the case whereJSON2
is overwritten by another lib at a later point after Piwik is loaded.Then also we could also recognize JSON 3 and prefer usage of
window.json
if defined.The text was updated successfully, but these errors were encountered: