Liz
Liz

Reputation: 13

Adobe Analytics DTM custom script prop not setting

I am trying to show the last time I made a published change and the current library version

I created a data element Global - Example: return "DTM:" + _satellite.publishDate.split(" ")[0] + "|" + "Adobe:" + s.version;

Then I set a prop to my %Global - Example%.

It doesn't work. So I tried to debug in the console. When console.log("DTM:" + _satellite.publishDate.split(" ")[0] + "|" + "Adobe:" + s.version); it works in the console and I get the the last publish date and the current version of the library. However, it won't work for some reason in dtm.

Upvotes: 0

Views: 302

Answers (1)

Mark Stringham
Mark Stringham

Reputation: 421

Using a Data Element in this case will have an impact on timing.

If you add your code to the Adobe Analytics Custom Code section of a rule or AA Global Code you should be able to set your prop just fine.

s.prop1 = _satellite.publishDate.split(" ")[0] + "|" + "Adobe:" + s.version);

Hope this helps.

Upvotes: 1

Related Questions