Highlighted

DTM - How to update a pre-defined Data Element

michael_johns_6

15-10-2015

I can't figure out how to dynamically update a pre-defined data element? For example if you are capturing onClick a custom HTML-5 attribute ('data-analytics-tracking-name') value and you want to update a pre-defined data element ('custom link name') with that new value? I can do it with a dynamically created data element as per below but not with a pre-defined data element?


var linkName = this.getAttribute('data-analytics-tracking-name');
_satellite.setVar('custom link name', linkName);
return true;
 

Replies

Highlighted

shekhardhiman

Employee

15-10-2015

Hi There,

Thanks for reaching out to Adobe Community.

Please go through the below mentioned Data Elements doc to see how to work with data elements:

https://marketing.adobe.com/resources/help/en_US/dtm/data_elements.html

Thanks!

Highlighted

michael_johns_6

15-10-2015

Hi,

Please re-read my question as it is very specific and the document you pointed me to does not answer my question. I have scoured the web and can't find an answer yet?

 

Thanks,

Michael

Highlighted

Rahsing

15-10-2015

Hi Michael,

One way you could go about this is by creating a dynamic data element and then setting a default value into it (when you create that data element).

Once the element is created, you can reference it in your code when you need to.

Please let me know if this helps

Regards

Rahul