Skip to content

Share Campaign

1. Overview

You can share a campaign with customers in two ways:

  1. Share via a URL: include the campaign URL in your customer comunication tools like email and SMS
  2. Embed the campaign: embed the campaign directly into your existing customer-facing platforms, websites, or apps

To share a draft or published campaign:

  1. Go to the campaign details page
  2. Click the "Share" button. This will reveal two sharing options:

    • Share the link
    • Embed

Note: Draft campaigns do not process any data. However, you can still share them for testing purposes.

Share the campaign directly by sending its URL. Click "Share the link" to reveal the URL. Simply copy it and paste it into your browser to access the campaign.

3. Embed

Embed your campaign directly on your webpage:

  1. Click "Embed" in the sharing options
  2. A modal window will appear with auto-generated HTML code. Copy this code
  3. Paste the code into your desired location on the user interface

3.1. Standard

The standard embed is a simple iframe code that you can add into your user interface. This embed will display the campaign to any user who visits that page.

embed iframe

For instance, popular website builders like Wix and Shopify let you easily integrate One Creation campaigns through their HTML embed components. Simply add the component to your desired page and paste the generated code into the dedicated HTML field. Here's an example of what the code may look like:

iframe example

3.2. Regular Pop-up

A regular pop-up campaign can be added to your user interface. This campaign will appear to all users who visits that page. Users can easily dismiss it by clicking the dedicated "X" button in the top right corner.

embed popup

Once you save and preview the website, you will see the One Creation campaign seamlessly integrated. Here is an example website showcasing a One Creation pop-up window:

popup example

3.3. Conditional Pop-up

A conditional pop-up campaign appears only to users who meet specific criteria that you define. Here's how to setup the conditions:

  1. Click the link: in the modal window, locate the link titled "Set condition to launch this campaign" at the bottom left corner
  2. Configure the triger: the configuration window will appear. Here, you can define the condition that will trigger the pop-up. Example: Let's say you want a pop up to appear once a visitor logs in to your website. Assuming logged-in users have an email address set, you can configure the condition as: email is not empty

    embed conditional popup

  3. Once you've configured the condition in One Creation:

    • copy the embed code and paste it into your desired location on your user interface
    • set the parameter values in OCPreferences

Shopify example

This example demonstrates creating a conditional popup campaign on a Shopify page. When a website visitor selects "puppy food" from a product dropdown menu, they will see a One Creation campaign popup:

  1. Follow the steps above to setup a trigger on your campaign. In this case, the trigger is "product equals puppy"

    embed conditional popup

  2. Go to the Shopify page and switch to Show HTML view

    embed conditional popup

  3. Locate the section of the page where you want the OC campaign window to appear. In the example below, the Shopify page has a dropdown menu called "product". We want to pop up a campaign when user selects the option "puppy". Here's the sample code
<!-- An product dropdown menu -->
<div style="text-align: center;"><label for="Conditions">Choose a product:&nbsp;</label>
    <select id="product" name="product">
        <option value="puppy">puppy food</option>
        <option value="treats">treats</option>
        <option value="senior">senior dog food</option>
    </select>
</div>

<!-- Sets the product parameter values using setValues method from OCPreferences Module -->
<script>
    document.getElementById('product').addEventListener('change', function() {
        var product = this.value;
        if (OCPreferences) {
              OCPreferences.setValues({
                product: this.value,
              });
              OCPreferences.startDataRequest();
        }
    });
</script> 

<!-- copy and paste OC embed code below -->
<div data-campaign="12345-abcd-efg-hij-klmn" id="oc-embed-container"></div>
<script type="application/json" id="12345-abcd-efg-hij-klmn">
{
  "conditions": "BlcmF0aW9adsa834HJHSZXF1YWwifV1d"
}
</script> <script src="https://app.one-creation.com/embed/oc-embed.min.js"></script>

Last update: June 7, 2024