Expand my Community achievements bar.

SOLVED

set s.products with events in DTM?

Avatar

Community Advisor

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

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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.

View solution in original post

4 Replies

Avatar

Employee Advisor

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

Community Advisor

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

Avatar

Correct answer by
Employee Advisor

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.