I activated the url_passthrough
functionality and GTAG adds ?_gl=
param to all links. It works fine, however there are redirects on my site after forms submissions and the _gl
param is lost.
I added functionality to the forms – if the _gl
param exists (as well as gclid
, etc) – add it to the redirected url.
It works fine, however I’ve noticed a specific behavior:
The GTAG originally doesnt encode the _gl
param, so it looks
1*1b9fikp*_up*MQ..*_ga*NjE3OTA3NTk1LjE3MjYzMzA0NzM.*_ga_SDK1NJ9T1B*MTcyNjMzMDQ3Mi4xLjAuMTcyNjMzMDQ3Mi4wLjAuMTgwODM2OTQyMA..
After the redirect, the star symbols is encoded (I use PHP and http_build_query
function):
1%2A1b9fikp%2A_up%2AMQ..%2A_ga%2ANjE3OTA3NTk1LjE3MjYzMzA0NzM.%2A_ga_SDK1NJ9T1B%2AMTcyNjMzMDQ3Mi4xLjAuMTcyNjMzMDQ3Mi4wLjAuMTgwODM2OTQyMA..
Is the value after the redirect the same for Google? How to test it?