_gl and _ga parameters being appended to URLs
Recently, we found that few customers are experiencing strange parameters being added to sub-sequent URLs. They include _gl and _ga_ that are being appended to every URL that the visitor clicks on the site.
These parameters are typically linked to Google Analytics 4 and Cross-domain tracking in particular. These are required parameters for cross-domain tracking because they transport session data between domains which can't be done using cookies. If you have cross-domain tracking enabled then these parameters must be present.
However, if you don't have cross-domain tracking enabled and still see the _gl and _ga_ parameters, then this could be due to something else. If you ssee these _ga / _gl parameters when consent mode is properly configured and cross-domain tracking isn't enabled, then check these:
1. If you use Google Tag Manager, check if you have a legacy UA tag and if cross-domain tracking is enabled for this tag.
This option is typically located in tag's options under More settings -> Cross Domain tracking
2. Check if you have a Conversion Linker tag and disable linking across domains
The linker object typically listens for clicks on links to destination domains, and it will automatically add a linker parameter to the URLs of those links. There is an option there called Enable linking across domains. If enabled, it will add the _gcl, _ga, gl parameters to URLs
3. Conversion Linker Enable linking on all page URLs option
If you have 'Enable linking on all page URLs' option checked in Conversion liner, then you need to have a proper Google Consent Mode V2 integration, incorrect Consent Mode V2 signals ad_storage and analytics_storage can cause random _gl /_ga paramaterers append to URLs.
If these signals are 'denied', cross-domain parameters may get passed with the URL.
Using a right solution for GDRP/Consent Mode V2 could get this sorted.