Quantcast
Channel: User Karthik T - Stack Overflow
Viewing all articles
Browse latest Browse all 42

When should variables be quoted in GTM custom html tag?

$
0
0

I am trying to implement facebook pixel via GTM, and I am hitting a few oddities.

I am implementing via custom html tag, and If i dont quote the variables, the gtm debugger shows them as google_tag_manager["<ID>"].macro(\'gtm123123123\')in the debugger, instead of the value itself. If i surround the use of the variable with quotes, I see the value itself.

If the {{User Email}} is translated into javascript code as i am seeing, I presume quoting isnt required?

If I need to quote, how would I write code like? em: ({{User Email}} || "").toLowerCase(),

Which is recommended? How to decide?

Also the debugger surrounds the entire tag in a '' is this expected?


Viewing all articles
Browse latest Browse all 42

Trending Articles