Javascript in display logic using Google tags | XM Community
Skip to main content
Question

Javascript in display logic using Google tags

  • August 6, 2024
  • 1 reply
  • 20 views

Forum|alt.badge.img+1

I’m trying to set up display logic which checks that one of my google tags (salesRep) is equal to null. The field is not empty, but null is returned in some cases. I’ve tried setting this up so that my google tag is equal to ‘eval(salesRep === null)’ but have been unsuccessful. Can the display logic feature read Javascript like this? Have I gotten the code itself wrong? 

1 reply

chackbusch
QPN Level 5 ●●●●●
Forum|alt.badge.img+22
  • QPN Level 5 ●●●●●
  • 414 replies
  • August 6, 2024

@aghistolz I would probably implement some JavaScript for a question shown before. This JavaScript sets an embedded data field value based on your requirement. The embedded data can be used in the display logic. 


Leave a Reply