I am trying to use currency event in my site and want to capture same using DTM. But in DTM, I could not locate any option to set currency event. Can someone please help me on this.
Here is my scenario: Let's say, I have a Javascript on the page code as:
var digitalData = { 'Amount': 1000 }
Then in DTM data element, can this numeric value be passed, by writing this in the Path: 'digitalData.Amount' (after selecting 'Type' as JS Object in Data Elements)
Also, even if we capture this information in Data Element, how do I set this value in any currency success event (for eg event20) in the page load rule section in DTM ? Do I have to write any custom script for that ? If yes, please give me some example, how to do it.
Thanks in advance, Adi
Yes, you can set a data element just how you said - assuming that digitalData
is a globally scoped variable, available when DTM evaluates data elements. If it is not, then the data element won't be set.
That aside, DTM currently only lets you set s.events
with a regular event. It does not let you do currency or numeric event syntax. In order to do this, you will need to open up the custom code section and set s.events
yourself, and you can use _satellite.getVar('data_element_name')
to reference the data element (replace data_element_name
with the name of your data element).