Extract Encoded Query Parameters GTM

846 views Asked by At

I'm trying to capture encoded parameters from a redirected URL to a GTM variable. The User gets redirected to a login screen and that redirect causes the encoding.

Here is what the parameters look like after the redirect. ?redirectionURI=https%3A%2F%2Fmedamerica.taleo.net%2Fcareersection%2Fvit_external_clinical%2Fjobapply.ftl%3Fjob%3D76660%26utminfo%3Dutmcsr%3Dsourcetaleocookiesettest%26utmccn%3Dcampaigntaleocookiesettest%26utmcmd%3DMediumtaleocookiesettest%26utmcct%3DContenttaleocookiesettest

Easily I was able to pull that value into a Variable in GTM and is not encoded.

I'd like to be able to pull each parameter into its own variable from that variable. I saw this thread Google Tag Manager - Parse Dynamic Data Layer Variable which looks like it puts me on the path to parse it with a pipe delimiter but want to just put them into its own variable. Am I on the right path or should I go a different rout?

1

There are 1 answers

0
Eike Pierstorff On BEST ANSWER

The URL type variable has, in the "More Setting" tab, a dropdown called "URL Source".

You have already extracted the redirect url into a variable. If you set this variable as the URL Source, you can extract query parameters just like you would from the original URL.

GTM URL type variable