Beta Version

BLOG

Kapil Oliveti Author's Perspective
3 Minute read

How to Setup A/B Testing in Sitecore

How to Setup A/B Testing in Sitecore

A/B testing is about testing changes to a web page against the current page elements, content or design with the goal of improving conversion rates. With A/B testing, you can perform website optimization without guess work, since all the decisions you make will be based on which ones produce positive results from collected data.

A/B and multivariate tests enable a marketer to effectively improve the digital information on the website and other platforms to effectively engage visitors.

Here are the steps to setup A/B testing in Sitecore:

  • Create a goal that you want to use for A/B testing
  • Create a component that can accept a different version of the context, before setting up A/B Testing
  • Create a template with fields that stores data of a particular component
  • Create data source item of a particular component
  • Create a layout that accepts the information from the above template based onthe current context item
  • Register your goal based on appropriate action

Based on the variation, you can register the goal over actions as given below:

Sitecore.Analytics.Data.Items.PageEventItem regGoal = new Sitecore.Analytics.Data.Items.PageEventItem(Goal Trigger);

Sitecore.Analytics.Model.PageEventData eventData = Sitecore.Analytics.Tracker.Current.CurrentPage.Register(registergoal);

eventData.Data = GoaltoTrigger[VertaforeGlobalConfiguration.FieldNames.GoalDescription];

Sitecore.Analytics.Tracker.Current.Interaction.AcceptModifications();

System.Web.HttpContext.Current.Session.Abandon();

OR

Add this component to a page with appropriate datasource

 

Here are a few variations:

  • Go to the Experience editor
  • Select the component on the page
  • Click on the new variation.
  • Next, add variations. Inthe “TestItem” dropdown, you need to select an item. Note that you can add only those items that can be consumed by your component, otherwise it will not have any impact.

Next, save the changes and start the test. Remember that if your item has a workflow associated, then it should not be in the approved state, otherwise you will not be able to start the test. Right after this, you start the test and publish the changes.

Ebook
Upgrade to Sitecore 9.1 Using this Handy Guide

Altudo in partnership with Sitecore is fully committed to enable brands across verticals to woo their customers across all channels by creating exceptional customer experiences with 1:1 personalized content.

Check out our capabilities to know more about how we enable brands to build Revenue Engine using Sitecore.

If you have Sitecore implemented as your CMS and are looking to build a mobile application for Omnichannel CX, drop us a line at marketing@altudo.co

Kapil Oliveti


Browse Topics

Talk to our Experts

Talk to us about how we bring together 1:1 personalisation, deep Martech Expertise, CX & Demand Gen Strategy, Engagement Analytics & Cross-Channel Orchestration to drive award winning experiences that convert

Get in touch for a complimentary consultation or a demo today.

Expert Workshops

Free workshops, expert advice & demos- to help your realize value with Sitecore

Register

Session Presentations

  • Sitecore + SFMC= Marketing Success
  • Transforming The Future Of eCommerce
Meet Us

Giveaways:

Participate in our event survey , meet us at our booth , get free giveaways & a chance to win an iPhone 11

Let’s go