A/B Testing in Campaigns and Email Marketing
Learn how to A/B test your Marketing campaigns to analyze how different email campaigns and ads affect browsing behavior and conversion rates on your website. For example, you can run three different ad campaigns and not only see which campaign is clicked on most often, but also which campaigns actually convert best when visitors are on your website. Or maybe you want to send different newsletters to your users and compare how they affect browsing behavior on your website.
In this guide, you will learn how to create an experiment and implement it in your email marketing campaign to enable A/B Testing Compare your campaigns and detect the best-performing and winning variation.
Creating a campaign experiment
First you need to create an A/B testing experiment in MVMCloud Analytics: read the A/B testing user guide to learn more.
When asked which landing pages the experiment should be activated on, we recommend selecting "Visitors enter this experiment on any page."
Incorporating a campaign experiment
In most cases, nothing needs to be done as long as the regular MVMCloud Analytics JavaScript Tracking Code is embedded into your website.
The generated experiment code ( _paq.push(['AbTesting::create', {...) does not need to be embedded into your website.
Implementing an experiment
As marketing campaigns are typically seen by your audience outside of your website (on other websites, in emails, in search engines...), you need to modify the campaign URL that takes users to your website.
Tagging A/B Test Variation in Your Marketing Campaign URLs
You just need to add two URL parameters: pk_abe
and pk_abv
which let MVMCloud Analytics know which campaign variation a user was able to see.
If your landing page is https://example.org/landingpage, include the following URL to link visitors to your site:
https://example.org/landingpage?pk_abe=$theExperimentNameOrId&pk_abv=$variationNameOrId
where:
- $theExperimentNameOrId is the name or ID of the experiment;
- $variationNameOrId is the name or ID of the variation (use original for the original variation).
Example of marketing campaign URLs
For example, when the blue variation of the buyNowColor experiment is displayed, the URL will be:
https://example.org/landingpage?pk_abe=compreAgoraCor&pk_abv=azul
When the original version for the comprarAgoraCor experiment is displayed, the URL will be:
https://example.org/landingpage?pk_abe=compreAgoraCor&pk_abv=original
If you prefer not to have the experiment name in the URL, use the experiment ID and variation ID:
https://example.org/landingpage?pk_abe=5&pk_abv=19
After adding the URL parameters, your visitors will automatically enter the experiment when they visit your site through your campaign and you will be able to analyze if any of their behavior is different depending on the variation displayed.
Finding an experiment ID and variation ID
As shown in the example above, you can use the experiment name and variation name or the experiment ID and variation ID in the URL. Using IDs is useful when you don't want to expose the names of your experiments and variations in the URL.
- You can find the ID of an experiment in the list of all experiments in its MVMCloud Analytics;
- A variation's ID is shown when you edit your experiment in your MVMCloud Analytics and hover over a variation (mouse over a variation form field).
IDs are also displayed in the "Embed code" area when you edit an experience in the tracking code example.
Using A/B testing alongside standard MVMCloud Analytics campaign tracking
We recommend creating experiments to measure your marketing campaigns as this will provide additional value such as:
- Clear reports focused on results;
- An indicator of statistical significance of the performance of your campaign variations;
- The ability to use IDs instead of names;
- Measure the impact of certain variations of your campaigns over time;
- Measure the performance of certain variations in various marketing campaigns;
- and more.
Tag marketing campaign URL with A/B testing experiment and default campaign parameters
We recommend tagging your campaign URLs with the default campaign tracking parameters and your A/B testing experiment.
The default campaign parameters are:
- mtm_campaign- The name of the campaign;
- mtm_kwd- The campaign keyword. This parameter is optional.
In addition to the parameters above, there are 6 more optional parameters for you to obtain even more information about your advertising campaigns:
- mtm_source - Defines the campaign source (Like Google or Facebook)
- mtm_medium - Defines the medium used in the campaign (such as email or cpc)
- mtm_content - Defines the campaign content
- mtm_cid - Defines the campaign identifier (ID Code)
- mtm_group - Defines the target audience for the campaign
- mtm_placement - Defines campaign placement
For example, when the original
version for comprarAgoraCor experiment has been displayed and you are sending a PromoVerão email marketing campaign,
the URL you link to in your emails will be:
https://example.org/landingpage?pk_abe=comprarAgoraCor&pk_abv=original&mtm_campaign=PromoVerão
For more details about URL parameters, see the [Campaign Tracking] guide (tracking-campanha.md).
Finishing an experiment
When an experiment is completed:
- Remove the two URL parameters
pk_abe
andpk_abv
from your marketing campaigns. If visitors still visit your site through one of these URLs, MVMCloud Analytics will simply ignore the two URL parameters and no longer insert visitors into the experiment; - If the experiment proved that one of your campaign variations performed significantly better than another, now is the time to change your campaigns to the winning variation and benefit from higher conversion rates.
Happy experimenting!