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.
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.
- Create a new campaign in VWO.
- Include the SmartCode snippet in the Experience Site's head section.
- Remove the
- When external scripts are loaded, allow the VWO endpoints to resolve the CSP issues.
<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.
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.