Click “My Account” (or “Set Up My Account” if you’re accessing your account for the first time). Enter your contact information, the domain(s) on which you want to use Confection, and select one of our two data storage options. Then, click “Save Changes.”
Inside your Confection account, click "Install Confection" > "Downloads." Then, click the "PHP" tile to save the necessary files to your desktop. Unzip them, and upload
cable.php to a server or PaaS/cloud service that can execute scripts (Elastic Beanstalk, Digital Ocean, Heroku, &c). (Simply uploading
cable.php to a CDN that hosts static files won't work.) You'll need the link to this script later in this process.
At this point you have two options. If neither applies to you, skip ahead to the "Get Your Custom Code" step.
Next, use our code-builder tool to set your privacy options, choose your banner position, and even upload your own logo. Click the button below to get started.Get Your Custom Code
Make sure you add your complete, secure (ie.,
https:// included) URL you created earlier in this step (eg.,
https://link.to.script.com/cable.php) to the "Cable URL" field. To avoid mixed content errors, make sure you load
Next, log into Shopify. In your store, select "Actions" > "Edit code." Then, open the Layout folder and, finally,
theme.liquid. (If you've made modifications to your theme, the default
theme.liquid may not be the right place to add this code. The goal is to add the code above to your theme's default layout file.)
theme.liquid file, look for the opening and closing head tags (
</head>). Paste the custom header code you just generated above the
Next, look for the opening and closing body tags (
</body>). Paste the following code anywhere between your site's
Lastly, if it doesn't already, make sure the top-level domain you created earlier in this step (eg., the
link.to.script.com portion of
https://link.to.script.com/cable.php) appears in your account's list of authorized domains. To find this list, click "My Account" inside your Confection account.
If you'd like to use Confection to track conversion (checkout) events, do the following:
your-shopify-url.comwith your Shopify store URL.
your-shopify-url.comwith your Shopify store URL. And, on line 13, define your custom event name by replacing
EventNameHerewith whatever name you like (eg.,
That's it. You're done.
Questions or comments about using Confection with Shopify? Leave them below.
You can also use the chat app in the lower right corner.