Expand my Community achievements bar.

Segment Creation

Avatar

Level 1

Customers buys specific product alongiwth others products- how to create segment

9 Replies

Avatar

Community Advisor and Adobe Champion

I see that you have another question about segments, I'll answer this one too because it seems to be a bit different than your other question. For this particular case you want an order where there are two products. You would need a hit level segment with three conditions, one insisting an order exists, then the presence of the product you want and the absence of the product. So "product equals X" means that they ordered the product you want to know about. Also including "product does not equal X" means that there has to be a second product, and it can't be X (it can be literally any other product). Then the order exists just means that both of these happen in the same hit as an order existing. 

MandyGeorge_0-1714395400421.png

 

Avatar

Community Advisor

Unfortunately, due to the complications of how Products works, the segment:

 

Hit

    Product equals X

    AND

    Product does not equals Y

    And

    Online Order exists

 

 

Won't result in the expected outcome... 

 

For example:

 

Scenario 1 (only Product X":

 

 

s.products = ",X";

 

 

 

Scenario 2 (Product X and Product Y):

 

 

s.products = ",X;,Y";

 

 

  

Scenario 3 (Product X and Product Z):

 

 

s.products = ",X;,Z";

 

 

 

The segment above will return Scenario 1 and Scenario 3, it will not return Scenario 2 (despite Product X being included), and the segment will also return the Product Z from Scenario 3....

 

    Page Views
Products   2
  Product X 2
  Product Z 1

 

So your Product X will be missing "Product X" hits, and still including other products that you don't want... 

 

This is because the logic of segments on products runs the logic on each individual product, but pulls back all products that were part of the same hit...

 

 

Unfortunately, applying filters onto the table is the most reliable way to see only Product X (unless you also have unique categories on your products... (see your other post).

 

But if you are trying to get back all products from "Department 1", and you are passing the departments as the category (or as a merchandising eVar, or maybe as a classification); you can pull that department value into the table as a locked top level breakdown, then break that down with "Products" allowing them to flow based on the locked item above them.

 

s.products = "department 1,Product X;department 2,Product Y";

 

    Page View
Department 1   1
  Product X 1

Avatar

Level 1

Hey.. thanks a lot..

However, below segments comes with Visit becoz it happens in 1 visit .

 

Another Question:

 

Customer who has purchased a specific (X) product previously, what other article have they purchased  before and after buying the specific product (X)- Pls suggest on segment creation

Avatar

Community Advisor and Adobe Champion

Just want to call out first, my suggestion for the second piece is "product does not equal X", as in the same product as the first condition. Having different products in the equals and not equals conditions would give very different results than having the same product in both.

@Jennifer_Dungan  wrote:

Hit

    Product equals X

    AND

    Product does not equals Y

    And

    Online Order exists



For your followup:


@Reshu wrote:

Hey.. thanks a lot..

However, below segments comes with Visit becoz it happens in 1 visit .

 


If you need this at a visit level, put all three conditions in a hit container, so that they are all still happening at the same time, then put the hit container in a visit level segment.

 


@Reshu wrote:

Customer who has purchased a specific (X) product previously, what other article have they purchased  before and after buying the specific product (X)- Pls suggest on segment creation


And for the second question, this one does definitely get a bit more complicated. Here you would need to be using sequential segments. For the question: what products did people buy before buying X

 

Visitor (or Visit, depending on if you want the same visit or just the same person)

     Order exists

     Then

     Hit

          Order exists

          Product = X

You would also need to set your include to "only before sequence." That will include all of the hits up until the sequence in your sequential segment takes place. If someone bought product X more than once, it would include everything up until the last time they buy that product. I would definitely recommend checking out the documentation on sequential segments (linked below) to understand the logic a bit, so you can tailor it to give you what you need (or as close as possible because the segment logic does have some limitations). 

 

MandyGeorge_0-1714406365411.png

Build sequential segments | Adobe Analytics

Avatar

Community Advisor

Hi,

 

Well in the case of trying to look at sequences.. I wouldn't try to lock things down to "specific product"... that type of specificity usually comes with needing to provide orders on for Product X, or providing reports to Department Y for instance...

 

If you are trying to look at purchases before, during, or after Product X, then you really don't need such a specific segment to only look at X. Basically, any match to Product X can be used (whether it's alone or on the same purchase with another product).

 

If you want to see purchases (at any time) during the reporting period, you can just look for:

 

Visitor

       Product equals X

 

Then all products purchased by visitors who bought X will show up.

 

 

If you need to look specifically at before or after, then you can use a sequence, however, finding the right value for your "THEN" logic will take a little time, I've used Page View :

 

Visitor (Only Before Sequence)

    Page View exists

    THEN

    Product equals X

]

 

Or you can use "Only After Sequence"

 

 

If you are trying to find all items purchased at the same time, then the simple:

 

Hit

    Product equals X

 

Will return the items on the same purchases.

Avatar

Level 1

How to create segment : Other than Product"

Avatar

Community Advisor and Adobe Champion

There's essentially two ways to make a segment that doesn't include a particular product, and depending on what you want it to return will decide which method you use. I'll start by saying, you have to identify a specific product (or products) in the segment.

 

First, if you want to return a hit that contains something other than the product in question (whether or not the product is also present)

"Product does not equal X"

Doing this at a hit level will return any hit that contains a product that is not X. Now, if a hit contains two products (X and Y), it will still return that hit, because the "not X" condition is met, so it will return the whole hit. An example of this would be if someone places an order and buys more than one product. 

MandyGeorge_0-1714395018284.png

 

Second, if you want to exclude any hit that contains the product, regardless of what else is in it.

"Product equals X" inside of an Exclude container

Doing this will exclude any hit that contains X product, regardless of what else is in the hit. So take our example of an order with two products, X and Y. That hit would not be included here because of the presence of X (so it can possibly undercount other products).

MandyGeorge_1-1714395038047.png

 

 

Avatar

Community Advisor

Part of the problem with "Products" is that every product that was sent on the same hit will be returned by this segment...

 

So let's say you had

 

 

s.products = "Category 1,Product A;Category 2,Product B;Category 2,Product C"

 

 

 

It doesn't matter if you say:

 

HIT

    Product equals Products A

 

or

 

HIT

    Product contains Product A

 

 

Since ALL three products will be returned: Product A , Product B and Product C

 

 

Now, if the products have unique Categories, like Category 1 / Product A.

 

You can build out a table like this:

 

    Page View
Category 1   1
  Product A 1

 

 

Basically, adding filters or specific locked values (like pulling in specifically "Category 1" as a top level breakdown) into your table work differently than segments....

 

Now, if the category is repeated, like Category 2 / Product B and Product C... then pulling in Category 2 first will result in 2 of the products being returned....

 

Unfortunately, sometimes the only option is to use a filter on your table (this has been a long running complaint about Products works)

 

    Page View
Product (filtered to "Product B")   1
  Product B 1

 

 

Unfortunately, working with Products can sometimes be a big pain... 

Avatar

Community Advisor

FYI, I've merged the two questions into one, as they seem to be inter-related.