Create a segment

In this guide, we will walk through the whole process of creating a segment, from creating its template to configuring triggers.

Create segment

To create a segment, we must first access a campaign. This can be done by searching for the desired campaign in the Campaigns section.

Once inside the intended campaign, we will locate the “Create Segment” button on the middle-left of the screen in the “Quick Actions” section or we can do it in alternative way by clicking on “Create” green button on the middle-right side of the screen. Clicking it will open a dialog with two fields to fill in.

  1. The first field is a text box where we’ll name the segment. Typically, the name includes details we find relevant such as the segment’s purpose, the pages it targets, the creation date, whether it’s intended for desktop, mobile, or both, etc. (e.g. “Demo — Bmetric article — Regular segment — Desktop/Mobile — 100225”).
  2. The second field is a dropdown menu where we’ll select the type of segment we are creating, which in this case is “Regular”.

After completing these steps, we click the “Create” button. A new tab will open, displaying our newly created segment.

Create template

We need to create a template — which serves as the design for our engagement — so we can begin building our segment.

This process is quite similar to creating a segment, but this time there is only one field to fill: the name.

At this stage, both the new template and the segment are disabled. To access them, simply switch from “Disabled” to “Enabled” in the top-left corner of the templates/segments list.

Configuring template

Inside the template, we’ll find a visual editor where we can build the HTML and select or upload a CSS file to complete our design. On the left side of the editor, we’ll see a preview of how it will look. To build the HTML for each state (maximized, minimized, success), we’ll need to switch between the different states.

Before saving the template for the very first time, we need to select a conversion type, which defines the action end users can take within the segment. In this case, we will choose “Callback,” as our engagement will include a submit button for users to provide their information to be called back.

To see the styles applied to the preview, simply refresh after saving.

The templates are now ready to be enabled for use in the segment. We can enable them directly within the template, next to its name, or from the templates list in the “Status” column. Alternatively, we can enable them in bulk on the templates list.

Configuring segment

Back in the segment, we’ll find another visual editor. Since the designs have already been created in the templates, simply scroll down and select the correct template from the dropdown menu. Once selected, the HTML, CSS, and conversion type will be imported automatically from the template.

This specific segment has a unique characteristic: it is a lead form, meaning it targets an element on the webpage instead of appearing as a pop-up. To set this up, we need to specify the target element. This works similarly to CSS selectors: use a ”.” before the name to target by class or a ”#” to target by ID.

Now we just need to set the activation hours — the timeframe during which we want the engagement to be active — and then configure the triggers.

To set the activation hours, navigate to the “Activation Hours” tab, click the “Add Activation Hours” button, choose the type of hours (in this case, recurring hours), select the desired days, and specify the time range.

For demonstration purposes, I’ll create two different activation hour sets: one for 24/7 availability and another for standard business hours. However, we can create as many sets as needed and switch between them as required.

For the triggers, I’ll demonstrate with 2 simple triggers: a cookie matcher, which I’ll use our bmtest cookie, which helps to test the engagement. If we do not add it to the segment it will be live on the website. And a simple URL matcher so we can see it on that URL.

Live testing and final comments

These triggers were used for demonstration purposes, but we have a wide variety of triggers available for use as needed.

That URL trigger was used for demonstration purposes. We have different ways how to match on URL’s.