yab86
yab86

Reputation: 405

GTM - Get undefined value for Click URL variables

My click url looks like

<a href="https://myurl.com/api/public/exports/56555?productCodes=356.585.666&culture=en-US">Download</a>

I always get undefined for the two variables productCodes and culture in GTM.

Setup in GTM:

I added two user-defined variables in GTM - productCodes and culture. Example variable culture: enter image description here

After that, I created a trigger "Click - Just Links" and finally a tag: enter image description here

And here is what I get in the preview: enter image description here

I would like to get the 356.585.666 as productCodes and en-US as culture. What am I doing wrong?

Upvotes: 0

Views: 656

Answers (1)

zborovskaya
zborovskaya

Reputation: 1143

By default Google Tag Manager uses URL of the current page as the source of the URL value.

https://support.google.com/tagmanager/answer/7683362

You should choose built-in variable Click URL as a URL Source in your custom variable:

enter image description here

Upvotes: 2

Related Questions