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:
In your Segment source dashboard, enable the “Optimizely Web” destination (not the “Optimizely Full Stack” destination).
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.
In your Optimizely dashboard, select “Use only Optimizely X” under “Snippet Configuration.”
In your Optimizely dashboard, copy the snippet provided at the bottom of the page.
Include the snippet immediately after the opening <head>
tag on every page where you’d like to include Optimizely’s JavaScript.
Now, paste your Segment snippet below the Optimizely snippet on every page where you’d like to include Segment’s JavaScript.
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:
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.
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. Wrapping up
Here's what we covered in this recipe:
We analyzed data from Google Ads keyword and search term reports.
We used Segment Sources to connect Google Ads to Segment and import the relevant keyword data to segment landing pages by keyword — or dynamically inject keywords into our landing pages via Optimizely
As always, we used Segment’s automatic integrations to connect it all together.