Segmentation based on interests with the use of fragments of visited URLs

Published July 29, 2022
Modules
Difficulty
Selected Clients
sharafdg logodecathlon logo

Having more product categories in your store, you can easily measure which category a customer visits most frequently.

Based on the URL of the visited page, you can find a lot of information. In this use case, we treat visits to specific URL as visits to specific categories (for example, if the URL contains “/shoes/”, we assume that the customer has visited the “Shoes” category).

Using the Analytics module, we can define how many times a customer visited specific categories and then extract the one most frequently visited by them. Additionally, you can create a segmentation by grouping these customers by favorite category. In this use case, we will show you how to create such a segmentation on the example of 4 selected categories using aggregates and expressions that use the URL fragment in the page visit event.

Prerequisites


Implement tracking code on your website.

Tip: If there are more product categories, we recommend additionally implementing OG tags. Thanks to that, an additional parameter will be collected in the page.visit event with the exact path of the category visited by the customer. Based on that, you can simplify the presented analyses and reduce them to one aggregate with the “TOP” aggregator and segmentation (there would be no need to create an expression and aggregates for each category).

Process


This procedure consists of three stages:

  1. Create aggregates that count visits on each of four product categories.
  2. Create an expression that returns the highest result for every category.
  3. Create a segmentation that groups customers by the most frequently visited category.

Create aggregates


Create aggregates that count visits on each of product categories. In this stage, we assume that visiting a given fragment of the URL equals visiting a category. To measure the results, create 4 aggregates that count the number of visits to each of the four categories.

  1. Go to Analytics icon Analytics > Aggregates > Create aggregate.
  2. As the aggregate type, select Profile.
  3. Enter the name of the aggregate (in this example, the name of the aggregate will be the same as the category name).
  4. By clicking the Expander arrow icon button, set Count as the type of the aggregate result.
  5. From the Choose event dropdown list, select the page.visit event.
  6. Click the Where button and from the Choose parameter dropdown list, select uri.
  7. Select the Contain logical operator.
  8. In the text field, next to the logical operator, enter the name of the product category.
  9. Save the aggregate.
  10. Create another one or more aggregates for their respective categories. Repeat the steps 1-8.
    Result: The aggregates will count visits of individual users to the product category. The aggregates are available in Analytics icon Analytics > Aggregates.
Filled settings of the category A aggregate
Filled settings of the category A aggregate

Create an expression


In this step, create an expression that will use the max function. This function returns the highest value in a set of values. Use it in order to return the result of the category most frequently visited by the user. It will be used later in building the segmentation.

  1. Go to Analytics icon Analytics > Expressions > New expression.
  2. Enter the name of the expression.
  3. From the dropdown list, select Attribute.
  4. To start creating the formula of the expression, click the Select button.
  5. Create the formula as presented on the video below:
  6. Save the expression by clicking Save. The expression returns the highest values for every category.
Filled settings of the expression
Filled settings of the expression

Create a segmentation


In this stage, create a segmentation based on previously created aggregates and expression. It will contain four segments, each dedicated to one category. This way you will find out which of the categories is most popular.

  1. Go to Analytics icon Analytics > Segmentations > New segmentation.
  2. Enter the name of the segmentation.
  3. Click Choose filter.
  4. Select the Profiles tab.
  5. Select Expressions.
  6. Find the expression created in the previous steps.
  7. Choose the Equal operator.
  8. Click the icon next to the logic operator and keep clicking until you get Choose value icon.
  9. From the Choose value dropdown list, click the Three-dot icon icon, and then select Aggregates.
  10. Find the aggregate for the first product category.
  11. From the Choose filter dropdown list, select an aggregate for the same product category for which you are creating a segment.
  12. From the Choose operator dropdown, choose Number, and then select More or equal to.
  13. Next to the logical operator, in the text field, enter 1.
    Note: With this additional condition, you ensure to include in the segment only those users who have at least 1 visit on the selected page category.
  14. Create the next segments for the remaining product categories by clicking the Plus icon icon.
  15. To save the segmentation, click Save.
  16. To preview the visual form of the segmentation, click Preview analyze.
Note: If you want to include a customer in more than one segment when the customer met all the conditions, you can enable the Multi-match toggle. Remember, however, that this option is only available for preview proposals and cannot be used for targeting, communication or in building further analyses.
Adjusted segmentation form
Adjusted segmentation settings

What’s next


You can use the created segmentation on the dashboard or use it as an audience in any communication channel. You can also display personalized communicates on the website using dynamic content depending on the most often visited category by your customers.

Check the use case set up on the Synerise Demo workspace


The list below contains the aggregates from the use case with example categories created in our Synerise Demo workspace:

In our Synerise Demo workspace you can also find the configuration of the expression that returns the most frequently visited category by a customer and segmentation that organizes customers according to the visits to the categories.

If you don’t have access to the Synerise Demo workspace, please leave your contact details in this form, and our representative will contact you shortly.

Read more


😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker