Pages

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 16.0

...

In this example, visitors that browse the site using a desktop device will be are segmented. You must first create a trigger to detect the device type, and then create a segment based

To implement the example:

  1. Create a trigger for detecting a visitor's device type.
  2. Create a segment based on the trigger.

Creating the trigger

To create the trigger:

  1. In the Frosmo Control Panel, in the sidebar, select More > Triggers.
  2. Click Create trigger.
  3. Define the following settings:

    • Name: Enter "[Device type] Desktop".
    • Evaluation point: Select DOM ready.
    • Rules: Click Add new rule, select JavaScript code, and set the following rule:

      Divbox
      classfrosmo-rule-container

      The value of the

      Code Block
      languagejs
      themeRDark
      easy.utils.isDesktop()

      JavaScript function is exactly true.

      This means that when all HTML elements have been loaded on the page, the JavaScript functions checks whether the visitor is using a desktop device. If so, the function returns "true", and the trigger is fired.


    Defining the trigger settings

  4. Click Save.

...

To create a segment for visitors who use a desktop device:

  1. In the Frosmo Control Panel, select Data Management > Segmentation > Segmentsin the sidebar, select Audiences.
  2. Click Create segment.
  3. Define the segmentation rules:

    1. Click Add new rule, select Trigger, and set the following rule:

      Divbox
      classfrosmo-rule-container

      The visitor has triggered [Device type] Desktop more than equal to 1 times, with each trigger event counted.

      This means that in order to get segmented, the visitor must browse the site using a desktop device at least once. The trigger is evaluated on each page load.


    2. Set the time limit based on the start and end date of your modification. The default time limit is 14 days.

    Defining the segmentation rules

  4. Select Description, and enter "Using desktop device" as the segment name.
  5. Click Save.

...