Set up attribution through tag manager, not sure if the syntax is right

57 views Asked by At

For a multiple domain site I have set up a way to measure if conversions come through AdWords or E-mail by creating a cookie of the UTM-Medium UTM Tag.

Now this worked nicely on my product pages which I created in seperate tag manager containers. But to save me some time I created a global tag manager container. I used the following the fill in the hidden field with the cookie:

<script>
 document.querySelector(".gfield .gform_hidden").value = "{{Cookie - utm_medium}}";
</script>

I used the DOM element variable with Regex is not null to only fire this tag on the contact page. Since the only unique class on the contact page is: .page-template-template-contact which is on the body I used a class with some large content.

Is the method I used correct? The number of contact conversions seemed to be very low yesterday and I got an error with one of the fields while filling it out on my phone. Desktop was fine though.

The page: https://www.unisgroup.de/kontakt/ note: I have temporarily paused the tags.

0

There are 0 answers