Segmenting in Convert Using the dataLayer

A dataLayer is commonly used to store session visitor data. You can use this dataLayer to show an experience to a specific visitor group.

A classic data layer would look like the following and would be embedded in your page:

dataLayer = [{
        isLoggedIn: 0,
        userEmail: '',
        industry: 'medical'

Let assume that the industry field can have different values and we want to target with our experiment or personalization only users in the medical industry.

  1. First, we need to create the experience that we want to provide to this segment.
  2. We need to configure an Advanced Audience for this experience. First. I will edit the experience. 

  3. Then open the "Advance Audience" Editor:

  4. Enter the following code:

"medical" == dataLayer[0].industry;

Then the experience will only run for visitors for whom's 'industry' value of the dataLayer is equal to 'medical'.


Have more questions? Submit a request