Article sections

    If you are already using Google Tag Manager there is a big chance you’ve already implemented multiple custom information,  sent through dataLayer. With Omniconvert you can use all this custom information to segment experiments/surveys without another implementation.

    GTM dataLayer variable

    The conditions we can use are:

    • Is – segments the visitors whose value of the dataLayer, from website database, is identical to the one introduced in the value field.
      Example: Include -> GTM datalayer variable – > datalayer variable name – > is – > 20
      This segment targets only the visitors, registered in your database, who have 20 years old.
    • Contains – segments the visitors whose value of the dataLayer, from website database, contains the one introduced in the value field.
      Example: Include -> GTM datalayer variable – > datalayer variable name – > contains – > 2
      This segment targets only the visitors, registered in your database, that have 2 included in their age.
    • Start with – segments the visitors whose value of the dataLayer, from website database, starts with the one introduced in the value field.
      Example: Include -> GTM datalayer variable – > datalayer variable name – > start with – > 2
      This segment targets only the visitors, registered in your database, whose age stars with 2.
    • End with – segments the visitors whose value of the dataLayer, from website database, ends with the one introduced in the value field.
      Example: Include ->GTM datalayer variable – > datalayer variable name – > end with – > 2
      This segment targets only the visitors, registered in your database, whose age ends with 2.
    • Lower than – segments the visitors whose value of the dataLayer, from website database, is lower than the one introduced in the value field.
      Example: Include -> GTM datalayer variable – > datalayer variable name – > start with – > 30
      This segment targets only the visitors, registered in your database, whose age is under 30.
    • Greater than – segments the visitors whose value of the dataLayer, from website database, is greater than the one introduced in the value field.
      Example: Include -> GTM datalayer variable – > datalayer variable name – > start with – > 19
      This segment targets only the visitors, registered in your database, whose age are upper than 19.
    • RegEx – define with RegEx the value.

    Example

    A basic dataLayer looks like this:

    <script>
        dataLayer = [{
            isLoggedIn: 0,
            userEmail: ''
        }];
    </script>
    

    Example to segment all logged visitors:

    Also, you can use any dataLayer variable as text in creatives with the {DATALAYER[attribute]} format.

    Please ensure that dataLayer is populated with the values needed for segmentation before the Omniconvert code loads.

    Was this post helpful?