Use counter evar or event for numerical product meta data | Community
Skip to main content
Level 2
December 9, 2023
Solved

Use counter evar or event for numerical product meta data

  • December 9, 2023
  • 1 reply
  • 2079 views

I want to store certain values in adobe analytics product string like Available quantity, Price, Discounted/sale price, reviews count, etc. Should these values be stored in counter evars or events.

Best answer by Jennifer_Dungan

I would store them in a standard string eVar personally.

 

Events are counters... just like Page Views, except you are choosing something specific to count... event when you use a "Numeric" event, you are just telling the counter to increment by a specific number. For example, let's say I am using a simple tracking for impressions of recommended content, on page A I have 3 so I would use my numeric event to pass 3 (event1=3), and I have another page that shows 5, so on that page I pass 5 (event1=5)... if I look at my data, my event will show 8 impressions. 

 

Numeric eVars, despite the name, still store the values as text... the real benefit to these is being able to use the +x designation... so let's say I want to track the number of product pages a person visited, but I also want to be able to see on which depths the person add to cart. On my product page I would use eVar1=+1 (the first products will be 1, the second will be 2, etc), but when I correlate my product name to eVar1, I will still see "1" or "2" respectively on the products, and with attribution, if the user adds the product to the cart, I will still see the corresponding "1" or "2". However, the data is still stored as a string... 

 

Neither of the above use cases seem to fit your needs....

 

The big question is, do you only need that information on the Product page, or will you also need it on the Cart page (for multiple products) or on Purchase? If yes, then you will want to use Merchandising eVars and pass them in the Products List notation. Some of these you may want in all places (price, discounted price, available quantity, etc - and these values could change by the time the user is on the cart or making a purchase, so you would need to grab the up-to-date information for each product - you wouldn't want to rely on attribution from when the product was viewed), others you may only need on the product pages (number of reviews, etc - this may change by the time the user is on the cart, or making purchases... but since they can't see if, do you really need it at this point?). 

1 reply

Jennifer_Dungan
Community Advisor and Adobe Champion
Jennifer_DunganCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
December 9, 2023

I would store them in a standard string eVar personally.

 

Events are counters... just like Page Views, except you are choosing something specific to count... event when you use a "Numeric" event, you are just telling the counter to increment by a specific number. For example, let's say I am using a simple tracking for impressions of recommended content, on page A I have 3 so I would use my numeric event to pass 3 (event1=3), and I have another page that shows 5, so on that page I pass 5 (event1=5)... if I look at my data, my event will show 8 impressions. 

 

Numeric eVars, despite the name, still store the values as text... the real benefit to these is being able to use the +x designation... so let's say I want to track the number of product pages a person visited, but I also want to be able to see on which depths the person add to cart. On my product page I would use eVar1=+1 (the first products will be 1, the second will be 2, etc), but when I correlate my product name to eVar1, I will still see "1" or "2" respectively on the products, and with attribution, if the user adds the product to the cart, I will still see the corresponding "1" or "2". However, the data is still stored as a string... 

 

Neither of the above use cases seem to fit your needs....

 

The big question is, do you only need that information on the Product page, or will you also need it on the Cart page (for multiple products) or on Purchase? If yes, then you will want to use Merchandising eVars and pass them in the Products List notation. Some of these you may want in all places (price, discounted price, available quantity, etc - and these values could change by the time the user is on the cart or making a purchase, so you would need to grab the up-to-date information for each product - you wouldn't want to rely on attribution from when the product was viewed), others you may only need on the product pages (number of reviews, etc - this may change by the time the user is on the cart, or making purchases... but since they can't see if, do you really need it at this point?). 

ChiragMaAuthor
Level 2
December 9, 2023

Thanks for your response it's helpful. I did a similar research at my end as well and i think i should use merchandising evar with product and map corresponding value as text string type evar for storing details like price and all. Every page or success event will have its own values at that time so last attribution would work for me. I have a doubt that i get these values as numeric or double in datalayer so is it necessary to convert value or directly mapping it with string type evar in xdm will work.

 

Also, i have certain Boolean values like instock status or backorder status which come as True/False in datalayer. I think this make more sense to be mapped as a custom event and assign 1 or 0 based on value. 

 

Does it make sense or should i go with evars for these type of boolean values and if yes what should be the preferred event type selected in workspace? 

ChiragMaAuthor
Level 2
December 9, 2023

Still go with eVars.. for your in stock / out of stock.. but I wouldn't use 1 an 0, keep it the more "positive" value "true" and "false" (as string), or even to a more readable "in stock" and "out of stock" for how it will appear in your reports.

 

First, you cannot pass a "0" event, and again, events are counters.. in stock and out of stock should be tracked as a dimension (eVar).

 

If you need to do classifications on that eVar later, Adobe has issues with "0"...don't want you to find that out the hard way 🙂


 

I currently get these values as boolean True/False but as you said i will try to map with evar and evaluate result. 

 

Is it mandatory to map evars in string data type only while using xdm data element or i can pass numeric or boolean and workspace will interpret it as string only?