Expand my Community achievements bar.

Join us January 15th for an AMA with Champion Achaia Walton, who will be talking about her article on Event-Based Reporting and Measuring Content Groups!
SOLVED

Capture numerical dimensions

Avatar

Level 3

Hi.

 

We have a client in which we are trying to do the following:

 

We aim to utilize data acquired from an object stored in local storage for segmenting purposes in Adobe Analytics. The challenge lies in the fact that when this data is captured into an eVar it's treated as strings, making it difficult to create the desired segments based on numerical criteria.

 

Our objective is to collect this data in formats such as integers, floats, or dates to enable more precise segmentation within Adobe Analytics. For example, we'd like to capture the "numberOfOrdersPlaced" as an integer so that the client can create segments as follows:

 

Segment | numberOfOrdersPlaced (0-9)
Segment | numberOfOrdersPlaced (10-19)
Segment | numberOfOrdersPlaced (20-29)

 

When I try to create such segments I don't have operators that allow that:

 

Ricardo33_0-1695151226595.png

 

Is it possible to do it, or is there a workaround that I can use so that the client can create these segments?

 

Thank you.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

As you've discovered, all dimensions (props, eVars, etc) are always stored as strings. That is just how Adobe Analytics has been built, and there is no way around it. Even a date that you track as "2023-09-19" will get interpreted by Adobe Analytics as the string "2023-09-19" and not the date 19 September 2023.

However, for your particular use case, you could consider building a classification off your eVar values to group the numbers accordingly. Classification Rule Builder has regular expression matching, so you could match ^[0-9]$ and get the classified value "numberOfOrdersPlaced (0-9)". Then, use that classified value to build your segment.

View solution in original post

2 Replies

Avatar

Community Advisor and Adobe Champion

Why are you trying to use a dimension instead of just using an event?

 

For "Orders", you can use your standard Orders metric like so:

Jennifer_Dungan_0-1695161199268.png

 

 

Now, if you need something other than a counter (i.e. incrementing 1 at a time), you can create a custom event and set to Numeric:

Jennifer_Dungan_1-1695161394695.png

 

 

And set the value during tracking like:

s.events = "event1=2.5" 

or 

s.events = "event1=10"

 

This would increase event1 by 2.5 or 10, etc.

 

 

However, Date formatting cannot be done at this time...  There is a datetime stamp on every hit (this is what drives the year, month, week, day, hour, minute, etc data in the standard dimensions).. but if you need to store something like a "publishing date" or something like that, there really isn't an easy way to solve for this...  In theory, depending on what your end goal is, you could try to store the date in such a way that you could maybe use classifications to process the data?

Avatar

Correct answer by
Community Advisor

As you've discovered, all dimensions (props, eVars, etc) are always stored as strings. That is just how Adobe Analytics has been built, and there is no way around it. Even a date that you track as "2023-09-19" will get interpreted by Adobe Analytics as the string "2023-09-19" and not the date 19 September 2023.

However, for your particular use case, you could consider building a classification off your eVar values to group the numbers accordingly. Classification Rule Builder has regular expression matching, so you could match ^[0-9]$ and get the classified value "numberOfOrdersPlaced (0-9)". Then, use that classified value to build your segment.