Expand my Community achievements bar.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

DTM passing Data Element names into reporting

Avatar

Level 3

Hello,

I have create numerous data elements based on JS objects on our pages.  When these objects are set with the value "null", DTM passed in the Data Element name into SiteCatalyst.  How do I stop this?  If the value is "null", I'd like DTM to not do anything with that object.  But there is no easy "condition" setup to use.  I am no developer so I can't create a custom script to do it.  That's what DTM is for. 🙂  Any help is appreciated.

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 4

You can use a custom script to get around this.

Replace obj.element with the value in the data element "path" input for the js object.

Replace %dataElement.name% with the actuall name of the data element.

return (obj.element && obj.element != "%dataElement.name%") ? obj.element : '';

I tested this on my server and seems to work as intended.

Brett

View solution in original post

2 Replies

Avatar

Level 3

Anyone with an idea on how to fix?

Avatar

Correct answer by
Level 4

You can use a custom script to get around this.

Replace obj.element with the value in the data element "path" input for the js object.

Replace %dataElement.name% with the actuall name of the data element.

return (obj.element && obj.element != "%dataElement.name%") ? obj.element : '';

I tested this on my server and seems to work as intended.

Brett