Segmentation in Adobe Analytics – part 2

This is the 2nd post about the Adobe Analytics segmentation part I try to cover. I hope you enjoyed the first one and it could explain you the reason behind some strange situations with Adobe Analytics segments. Part 1 here.

This part will be focus on sequential segmentation and segment compatibility, at the end I will give you some tips regarding segment creation.

Sequential Segments are not evaluated the same way

Adobe Analytics provide the possibility to create sequential segments.
One first thing to know is that you can only create sequential segments for Visit and Visitor based segment only.

This limitation makes sense because a sequence can only be considered if there is more than one hit considered. You may think that the segment may return all the data if my condition is broad enough, so why not having sequential segmentation there ? It is because Hit based segments are evaluating each Hit independently from each others.
The logic applied here is not the same.

By default the sequential segments are evaluated from Start to End of the time selected (chronologically). This makes sense so far.
If you are looking for A then B, it is logic to look for first element and then to the other one.

Sequential Segment selector

However Adobe provide additional functionalities for its sequential segments.
There is the possibility to use “Only Before” and “Only After” sequences.

You can find this possibility by clicking on the “Include Everyone” that appears on your sequential segment.

There is a good documentation about this on Adobe, and I would also recommend you to read it : https://docs.adobe.com/help/en/analytics/components/segmentation/segmentation-workflow/seg-sequential-build.html

The documentation can be quite long and I will try to focus on the points that most people miss; Order of evaluation and Logic Group.

Order of evaluation

Adobe Analytics Sequential segments works differently if you are using “only after” and “only before” and lots of users get confused by it. It doesn’t bring back the same amount of data and more importantly, maybe not the sequence you wanted.

The only after review the condition in a chronological order and therefore it is the one that most of the adobe analytics users are used to and are expecting.
In a schema it would look like this:

hit processing order for only after

“But what is being returned exactly” you could ask.
The sequential segments with “only” will return everything after the segment condition(s) has return a true state. When is the true state returned ? When the last part of the condition is met.

Imagine that you have a sequential segment that is doing the following:
Only After : Category > Product Detail > Checkout
In this case, the following hits will be returned : (click to increase the size of that picture).

Returned data in green

Obviously, there could be pages existing between Category and Product Detail, or between Product Detail and Checkout. As long as you don’t specify “within 1 hit” or “after 1 hit”, there won’t be any requirement of what happen between those conditions.

More importantly, it can be that more than once your condition happens. As soon as the segment has a true state, it is returning everything that it pass that point in time.
You may then end up with multiple Category and Product Detail page in your segment data.

The logic is the same when you apply only before, except that the condition and hits are being evaluated in an anti chronological order. The last hits of the scope are evaluated first and then the data are being processed the other way.

If we go back to our example, with the same segment, we want now to have the only before segment.
Reminder : Category > Product Detail > Checkout

returned data in green

As I explained before, this kind of segment don’t matter if you have event in-between the different conditions (if you didn’t specify something for it). And the same way than before, if this sequence exist before your current validation point, these data will be returned as well.
You may end up with Finish pages with this segment even if you want only before data of the Finish page.

Now you may start to think that Adobe Analytics is quite useless because it actually doesn’t do what it is supposed to do.
Lots of users complain the following : “When I want to have the only before, I want the first iteration on the chronological order… This is so stupid!
Now I can’t retrieve the data I wanted…”

First of all, you can still retrieve the data you wanted but second there is a reason to have this setup in place.

Retrieving the “real” only before and only after data

You can retrieve whatever happens before the first instance of your sequential segment by taking the reverse of your segment.
Instead of taking only before, you take only after and exclude whatever is inside.
That will result by excluding all of the data after the first iteration appears in your logic.
Warning: You will need to add the condition again for including the specific condition that you have in your return data.

The segment built will look like that :
Visit scope :
Container – Visit Scope
Category > Product Detail > Checkout
AND
Container – Visit Scope – only after – exclude
Category > Product Detail > Checkout

returned data in green, match data excluded in red

You will end up with the data before the first iteration has happened.

You can easily imagine I hope the method to retrieve the real only after the last iteration of your condition. You apply the same logic on the only before segment.
This trick is usually quite helpful for lots of people.

The reason why this setup is in place is that you can actually retrieve what happens between 2 iteration of you sequential condition.
If “only after” return everything after the first iteration of your condition is met, and “only before” everything after your last iteration of your condition is met, you can actually retrieve what happens between 2 iteration of your condition.

Logic Group

The other difficult comprehension is when to use the Logic group container and this comes from misunderstanding on how container scope works in sequential segmentation.

During a sequential segment with a visitor scope sequential segment, the visit container has a particular meaning because it means that you want the condition to happen during a different session for the user.

If you are doing the following the segment:

Visit containers within a visitor scope sequential segment

This segment means that you are expecting 2 conditions to happen during the visitor lifetime but those 2 conditions happen during different sessions.
This can be easily overlook when you build complex sequential segmentation but it can have important implication.
The same thing happen with Hit container that you put in a visit or visitor sequential segment. However, I believe that Hit containers are easier to understand because it is what a container is for, separate the different hit.

So there is a Hit and Visit container in sequential segmentation but there isn’t a visitor container. Why is that ?
Having a visitor container in a sequential segment isn’t making much sense as of now for Adobe Analytics. It would mean that for the visitor, you want to have a specific sequence or condition within 2 different visitor lifetimes… Which is quite paradoxal

However, I feel that this could be possible if we have the power of Adobe Experience Platform in the future. If you have followed a bit the announcement around Analytics and Experience Platform, there is something called Customer Journey Analytics that can bring together data or journey of a customer from different database, as long as you have a common key.
Therefore, in the future, I would imagine that you can look for a specific condition to have apply into more than one visitor identified journey.

The Logic Container is the container scope that allows you to include multiple condition that should happen, independent of the order they are realized and in which scope they are realized.
It is quite interesting when you want to have different condition check after a specific sequence.

You can create the following segment condition with ease, where creating the same without the logic container would be quite troublesome.

Logic container AND

In the segment shown above, the segment is looking for Condition A then B (in 2 different visits) and then C,D and E to happen but this last part could happen either in the same visit than B or after, it could also be D, C, E in that order…
I let you imagine how many container you would need to have to realize the same logic without the Logic container.

As you can imagine, there is also a possibility to have an OR condition with the logical condition and you can exclude it as well.
This can create a lot of possibilities that expand your analysis possibility.

All of the possibilities are detailed in the adobe analytics documentation in a more detailed way but if you get the principle, it is easier to apply.

Segments compatibility

One of the misconception that is common is that the segments that you have created will be available everywhere and with every Adobe Analytics capabilities.
However that is not true and you need to know it because it can impact your implementation and your segment building process.

Visit and Visitor exclusion based condition in Data warehouse

Visit based condition are required to have the visit fully processed in order to be retrieved.
As you probably know, a visit is generated after evaluation of the timestamps for a specific visitor ID (or ECID).
This processed database is not the same than the one used for Data Warehouse. You may encounter some limitation in Data Warehouse when trying to exclude Visit and Visitor based condition.

Data Warehouse only allow Hit based or very basic exclusion for your segment.
You can always do a reverse and turn your exclusion to a inclusion in a separate segment and remove manually the numbers or data returned.
However, that is not an easy task and it may not give you exactly what you wanted. However that is the best approach.

Calculated Metrics

Calculated metrics are not available for segment creation and therefore need to know that before starting your segment creation. You probably need to prepare your segment different based on that.
At the same time, Data Warehouse is not able to return calculated metrics, therefore it is normal that Segment with calculated metrics may not be usable in the Data Warehouse context.

The simple solution

Nested Containers

At some point, when you are doing very advanced segment, you may need to add nested container with different scope.
So it would look like this:

Nested segment with different scopes

This segment will work in Data Warehouse because the nested containers are decreasing in scope vs their mother segment / container. Visitor > Visit > Hit.
However, if you mix different scopes within your segment, it probably won’t work in Data Warehouse.

If this is the case, what I would recommend to do is to create separated segments for your mix segment scope and realize calculation of your metrics after the Data Warehouse extract.

mixed scope segment
mix scope segment

Why do you need a mix type segment ?

Mix type segment can be really useful when you want to be specific, example hit based segment, but you want to exclude a general population.
Imagine that I want to see all the users that have added products to cart, especially on which page they added the product to cart, however I want to remove any visitors that realized a segment.

As usual, there are different way to see this information with Adobe Analytics, one of the way to realize this would be with segmentation and the following segment:

Mix Scope example
Example of mix scope segment

You can imagine this segment saying, include all of the cart additions hits Except for the users that realize an order… within my current time frame. Never forget that visitor based segment are applied to your selected time frame.

Top tips for avoiding segment errors

As you have seen in this article, building and using a segment can be quite tricky. Errors are easy to slip-in your analysis and then it is quite hard for anyone to spot it except re-building the segment itself.

I couldn’t end up my article without giving you the killer tips that will help you ensuring your segment is behaving the way it is supposed to.

Test your segment

It is very simple but I see it lots of time that very complicated segment are created out of the blue from users and directly apply on the data.
Like in programming, testing before using it is a must for segment creation.

When you think about it, creating a segment is like creating a SQL query and SQL Query is a programming language. Therefore you should always try to test your segment with very dummy logic and easy condition before analyzing with it.

Build segments by block

Also, you should try to build your most complicated segments step by step. From the most complicated segments I have seen, it is very often build on different layer of complexity.
Create those different layers independently first and then create your final segment, once you have ensured that the different parts are working as expected.

Naming convention

Having a (strong) naming convention is definitely a must for any company. Companies using Adobe Analytics tends to be quite huge and therefore it may be quite hard to find the correct segments without having this nomenclature set.
Also I have seen lots of time where people used the wrong segments because it looked similar to one they have.

Also a good naming will also makes you think what your segment should do. It will make users realize the scope possibilities (Visit, Hit and Visitor) and the Market or Website possibility to integrate.

I hope this article helped you to better understand how Adobe Analytics segmentation works. Don’t hesitate to ask questions if any part of this article is unclear, the topic isn’t an easy one and I am always looking forward to improve my explanation.
Likewise, if you want me to tackle a specific segment question.

Leave a Reply

Your email address will not be published. Required fields are marked *