Has anyone run into issues with Google Analytics 4 adding _gl to URLs that break links to section headers?
#7617
-
|
We have GA4 in our docs using a script in a custom.html partial override per the docs. We have a script that pushes links to a Khoros product, but when users click the links there, it appends For example,
becomes:
I'm 99% sure this is a conflict with the script on the Khoros system stopping event propagation before it reaches the document node (and I apologize for posting about it here), but I'm doing my due diligence to confirm if others have run into similar issues with a MkDocs-Material and Google Analytics configuration. TL;DR: Have y'all run into any issues with GA4 appending gobbledygook that prevents links to section headers? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
Hello @rachel-rigdon-sp, |
Beta Was this translation helpful? Give feedback.

The GA script appends the
_gland it should be responsible for the proper usage of either&or?, so I would look for a resolution at the source where this parameter is added.Maybe some custom script adds/removes parameters to the URL and this happens after the GA script "decides" what separator to use.
So initially there is
URL/?someValue=123, then GA detects there are params, then your script removes the?someValuetogether with the?separator and then GA adds the&_glbecause it didn't check the URL again before adding the new param 🤔So probably "that's a question for Khoros and Google", as it's hard to guess what could be causing the issue.