Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

s.products with multiple products

Avatar

Level 2

Hello everyone !
I want to use s.products with multiple products, but I'm a little bit confused in some points.
First of all, can I use same eVars in the s.products string ?

// Example with the same events and evars to different products
s.events = "event1,event2,event3,event4,purchase";
s.products = "Example category 1;Example product 1;3;12.60;event1=1.4|event2=9;eVar1=Merchandising value_1|eVar2=Merchandising value_2,Example category 2;Example product 2;1;59.99;event1=2.1|event2=10;eVar1=Merchandising value_3|eVar2=Merchandising value_4";

If it is correct, may someone explain me, how will be the data stored if I use s.products like these and send it on the single hit ?

Thanks in advance!

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You have 2 products:

  1. Example category 1;Example product 1;3;12.60;event1=1.4|event2=9;eVar1=Merchandising value_1|eVar2=Merchandising value_2
  2. Example category 2;Example product 2;1;59.99;event1=2.1|event2=10;eVar1=Merchandising value_3|eVar2=Merchandising value_4

Firstly, yes, you can -- and are expected to -- use the same eVar dimensions in your s.products string if that is what is required. A simple way to think of this is that you want to track the Product Brand in eVar79, which you've configured as a Merchandising Variable. Product X may be brand ABC, and Product Y may be brand PQR. So you'd want to specify eVar79 in the s.products string and set the values ("ABC", "PQR") appropriately.

Now, let's run a report with Category dimension, Orders metric, event1 metric, event2 metric, event3 metric, event4 metric: (the first data row is the "grand total" row)

Category Orders event1 event2 event3 event4
  1 3.5 19 1 1
Example category 1 1 1.4 9 1 1
Example category 2 1 2.1 10 1 1

"Orders" = 1 in the grand total because you have only one "purchase" event. Similarly for event3 and event4, which I assume are counter events.

event1 and event2 are reported separately for each category, and their values get aggregated in the grand total.

You should be able to work out the resulting report for your Product, eVar1 and eVar2 dimensions now.

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

You have 2 products:

  1. Example category 1;Example product 1;3;12.60;event1=1.4|event2=9;eVar1=Merchandising value_1|eVar2=Merchandising value_2
  2. Example category 2;Example product 2;1;59.99;event1=2.1|event2=10;eVar1=Merchandising value_3|eVar2=Merchandising value_4

Firstly, yes, you can -- and are expected to -- use the same eVar dimensions in your s.products string if that is what is required. A simple way to think of this is that you want to track the Product Brand in eVar79, which you've configured as a Merchandising Variable. Product X may be brand ABC, and Product Y may be brand PQR. So you'd want to specify eVar79 in the s.products string and set the values ("ABC", "PQR") appropriately.

Now, let's run a report with Category dimension, Orders metric, event1 metric, event2 metric, event3 metric, event4 metric: (the first data row is the "grand total" row)

Category Orders event1 event2 event3 event4
  1 3.5 19 1 1
Example category 1 1 1.4 9 1 1
Example category 2 1 2.1 10 1 1

"Orders" = 1 in the grand total because you have only one "purchase" event. Similarly for event3 and event4, which I assume are counter events.

event1 and event2 are reported separately for each category, and their values get aggregated in the grand total.

You should be able to work out the resulting report for your Product, eVar1 and eVar2 dimensions now.

Avatar

Level 2

Thanks for this simple yet insightful explanation on how products variable and metrics correspond to it work.