Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Analytics Champion Program are open!

Segment for range

Avatar

Level 4

Hi everyone, I have a price dimension. Which , I want to make it in a rand through segment.

Like eVar with values between 1000  to 4000.

Can anyone tell me, how we can achieve this through segment ?

 

 

4 Replies

Avatar

Community Advisor

So this one is a bit complicated... eVars store values as text, so you can't just say "greater than and equal to 1000" and "less than and equal to 4000"... and unfortunately you can't use regex directly in segments...

 

But what you can do is create a classification on your eVar, and use Classification Rule Builder to use Regex to identify your numbers.. now, trying to do number regex can be complex, but there are lots of help online...

 

Now, depending on future needs, you might want to identify a true or false based on that specific range, or if you will be doing different ranges, you might want to bundles into groups of "thousands" (ie.. 0-999 classified as "<1K", 1000-1999 classified as "1K", 2000-2999 as "2K", etc).. then in your segment you can say something like 

 

eVar Classification equals "1K"

OR

eVar Classification equals "2K"

OR

eVar Classification equals "3K"

 

If you also need to include specifically "4000" which the above wouldn't cover, you could create a second classification that would only be for the specific "1000", "2000", "3000", "4000", etc values, something like "even 1K", "even 2K", etc...

 

Then you could add that "4000" upper limit as:

 

 

eVar Classification equals "1K"

OR

eVar Classification equals "2K"

OR

eVar Classification equals "3K"

OR

eVar EVEN Classification equals "even 4K"

 

Basically you can use multiple classifications to break down your values into groups, then build your segment based on those groups....

 

 

The big downfall of this, is that Classifications are processed every 4-6 hours, so you can't use it on really new data, but if you are looking at "Yesterday", or "This month (excluding today)" or any past date ranges you should be good... but with the Rule Builder, the backwards processing will only go back up to 6 months.. so if you are trying to pull for a year this could be a problem...

 

I have heard that the classification importer doesn't have this limitation, but I haven't used it (since I never had a large enough data set to make it worth my while)... I tend to stick to the Rule Builder.

Avatar

Level 4

Thanks Jennifer,

Okay, So it's bit complicated.

 I'll try this or else I'll try to do the coding and should fire a separate eVar but for the old data.,

Actually, My use case is to segment data based on price band, age band .

Avatar

Community Advisor

Right, my examples were obviously simplified... If you are doing "an Age Range", let's use 31-40 as an example, you could just do:

 

Age equals 31

OR

Age equals 32

OR

Age equals 33

OR

....

Age equals 40

 

 

It's not too onerous to list out 10 items... if you are dealing with values in the thousands and tens of thousands, forget it, you aren't going to build those one value at a time.... which is where the regex would come in.

 

You are right, you could just add a new dimension (eVar) that would track the range.. but if you change your ranges (let's say you build for 0 - 2000, and 2001 - 4000, and 4001+... and then they want to change the ranges to 0 - 5000, 5001 - 10000, 10000+... you have to start all over again.

 

You could also use Classification Rules to actually build for specific ranges... it doesn't need to be split out the way I showed... what I showed would be scalable to different range requests simultaneously... so you could have 1 report with Range A, and another report with Range B (using differently built ranges off the same data set)... or you could just create multiple range classifications (if you can name them uniquely enough to know which one to use, something like "2K ranges", "5K ranges", etc)

 

Since I wasn't sure of your business model or needs, I can't say which is the best way to go....

Avatar

Community Advisor

My answer could not be helpful in this case. But my suggestion is always to use metrics for capturing numeric values. So you can freely create segments with different types of range, and perform calculations, and there are a lot more custom metrics to use than dimensions.

Information like income range and age range could be tricky as we may not be able to capture exact value due to sensitivity. Range labels could only be tracked into a dimension which is not comparable. However, you may also codify ranges in a natural order and track it into a custom metric, such as 0 for age 0-10, 1 for age 11-30, 2 for age 31-50... then you can still able to use numeric comparison to create custom segments with great flexibility.