Share Campaign
1. Overview
You can share a campaign with customers in two ways:
- Share via a URL: include the campaign URL in your customer comunication tools like email and SMS
- Embed the campaign: embed the campaign directly into your existing customer-facing platforms, websites, or apps
To share a draft or published campaign:
- Go to the campaign details page
-
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.
2. Share the link
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:
- Click "Embed" in the sharing options
- A modal window will appear with auto-generated HTML code. Copy this code
- 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.
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:
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.
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:
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:
- Click the link: in the modal window, locate the link titled "Set condition to launch this campaign" at the bottom left corner
-
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
-
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:
- Follow the steps above to setup a trigger on your campaign. In this case, the trigger is "product equals puppy"
- Go to the Shopify page and switch to Show HTML view
- 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: </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>