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

Salesforce Consultant

Senior Salesforce and full-stack web developer. I design and build modern Salesforce, React, and Angular applications for enterprises. Usually, companies hire me when complex implementation, custom development and UI is required.

Let's work together!

Contact us today and take your digital end-user experience to the next level.

Contact us