How to optimize web pages using Google search keywords

This recipe will cover how to use search terms collected from Google to personalize your website and improve conversion rates.

By Calvin French-Owen

One of the easiest site optimizations you can do is insert visitors’ search keywords into the page they’re visiting. For example, when someone Googles “spreadsheeting software for marketers,” you can make those same words appear at the top of your landing page.

This growth optimization tactic accomplishes two things:

  1. It reaffirms to the visitor that they arrived at the right place — that your product is what they need right now. This helps increase conversion.

  2. It helps you prioritize the best content for the visitor. Since you know what they’re searching for, you can cut the fluff that a visitor would skim past.

Your first step is segmenting visitors based on what they’re searching for. Here’s a related screenshot from a Google Ads dashboard:

Site optimization recipe 1

On your landing page page, you don’t have repeat these exact keywords letter-for-letter. But, you do want to step back a level to identify the key idea the person is searching for. Your goal is to adjust your page around that. For example, inject copy and prioritize sections that relate to their keywords.

And that’s what this growth recipe covers: Using Segment to filter incoming traffic based on search intent. Then using that to dynamically improve our landing pages’ conversion performance.

Below is an example of a landing page that changes based on the searcher’s intent. Zestful is an employee rewards platform, and some of their searchers want education-related perks to offer employees, while others care about fitness perks.

Site optimization recipe 2
Site optimization recipe 3

Step 1: Gather visitor data to understand keywords

To customize your landing pages by incoming search terms, start by gathering data on what your visitors search for that successfully brings them to your site. An easy way to do this is use the Search Keywords and Search Terms tables in Google Ads.  (You’ll need to set up a Google Ads account first). For help with setting up keywords, you can use the Keyword Planner.

Once you’ve added keywords to your campaigns, and have been running ads for at least a couple of weeks, you can see how well the keywords are performing by selecting a campaign, then choosing Keywords → Search Keywords in the left-hand navigation menu. To see Search Terms (the exact term a user enters on Google that led them to your website) you’ll find the Search Terms tab in the Keywords tab as well. If you want to know more about Search Terms and how to read the Search Terms report, click here.

Site optimization recipe 4
Site optimization recipe 5

Identify the best-performing search terms then place them into related groups (pop open a spreadsheet). Find groups that are distinct enough to result in distinctly different pitches for each.

To decide on how to group your keywords, take a top-down approach. Look for the more general terms that can act as overall descriptors of the rest of the keywords within that group. For example, one group might be “skincare” and within that group you could include more specific related terms that users are searching for like “anti-aging skincare” or “combination type skincare."

You can then use those keywords and related terms on your beauty company’s landing page: you optimize your page to focus on the most sought-after types of skincare.  As another example, if the searcher used “dark lipstick,” you could feature beauty products on your landing page instead of your default products.

Step 2: Embed search terms into your landing page

Your task is to embed and repurpose these search terms into your landing page. This is how you do it:

  • Use those keywords somewhere on your landing page copy. This is the basic starting point. It can also help improve your Google adQuality Score and SEO ranking. But, just plainly swapping in the search terms is the first step. Next, think through the type of person that would use that particular search term and focus on the value propositions that they would care about.

  • Create landing pages dedicated to the most popular search keywords. If you sell hundreds of different products, it can be hard to know where to focus growth marketing efforts. But if you can determine that certain keywords like “financial planning in New York” are performing exceptionally, this may be a signal to spin out a new landing page just it.

  • Use long-tail keywords to write hyper-specific content that converts incredibly well. You can develop a long tail of landing pages for very niche search terms that indicate high purchase intent. Even though the search volume is low, the revenue may be relatively high.

  • Modify CTAs to match search terms for higher conversions. If someone is searching for “rent living room furniture,” they may be more likely to click a CTA that say “Rent now” rather than “Sign up.”

  • Use search terms to know when to explain more and when to get out of the way. Search terms can indicate the level of intent a visitor has. If they’re searching for “best accounting software,” they may still browsing options — so make sure your landing page goes into the weeds describing what makes you better than the competition. In contrast, a search for “[your brand name] + signup” is someone who is ready to get started and just needs your signup form. 

Step 3: Connect the right data sources in Segment

Let’s walk through how easy Segment makes keyword-based landing page optimization.

Within Segment Sources, you can connect Segment to the major ad platforms, including Google Ads. You can then sort your top-performing search terms into groups to create dynamic landing pages from.

To add Google Ads as a source, follow these steps:

  1. From your workspace’s /sources page, click Add Source.

  2. Choose Google Ads and click Connect.

  3. Click Authenticate Google Ads and go through the authentication flow.

  4. Select a Google account to sync and click Next.

  5. Finally, choose a schema name. This will be the namespace you will be querying against in your warehouse. We recommend choosing a name that reflects the source itself, like google_ads, or google_ads_usa.

Segment will then pull groups of resources, called Collections, from your Google Ads account to retrieve data about various reporting functions. One of those Collections is keyword_performance_report which includes a ton of valuable data - here is just a handful of examples:

site optimization recipe 6

To dynamically change elements of your landing page based on those keywords, you can use Optimizely Web. This popular A/B testing tool requires minimal code setup, and the two-way data communication with Segment creates many opportunities for enriching your data.

Search terms can be passed through to your site in the URL query parameters, such as utm_term={keyword}. You can then grab that query data using JavaScript then pipe it into Optimizely for serving up the correct page tweak.

For example, the following JavaScript function parses your URL for query parameters:

site optimization recipe 7

Talk with a Segment team member to get help with this part 👉

Step 4: Setup experiments in Optimizely

In Optimizely, you can repurpose this code in your Optimizely experiment's Custom Code. (You'll need to enable jQuery in project settings or include it in your code.) Check out this article to learn more about jQuery and the $ variable in Optimizely.

Specifically, you’ll want to call this function in Optimizely’s <edit code> box. Below, we’re telling Optimizely page element’s text should be overwritten with which URL query:

site optimization recipe 8
site optimization recipe 8

In this case, we are passing in the value from “utm_term” to our function, which then retrieves the keyword value “Split”. All elements selected with jQuery selector “h1 > span” on the page will be changed to “Split."

Let’s take this a bit further: If, for example, you have many visitors Googling for “vitamin supplements for runners,” you can lead those folks to your page titled “Vitamin supplements for runners” where you replace all instances of the word “athlete” with “runner.”

To integrate Segment with Optimizely, you need to:

1. In your Segment source dashboard, enable the “Optimizely Web” destination (not the “Optimizely Full Stack” destination). 2. Go to your project’s home page in your Optimizely dashboard, then navigate to Settings -> Implementation and select the snippet version you’d like to include on your Web page. 3. In your Optimizely dashboard, select “Use only Optimizely X” under “Snippet Configuration.” 4. In your Optimizely dashboard, copy the snippet provided at the bottom of the page. 5. Include the snippet immediately after the opening <head> tag on every page where you’d like to include Optimizely’s JavaScript. 6. Now, paste your Segment snippet below the Optimizely snippet on every page where you’d like to include Segment’s JavaScript. 7. Finally, remember to define any metrics in your Optimizely dashboard, and to associate metrics with the appropriate Optimizely Experiments. Segment maps track event names to Optimizely eventName - the eventName corresponds to an experiment metric.

Behind the scenes, Segment’s Optimizely Web destination creates a global Optimizely queue on the page. Upon invocation of a Segment track event, Segment pushes the track event to the global queue.

Segment forwards the event to Optimizely:

  • If the Segment event name matches exactly the name of an active experiment metric set up in the Optimizely dashboard

  • If the experiment metric is associated with a running experiment

  • If the current user has been assigned a userId via Segment’s identify method (e.g. analytics.identify('123'))

  • If the current user is activated in a running experiment with the associated metric.

Segment also handles the following mapping:

  • Segment track event name to Optimizely eventName.

  • Segment track event properties to Optimizely eventTags.

Revenue values should be passed as a Segment property. The value should be an integer and represent the value in cents, so, for example, $1 should be represented by 100.

Segment .track calls are automatically sent to Optimizely as potential conversion events or segmentation criteria for your experiments.

Additionally, Segment automatically generates a .track call when an Optimizely experiment runs, and sends these “Experiment Viewed” events to other downstream tools connected to your Segment account. This lets you extend an experimental message to be consistent in downstream email marketing tools, or do deeper funnel analysis in analytics tools or your data warehouse to see the full impact of an experiment.

Get a demo to see how Segment works with Optimizely and other tools in your stack 👉

Additional growth advice

  • Customizing your landing pages to be more relevant can save you money. Google factors in the landing page experience as part of their Quality Score, which is in part measured by whether you sent visitors to the right destination page. Improving your Quality Score can reduce CPC’s by 30% and make ads show to more people.

  • Start with the search terms that are at the intersection of high purchase intent and high search volume. They’re likely the highest-leverage pages to build or keywords to dynamically inject into your page.

  • Don’t forget to A/B test landing page variants to determine the optimal messaging, images, CTAs, and offers. Don’t treat dynamic landing pages as one-and-done.

  • Every ad click comes with geographic data. You can use it to create a personalized experience for visitors: mention their geography (“yes, we ship to Canada”) and swap images for region-specific imagery.

To check our more personalization strategies like this, check out our Recipes page.

Try this recipe for yourself...

Get help implementing this use case by talking with a Segment Team member or by signing up for a free Segment workspace here.

The state of personalization 2023

The State of Personalization 2023

Our annual look at how attitudes, preferences, and experiences with personalization have evolved over the past year.

Recommended articles


Want to keep updated on Segment launches, events, and updates?