A/B testing and personalization

You can create different variants of your pages. You can show any variant (and even any combination of variants) based on any condition.

This means you can make Plasmic pages work with your choice of platform for A/B testing, personalization, feature flags, localization, and more. This way you can A/B optimize your page, or you can make different segments of users see different versions of your page. (Note that localization is a more specialized topic that deserves its own page.)

The process looks like this:

  1. Create variants of your page. For instance, when doing A/B testing, your base page is your control, and your variant is your experiment. Or if doing personalization, your base page is targeted at first-session visitors, and your variant is targeted at return visitors.

  2. When rendering your page in code, render the variant you want, based on which test or segmentation bucket(s) the visitor should fall into.

    For instance, for A/B testing:

    Copy
    // This represents however you determine your A/B testing group.
    // For instance, using Google Optimize, you might have some hook that consults window.google_optimize.get(YOUR_EXPERIMENT_ID_GOES_HERE).
    const isExperimentGroup = useExperimentGroup('experiment-id');
    // Render the correct variant of the landing page.
    <PlasmicComponent component="LandingPage" componentProps={{ experiment: isExperimentGroup }} />;

    Or when doing personalization:

    Copy
    const user = useUser();
    // This represents however you determine the segments that the user falls within.
    const segments = useAudienceSegments();
    // Render the correct variant(s) of the landing page.
    <PlasmicComponent
    component="LandingPage"
    componentProps={{
    women: segments.includes('women'),
    returning: segments.includes('returning-visitor'),
    ios: segments.includes('ios')
    isLoggedIn: user !== null,
    }}
    />;

That’s it!

If you don’t already have an A/B testing solution, here are some common ones:

Give feedback on this page