You already know that approaching customers with a one-size-fits-all marketing strategy is far from a best practice. Visitors to your website differ by source, browser, purchasing habits, and other important attributes. If you are keeping tabs on your site analytics, this information is already in your back pocket—so put that information to work to improve your conversion rate! With website optimization tools, you can split traffic based on these characteristics and customize pages to maximize conversions. We call this approach visitor segmentation.

Creating Segments for Website Optimization

When practicing website optimization, leveraging customer segmentation provides a framework for running intentional, well-hypothesized experiments on your website that drive value. Experiment data you gather from specific visitor segments interacting with your site will help you to provide a more personalized, engaging experience. Visitor segmentation also expands the opportunities for you to explore different site variations, and then quickly refine those variations with specific types of site visitors in mind.


For example, targeting mobile visitors versus non-mobile visitors provides a very granular understanding of how those people like to interact with your website on different devices. At property management company RentPath, segmenting based on mobile device type (iPhone, Android, and Blackberry) helped to confirm that their experiment results were not being skewed by one device type.

Here are 7 suggestions for custom segments to use in your A/B testing, and how to implement them in Optimizely. The key is to implement the segments that make the most sense for your organization. Depending on your experiment goal, it could make sense to combine some of these segments together.

7 Customer Segmentation Examples for Ecommerce Companies

  1. Visitor Tiers (Logged In vs. Guest Users, VIP Status, Repeat Shoppers vs. First-Time Visitors)

    • Why? Loyal visitors don’t behave the same way as first-time visitors, and should be treated accordingly. Once you have visibility into their behavior on second visits and beyond, you can optimize the experience of each segment.

    • How to do it: This type of data is often tracked via a cookie or window level javascript object. You can create this custom segment by having Optimizely look for the specific cookie or window-level javascript object.

  2. Users that have (or have not) completed an order in the last 30 days

    • Why?: A customer who purchased something several months ago could be tempted to purchase a new product with a promotional code. A customer who recently purchased might not need a special promotion to purchase again, as they already have your products top-of-mind.ab-test-call-to-action

    • How to do it: Once a customer makes a purchase, add them to the “Recently Purchased” segment and include a rough timeframe that they made the purchase (i.e. January, 2014) as a sub-segment. Using the optional 3rd parameter in the Optimizely Custom Segment API call, you can create a sub-segment to further refine your data.

  3. Top Purchasers (High Cart Value)

    • Why?: While we’re on the topic of identifying visitors who have purchased something from you before, what about those visitors that are most valuable to you? As little as 1% of your customer base can spend as much as the bottom 50% combined*. These visitors are definitely worth your time and you want to make sure that you’re optimizing their experience to the fullest.
    • How to do it: Once a visitor has completed a purchase, include logic on your Confirmation Page that checks the value of the purchase. If it is beyond a certain threshold, add them to a “Top Purchaser” segment. For an advanced implementation, you could implement a flag on the page set server-side, and instruct Optimizely read this flag (or cookie) to determine the segment.

  4. Location

    • Why?: Break down your major visitor populations into key locations to understand the differences in their behavior. Just as brick-and-mortal retail companies are “going local,” you can (and should) follow this same philosophy with e-commerce. The first step is understanding which “local” markets you should tailor your experiences to.

    • How to do it: Geolocation segmentation is built into Optimizely. You can use the built-in custom segment conditions to identify visitors by location.

  5. Source Type

    • Why?: Understand where your customers are coming from to make smart decisions about how much to spend to get these visitors and whether you should tailor experiences to this particular segment. For example, understand how visitors coming from search engines are behaving compared to social media sites where you have a large presence.


    • How to do it: Optimizely provides a default segment of “Source Type” that identifies visitors coming from Campaigns, Search Engines, Referral and Direct. For more advanced segmentation, create a custom segment to break down the Source Types even further (e.g., Google vs Yahoo vs. Bing for search, or Facebook vs LinkedIn).

  6. Device Types (Desktop, Mobile, Tablet)

    • Why?: Mobile visitors already account for over a quarter of total web traffic so understanding how your mobile visitors behave is extremely important. You should have visibility into how each one of your key conversion metrics is received by mobile traffic. To take it one step further, you can create a custom segment to focus specifically on tablets as a larger screen often encourages different visitor behavior than mobile phone traffic.Device Type

    • How to do it: You can create this custom segment in Optimizely by using the built-in visitor conditions to segment by browser. This is also where you can select based on device-type such as iPhone, Android or iPad. If you want to get even fancier, you can use the Optimizely API and create subsegments based on User Agent. The key is to look at how your site currently identifies these visitors and try to follow the same identification method.

  7. Personalized Data (Gender, Income, Style, Age, etc.)

    • Why?: You are likely capturing and tracking specialized data on your customers, whether you are asking for it during the purchase process or collecting the information based on visitor’s actions on your site. This information is likely aligned to overarching goals of your organization and its important to view your experiment data from the perspective of these customer attributes.

    • How to do it: This is a situation that completely depends on your site. It depends on how the data is captured and presented on your site, whether its in the form of cookies or window-level javascript objects.

Optimizely’s visitor segments allow you to categorize your visitors for the purposes of filtering your results and even adding personalization to the user experience. Once you’ve created a visitor segment, you can also target your experiments to run only for that visitor segment.

*Data taken from RJMetrics survey of e-commerce companies.