1

This is the Custom Html Tag that is in Google Tagmanager:

<script>
 _dAutomationGtmAddTimer("mysite.com", "bh2Ry58My0NWFw==", {"cmp1": 
 visitorContactInfo[0], "cmp2": visitorContactInfo[1], "cart_data":[{"amount":orderFormProducts[quantity],"id":orderFormProducts[sku],"image":"","link":"URL produto","name":orderFormProducts[name],"description":"","unitary_value":orderFormProducts[sellingPrice]}]})
</script>

The second parameter "bh2Ry58My0NWFw==", when injected to the DOM by Tagmanger changes to "bh2Ry58My0NWFw\x3d\x3d", replacing == with \x3d\x3d.

Please, any idea how to prevent this value from changing?

the_storyteller
  • 2,335
  • 1
  • 26
  • 37

1 Answers1

0

Try this approach:

First, create a Constant Variable:

  • Variable name: API key
  • Variable value: bh2Ry58My0NWFw==

Then, modify your Custom HTML tag to look like

<script>
 _dAutomationGtmAddTimer("mysite.com", "{{API key}}", {"cmp1": 
 visitorContactInfo[0], "cmp2": visitorContactInfo[1], "cart_data":[{"amount":orderFormProducts[quantity],"id":orderFormProducts[sku],"image":"","link":"URL produto","name":orderFormProducts[name],"description":"","unitary_value":orderFormProducts[sellingPrice]}]})
</script>
vinoaj
  • 1,600
  • 10
  • 8
  • Hi @vinoaj . It didn't work. I'm working with a e-commerce platform called Vtex, and i'm thinking this might be some security script that's encoding special characters. I'll get in touch with their support team. Thank you very much! – Arthur Penteado Feb 27 '18 at 14:32