Real-Time Personalization in Google Optimize

This article covers the topic of real-time website personalization both from a strategic standpoint and from a technical standpoint, including some considerations for Google Optimize/Optimize 360.

Strategically speaking, let’s consider the underlying value proposition of providing personalized experiences and then move to a discussion of some of the ways you can accomplish this personalization from a technical standpoint.

Understand Intent to Provide Exceptional Experiences

Using user intent signals derived from online behaviors is the key to providing exceptional experiences that improve overall website performance by enhancing a user’s experience on your site. In the broadest sense, user intent can be categorized in two ways: declared intent and inferred intent. Let’s get into the weeds for a moment and take a look at each.

Declared Intent: Tell Me Who You Are or What You Need

There is nothing wrong with inferring intent, and we should be paralyzed if we could not make sound decisions based on inferences from data. However, declared user intent is superior when it is available. One of the keys of really successful conversion funnels is helping users tell you what they want or need as part of the conversion process itself. Below are some simple examples of some types of businesses and what you might like to know about a user’s wants and needs as quickly as possible:

Dating SitesX looking for Y
Job SitesAre you a job seeker?
Are you a company looking to hire?
Car SitesNew or Used?
Have a trade-in?

These are simple kinds of questions companies are already asking on their websites either as soon as you enter the site or shortly thereafter, and it helps guide your experience on the site real-time and early in the process. They are based on declared intent, and so the personalizations made based on this data is more reliable in terms of supporting the user experience you provide.

Inferred Intent: Extracting Meaning from Behavior

Inferred intent refers to the uncovering of specific user behaviors, such as search terms, content consumed on your site, engagement metrics, and website interactions that index higher for specific outcomes: conversion goals, specific product purchases, specific customer needs. The intent is inferred because no one is telling you specifically what their intention is in these cases, but you can make reasonable, data-supported decisions with enough data points because the correlation between behavior and an outcome can be very strong.

Uncovering Intent for Long Sales Cycles and B2B Sites

On B2B sites, lead generation sites, and sites with longer sales cycle getting users to declare their intent may be a slightly more complex and step-wise process. This is why lead generation processes that feel more like a guided journey than a long, onerous form can be so effective. When users download a gated white paper or select options on your guided journeys that let you know what they need, these are the key moments to provide real-time personalization based on what you now know.

If I download a white paper about SAP Supply Chain Management (SCM) Software, this is a key moment to stop giving me default content and experiences on the website. You can’t be 100% certain at this point, but this is a good time to validate a hypothesis that I may be interested in supply chain management. Wouldn’t you agree? Show me some additional articles and other resources around your solutions related to supply chain management. Show me a case study or two supporting the features and benefits of your product and the improvements your customers have realized.

Next time I visit your website, why not update the main home page graphic and content block to reflect what I have already told you about my interests and needs?

Additional Opportunities for Personalization
Here are some other critical points where personalization is appropriate and potentially powerful

  • Lead Scoring Thresholds
  • Content Consumption
  • Conversion Steps
  • Mini-surveys/guided journeys (hint: you don’t need to ask prospects for everything at once)

Putting It All Together to Deliver Real-time Personalization

Real-Time Personalization in Google Optimize

Technically speaking, any time you alter your site’s default content or experience flow based on inferred or declared intent from your user, you are doing web personalization. So, you are probably already doing personalization even if only in rudimentary ways. Here is where we dive into some of the technical and platform-related details of personalization.

Personalization Inspiration from Paid Search
Real-time personalization involves that elusive goal of uncovering user intent. When paid search advertising first emerged on the digital marketing landscape, advertisers were pleased to have an advertising platform with a microscopic look into user intent. Someone typed some text into a text field, and they got a series of hopefully-relevant results, both organic and paid, and they decided which listings were most relevant and/or appealing. The more specific the search, the more likely an advertiser could infer user intent: black New Balance minimus 20v7 trainer indicates a lot more purchase intent than gym shoes, for example. Google Ads integration with Google Optimize makes personalization targeted to paid search behavior a simpler proposition.

Personalization with Google Optimize/Optimize 360

Google’s Optimize/Optimize 360 platform was initially released as a website testing platform, but with recent feature updates, the platform has transformed into a proper user experience tool. Not only can you run A/B, Multi-Variate, Server-Side, and Redirect tests on the Optimize platform but you can also use the platform for serving up true website personalization based on a wide set of targeting criteria.

Real-Time Personalization in Google Optimize

Google Optimize offers a range of targeting conditions, many of which are useful for real-time personalization.

Personalization can be targeted around some simple, yet powerful criteria such as URL rules, user’s geolocation, and device type. From there, you can quickly step up to more sophisticated targeting criteria as well. With Google Ads integration, you can target the full Google Ads hierarchy: account, campaign, ad group, keyword.

There are additional options for targeting personalization as well: URL query string parameters, javascript variables, data layer variables, and first-party cookies. If we look back to the discussion of intent earlier in this article, all of these methods can be used to capture user intent as a datapoint real-time so that Optimize can trigger personalizations on the fly.

Google Analytics Audience Targeting Relies on Processed Data
With Optimize 360, a powerful feature is using Google Audiences for targeting both personalization and testing experiments. Since this is a post on real-time personalization, it should be pointed out that one limitation of using Google Audiences is that for a user to fall into an audience, they must first have at least one hit in Google Analytics processed data that qualifies them for audience membership. While using Google Analytics audiences provide a powerful way to target users for personalization using sophisticated segmentation logic based on combinations of behaviors, conditions, and potentially demographic data, audience targeting will typically only be near real-time (i.e. next time the user visits your website after the session where they meet your targeting criteria).

Storing Values for Targeting in Real Time

The sections above listed several targeting types that you could use in Optimize for real-time personalization. Below, we detail three specific examples, which are quite similar but use three different approaches for storing real-time information to use as a personalization targeting rule.

Example: 1st Party Cookie (Property Type for Real Estate Company)

  1. Create a first-party cookie on your root domain called ptype.
  2. Populate this cookie with values based on content consumption or behaviors on the website, such as viewing key content or downloading specific white papers (technical hint: you can use your tag management system to do this in many instances with creative use of triggers and custom javascript tags)
  3. Configure your personalization in Optimize to fire based on specific 1st party cookie values. Each value corresponds to declared or inferred primary interest in a specific property type:
    1. ‘1’ = Commercial Real Estate Investment Properties
    2. ‘2’ = Vacation Home Purchase
    3. ‘3’ = 1031 Commercial Real Estate Exchange
    4. ‘4’ = Rental Property Investment
  4. Deliver personalized content based on the triggers you created to make a user’s experience more relevant to the interests they have revealed and which you have captured as a 1st party cookie value.


Real-Time Personalization in Google Optimize

Example: DataLayer Variable (Product or Service Interest)

Now you can set up a data layer targeting rule for ‘supply chain management’ prospects. When I navigate through the site, show me some additional content that aligns with my interests in a specific product or service.

Example: Javascript Variable (User Type)

Now you can create a JavaScript variable targeting rule for job seekers on your job posting website based on a JavaScript variable with the rule variable named ‘userType’ equal to ‘jobseeker’. You could create complementary rules for other user types: jobposter, undefined.

Values for Targeting Must Be Present Prior to Optimize Snippet Firing
Developer Note: Just keep in mind that any dataLayer variables, JavaScript variables, or cookie values must be present prior to the Optimize snippet firing in order to be used as trigger criteria. Also, keep in mind how you will persist these personalizations during a user’s session. Datalayer and javascript variables are easy to leverage on a specific page when a triggering event occurs, but you will likely need some additional code or logic to make these values persist from page to page. This makes a good case for using 1st party cookies rather than variables because cookies persist by design until overwritten or until the cookie expires (or is deleted).


When you do use variables, you must place JS variables or dataLayer variables in the section of your page code and above the Optimize snippet. This is crucial. In the sample header script below, you can see an example of a dataLayer variable placed prior to the Optimize code:

Real-Time Personalization in Google Optimize
JavaScript variable for targeting appears before the Optimize snippet on the page.

Personalization with Optimize on Single-Page Apps

You can even use tools, such as Optimize/Optimize 360 on single-page web apps. The trigger feature, Custom Activation Event allows you to fire the activation event snippet whenever your page updates/refreshes so that Optimize can look for new trigger criteria to be present and to launch appropriate personalization or experiments at that point. To learn more about activation events for Optimize, check out the documentation here.

Getting Started with Simple Steps

Though marketing automation and sophisticated personalization tools certainly bring value and have their place in enterprise marketing and sales initiatives, you don’t have to invest in the most expensive or most comprehensive toolsets to start doing real-time personalization on your site. You can realize the benefits of real-time personalization by following a few simple practical principles and leveraging functionality you likely already have available with web developer support.

  1. Expose values for targeting: expose key user behaviors, such as conversion steps, content consumption, or declared intent as data points in your data layer, JavaScript variables, or in 1st-party cookies to use as triggers in your personalization tools.
  2. Make the user experience more relevant: test specific and highly relevant personalizations, such as presenting additional supporting content around the products or services a user has expressed interest in. Remove forms that a user has already filled and submitted and provide conversion support resources, such as downloadable white papers, case studies, or offer a “free consultation” as a more engaged next step.
  3. Guidance and tailored journey rather than default navigation: start building a plan to offer a more relevant user experience wherever you can. Build guided journeys into your website experience so that you can easily tailor the user experience around intuitive decision paths. Don’t rely on navigation to get your users where they need to be. Provide guidance along the way, and personalize the experience as soon as you have enough information to reliably do so.
Personalization Automation Tools
Certainly you can opt for a full marketing automation platform, such as Eloqua, Marketo or Salesforce, which allows you to track and score leads, provide automated email lead nurturing, and custom personalized landing pages and content delivery on your website. These platforms are powerful, and they require serious investment in terms of budgets, configuration, and ongoing management/optimization for full effect.


Product recommendation engines, such as Certona provide retailers with tools to leverage user browsing, shopping, and purchase behavior to optimize product recommendations both on-site and within emails. Retailers can configure some rule-based logic to guard rails around product recommendations and then let the platform learn and optimize those recommendations within those guard rails.

To learn more about enhancing end-user experience through real-time personalization, contact E-Cens today.

Patrick Soch

This post was originally written by
Patrick Soch
Digital Analytics Consultant, e-nor

Bashar Hafez

Bashar Hafez

Bashar is a seasoned global technology executive with nearly 20 years of experience leading software, product development, and analytics organizations at Fortune 500 companies, regional and global brands.

Related resources

Do you want to get more insights from your data?

e-CENS designs and builds a complete, customized digital transformation, analytics, and measurement program to drive your business forward.