DTM passing Data Element names into reporting | Community
Skip to main content
fixepah
New Participant
October 16, 2015
Solved

DTM passing Data Element names into reporting

  • October 16, 2015
  • 2 replies
  • 1996 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by brett_hale

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

2 replies

fixepah
fixepahAuthor
New Participant
October 16, 2015

Anyone with an idea on how to fix?

brett_haleAccepted solution
New Participant
October 16, 2015

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