Learn how to integrate your Shopify Plus store with Intelligems for a Campaign using Checkout Scripts.
In this article:
- Prerequisites: Download the Intelligems App and approve billing.
- Step 1: Add Intelligems JavaScript.
- Step 2: Set up your campaign.
- Step 3: Add the checkout script or function.
- Step 4: Add the progress bar widget. (Optional)
- Step 5: Add the quantity button widgets. (Optional)
- Step 7: Publish your theme changes and start your first test.
Prerequisites: Download the Intelligems App and approve billing.
If you have not already done so, please download the Intelligems app from the Shopify app store and approve billing in the Settings section in the app.
❗If you have chosen to have Intelligems complete the integration, many of these steps will be done on your behalf. Feel free to jump over to this article for an overview of the onboarding process and next steps.
Step 1: Add Intelligems JavaScript.
Add Intelligems JavaScript as a source into your theme.liquid file.
<head>
...
<script src="https://cdn.intelligems.io/<your_customer_id>.js"></script>
...
</head>
Your individual script tag is located on the settings page in the Intelligems App on the settings page.
Step 2: Set up your campaign.
If you have not already done so, the next step in the integration is to create your first Campaign and/or Campaign Test. Check out our guides on doing this here and here. Don't worry - it won't change anything on your site until you hit start and you can always make edits before launching it!
Step 3: Add the checkout script or function.
❗You must be using Shopify Plus to integrate with Intelligems using the Checkout Script. If you are not on Shopify Plus, you will use a Function instead.
✨ The checkout script or function will change slightly each time you set up a new Campaign or Campaign test, so you will need to edit it each time you are ready to launch a new Campaign.
Follow the below steps to add the Intelligems Campaigns checkout script to your Scripts Editor.
- In your Shopify admin, go to Apps and click on Scripts Editor.
- If you already have a Line Items script, you can create a copy and edit it. Make sure our script runs first so that discounts get applied in the correct order. If you do not already have a Line Items script, create a new one.
- Copy the loop found under the Checkout Script button in the upper right corner of your Campaigns overview page in the Intelligems app. Paste that into your script editor in Shopify. Save and publish the script.
Follow the below steps to add the Intelligems Campaigns function to your Shopify account.
🚧 This section is under construction! If you are not on Shopify Plus and are looking to use Campaigns now, please reach out to support@intelligems.io for assistance.
Step 4: Add the progress bar widget.
This step is optional and may not make sense for all campaign types. If you are running a campaign type where a customer must reach a threshold, or multiple thresholds, to achieve a certain discount, it may make sense to include our progress bar in your cart so that customers can quickly tell how much more they need to spend to get the best deal. This can also help increase your AOV. See our article here for integration instructions.
Step 5: Add the quantity button widgets.
This step is optional and may not make sense for all campaign types. If you are running a campaign type where a customer must reach a threshold, or multiple thresholds, to achieve a certain discount, it may make sense to include our progress bar in your cart so that customers can quickly tell how much more they need to spend to get the best deal. This can also help increase your AOV. See our article here for integration instructions.
Step 4: QA your integration.
After you have completed all previous integration steps, go through your store using Preview Mode in the Integration Widget (see more on how to start preview mode here) and make sure everything looks correct.
Step 5: Publish your theme changes and start your first test.
Once you have verified Intelligems is fully integrated, you can publish your theme changes (if you haven't already) and toggle your Campaign on, or start your test from the Intelligems App!