VWO Logo
Dashboard
Request Demo

Back to All Updates

Now Target Visitors Based on Data Layer Variables Set in Google Tag Manager

Aman Rayjada Aman Rayjada 5 Min Read

Introducing the latest addition to our integration ecosystem with Google Tag Manager (GTM). Now you can not just push your VWO campaign data to Google Analytics and other analytics tools, but also target your A/B tests or personalization campaigns to visitors directly based on your GTM data layer variables. 

This new integration ties our platform closely with the Google technology stack.

Target Visitors Based on Data Layer Variables Set in Google Tag Manager

Before we understand some use cases enabled by this update and how it benefits you, let’s see how the relationship between the GTM data layer and VWO works.

Working with GTM data layer and VWO

As long as visitors are engaging with your website, there will be data that describes that behavior. Google Tag Manager is a tool that allows you to manage and deploy marketing tags (snippets of code or tracking pixels) on your website without having to modify the code. These tags help you share information from one data source (your website) with another data source (Analytics) through Google Tag Manager. 

Understanding GTM data layer variables

So, what are data layer variables? A data layer helps you properly structure your organization’s information to analyze how users interact with different parts of a website or Single Page Application (SPA). You can define data layer variables (which are technically JavaScript objects) to help you log all such visitor information from your website to your Tag Manager container.  The data layer variables enable the Tag Manager to read visitor data from your data layer implementation, populate variables and activate triggers in your tag configurations.

When you set up a website to work with Tag Manager and a data layer, think about what type and level of information the data layer should log depending on your business use case and industry.

For instance, in the case of eCommerce, it could be the following:

  • Product data: Product category, name, price
  • Transaction data: Cart value, checkout value

Some of the industry-agnostic data layer variables could include:

  • Marketing campaign data: Traffic source, medium
  • Visitor status: Logged In or Anonymous

For example, if you’ve set up a data layer variable that captures visitor status (logged in/anonymous), then you could make use of that data as a targeting condition in your experiment or a personalization campaign to set up a custom buying journey for the visitor. 

However, to leverage this data in campaigns without a native integration, you would typically need to write a custom code for every campaign, increasing the dependency on your engineering team. Our native integration with GTM completely eliminates the need to do so and makes experience optimization hassle-free.

Targeting VWO campaigns based on GTM data layer variables 

If you are capturing the right visitor data in the context of your goals, VWO integration with GTM helps you leverage it easily to test hypotheses or build tailored experiences.

Let’s say, you represent a software company that offers different products. For a returning anonymous visitor, you may want to display a variation of your home page based on the product they have already viewed or showed interest in. 

As you create a campaign in VWO Testing or VWO Personalize, you can simply create a segment using the GTM data layer condition to target this audience specifically. 

Defining a custom segment based on GTM data layer variables
Defining a custom segment based on GTM data layer variables

Now that you have defined the segment, you can use the VWO Visual Editor to show a promotional banner, embed the video of the previously viewed product, pop up an image or form, personalize content, and much more. 

In the example below, we have targeted users who have viewed the VWO Personalize product page with a promotional banner when they revisit our homepage. 

Displaying a promotional banner to returning users using GTM data variables 
Displaying a promotional banner to returning users using GTM data variables 

Let’s consider another example of any subscription-based business wherein you want to show your freemium users a promotional banner to upgrade their plan. All you need to do is set up a data variable to identify their plan, and then use it to define a custom segment and run a campaign targeting them.  

You can also create advanced custom targeting segments using a combination of numerous other visitor attributes and events that you have defined in VWO Data360, our customer data platform in addition to GTM variables data. Like in our example below, we have added another condition i.e. page scroll is more than 50%. 

This will ensure that you only show the variation to users engaging with your website and not to all of them.

Defining an advanced custom segment based on data layer and other attributes
Defining an advanced custom segment based on data layer and other attributes

Once you’ve defined the segment, simply proceed to the Visual Editor to design a compelling experience for your target audience and analyze its impact. All of this without using any code!

Displaying an upgrade offer to engaged freemium users
Displaying an upgrade offer to engaged freemium users

Once your campaigns are successful, you can also deploy them with VWO Web Rollouts without any coder dependencies. 

Excited and want to know more?

This GTM data layer integration is now available in Pro and Enterprise plans of VWO Testing, VWO Personalize, and VWO Web Rollouts who have enabled the Google Tag Manager integration in their accounts. To know more about it and go through a step-by-step guide to enable it in VWO, please refer to the knowledge base article.

For any questions or concerns, please feel free to reach out to support@vwo.com.

Products
VWO Personalize, VWO Testing, VWO Web Rollouts
Plans
Growth, Pro, Enterprise, All
Tags
Client Side TestingIntegrationsPersonalizationSegmentationTargeting
For questions/concerns
support@vwo.com
Share

Subscribe for VWO Product Updates

Be the first to know. Stay on top of the latest VWO features and releases. You will also be invited to try our exciting beta features in the works!

A value for this field is required.

Thank you!

Check your inbox for the confirmation mail