Skip to main content

Optimizely Integration

Written by Charley Bader
Updated over a week ago

Using Made With Intent, you can integrate with Optimizely to trigger in-session experiences based on real-time visitor intent.

This allows teams to continue building experiences in Optimizely, while using Made With Intent to decide who should see an experience and when, based on what a visitor is trying to do in that moment.

Triggering In-Session Experiences

Made With Intent allows you to trigger in-session experiences based on real-time intent, rather than static behavioural rules.

Using the Campaign Manager, you have two options to set these up. You can..

  1. Configure custom code that runs when a visitor enters a specific Intent Segment

  2. Configure a third-party trigger that fires when a visitor enters a specific Intent Segment

At a high level:

  • Made With Intent continuously models visitor behaviour during a session

  • This behaviour is translated into live intent inferences (such as intent stage or confidence)

  • When a visitor matches the conditions of an Intent Segment, a trigger is fired

  • That trigger can be used to launch an experience in a third-party tool

This makes it possible to respond to changes in intent as they happen, rather than relying on fixed rules like page views, time on site, or URL conditions.

How this works?

Option 1) Using Custom Code

  1. Set up your experience within the Made With Intent platform. When you come to add content to your experience select 'Custom Code'

  2. Enter custom JS in the experience editor

    E.g.

    MyVendor?.invokeExperience( 'test-A' )

    Note that campaign and experience information is exposed in an MWI variable that you can use to pass additional data to your site APIs. E.g.

    MyVendor?.invokeExperience( 'test-A', {
    experience_id: MWI.EXPERIENCE_ID,
    campaign_id: MWI.CAMPAIGN_ID,
    experience_name: MWI.EXPERIENCE_NAME,
    campaign_name: MWI.CAMPAIGN_NAME,
    } )

    window.intentActiveCampaign = MWI.CAMPAIGN_NAME;
    window.intentActiveExperience = MWI.EXPERIENCE_NAME;

Option 2) Using Third Party Triggers

  1. Set up your experience within the Made With Intent platform. When you come to add content to your experience select 'Third Party Trigger'

  2. Choose 'Custom JS Trigger'

  3. When you create this trigger, a trigger ID is shown in the experience modal, along with a number of available JavaScript snippets.

  4. You can copy one of the available snippets into your third party platform triggers, segments or actions to drive campaigns.

    E.g.


    document.addEventListener(
    'intent.campaign.<trigger ID>',
    function(e) {
    // Add trigger code here in platform triggers
    resolve(true); // run campaign
    }
    );

  5. Save the trigger and put the campaign live.

    This event is dispatched each time the experience is triggered, ensuring in-session responses stay aligned with the visitor’s current intent.

More information can be found in our developer support docs

Did this answer your question?