People working on laptops

Run A/B tests in Salesforce Experience Cloud using VWO

by Nikita Verkhoshintcev

Back in the day, I was working on an e-commerce website built with Salesforce Experience Cloud.

We were planning to run the AB tests using Google Optimize then.

As a result, I created a lightning web component that renders two areas in the lightning experience site builder for control and variant versions.

It allowed admins to drag and drop components into those areas. The component renders the content depending on the Google Optimize target audience. So, it was pretty straightforward and didn't require any coding.

Salesforce Experience Site Builder AB Tests

Eventually, I wrapped a component into a package to make it easy to distribute between the projects.

I recently discovered that Google Optimize shut down its service as of September 30, 2023.

I've updated the package to use VWO instead. The new version is available on the AppExchange.

It works the same way, except it requires the configuration on the VWO platform.

Here is a quick guide on how to run the AB test using the new version.

  1. Create a new campaign in VWO.
  2. Include the SmartCode snippet in the Experience Site's head section.
  3. Remove the <link rel="preconnect"> element.
  4. When external scripts are loaded, allow the VWO endpoints to resolve the CSP issues.
  5. Include <script src="/sfsites/c/resource/confluxf__dfPubSub"></script> to the head section.

Note: Currently, the component supports only two variants.

Here is a short instruction video as well.

Nikita Verkhoshintcev photo

Nikita Verkhoshintcev

Senior Salesforce Technical Architect & Developer

I'm a senior Salesforce technical architect and developer, specializing in Experience Cloud, managed packages, and custom implementations with AWS and Heroku. I have extensive front-end engineering experience and have worked as an independent contractor since 2016. My goal is to build highly interactive, efficient, and reliable systems within the Salesforce platform. Typically, companies contact me when a complex implementation is required. I'm always open to collaboration, so please don't hesitate to reach out!

Let's work together!

Do you have a challenge or goal you'd like to discuss? We offer a free strategy call. No strings attached, just a way to get to know each other.

Book a free strategy call

Stay updated

Subscribe to our newsletter to get Salesforce tips to your inbox.

No spam, we promise!