Hi
I have a question about merchandising evar. i want to implement a merchandising evar (evar100) and i would like to know what kind of separator can i use to separate different value in the same evar. to explain, my evar100 will contain 2 different values for the same product (evar100 = x,y) what separator can i use to separate those variables without breaking sproduct structure ?
Thank you in advance.
Have a nice weekend
Rim
Solved! Go to Solution.
Views
Replies
Total Likes
I believe you make reference to the Merchandising eVar using product syntax: https://experienceleague.adobe.com/docs/analytics/components/dimensions/evar-merchandising.html?lang...
// This merchandising eVar uses conversion variable syntax, and counts an instance. // However, if the binding event and products variable are not both set, the instance attributes to "None". s.eVar1 = "Tower defense"; // This merchandising eVar uses product syntax, and does not count an instance. s.products = "Games;Wizard tower;;;;eVar2=Tower defense";
So based on this you need to make sure to avoid any character that are used in the s.products syntax:
avoid:
If you are using conversion variable syntax this does not really matter
Since you are setting a new evar s.product info should not be affected all its components will capture as is.
The new evar in such situation where you basically want to add multiple extra variables, I do the following.
In your page code setup a string object. let id be dynamically populated by "x" and "y" variables. Since you are creating a string variable the contents can be what ever is easier for you.
can then be "," or "|" basically whatever delimiter makes your reporting easier.
One thing to remember is evar setting is important so if there are multiple products potentially viewed make sure you have a logic where next product overwrites the previous etc. So evar can follow users behaviours page to page even in same session.
GLTU
I believe you make reference to the Merchandising eVar using product syntax: https://experienceleague.adobe.com/docs/analytics/components/dimensions/evar-merchandising.html?lang...
// This merchandising eVar uses conversion variable syntax, and counts an instance. // However, if the binding event and products variable are not both set, the instance attributes to "None". s.eVar1 = "Tower defense"; // This merchandising eVar uses product syntax, and does not count an instance. s.products = "Games;Wizard tower;;;;eVar2=Tower defense";
So based on this you need to make sure to avoid any character that are used in the s.products syntax:
avoid:
If you are using conversion variable syntax this does not really matter
Hi Alxis, thank you for your answer. if i understood correctly, i have to avoid "|", ";" and "," .
i will use an other kind of separator maybe "+" to combine my data on this merchandising evar.
Have a nice day.
Rim
I was going through the documentation of s.products today and I found the official part that explains what not to include in s.products:
Strip all semicolons, commas, and pipes from product names, categories, and merchandising eVar values. If a product name includes a comma, AppMeasurement parses it as the start of a new product. This incorrect parsing throws off the rest of the product string, causing incorrect data in dimensions and reports.
So it aligns to what I advised .
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies