set s.products with events in DTM?

Avatar

Avatar

gokula

Avatar

gokula

gokula

11-07-2019

Hello All,

I'm trying to set s.products with events through the data layer (example below) but it's not working at all.  Can someone please help here.

s.products = ";" + digitalData.#.#.# +";",";";event210=digitalData.#.#.#;

in the above string, I fetching values from the data layer where the color part working correctly but event value is not set.  Are there any issues or any different way?

If any example that will help.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

hyderziaee

Employee

Avatar

hyderziaee

Employee

hyderziaee
Employee

11-07-2019

It is not an automatic pick from the s.products variable. You will need to add the event to the s.event variable through the code.

Also, you just need to pass the event without the numeric value in the event list if you are using s.product variable to send the value.

Answers (3)

Answers (3)

Avatar

Avatar

hyderziaee

Employee

Avatar

hyderziaee

Employee

hyderziaee
Employee

11-07-2019

I can see there is a comma where the quantity should be present

The quotes are not around the string "event210="

Can you try the following:

s.products = ";" + digitalData.#.#.# + ";;;event210=" + digitalData.#.#.#;

The correct syntax for product variable should be

s.products="category;product;quantity;price;event_incrementer;

Avatar

Avatar

gokula

Avatar

gokula

gokula

11-07-2019

Thank you.

Avatar

Avatar

gokula

Avatar

gokula

gokula

11-07-2019

Hi hyderziaee

Thanks for the reply.

It works for me but I'm not able to see events210 in Omnibug Events section.  Please see below

1789038_pastedImage_0.png

But in Events its not appearing

1789039_pastedImage_1.png

Is there something I need to do ? how can I make it available in events210 in both the places ?

Thanks