GTM, Query Strings and Meta Refresh

Viewed 16

I am trying to get a meta refresh added dynamically to a page using GTM.

<script>
var m = document.createElement('meta http-equiv'); 
m.name = 'refresh'; 
m.content = '0;URL='http://google.com?affkey={{affkey}}''; 
document.head.appendChild(m);
</script>

When I use the GTM variable tag I get an illegal use error. When I use just the URL with the 0 timer GTM tells me there is a syntax error.

I am not versed well enough to correct it. Is there any help on this? Or pointers to help me correct it?

Thank you!

0 Answers
Related