The minimal integration includes the following steps:
Add the JavaScript script code to the
<head>
sectionAdd the Conversions Tracking codes
Step 1 - Adding the JavaScript script code
Once you are logged into your JOIN Stories account, you can continue with the installation by clicking this link.
In your settings, click on Installation
Within the Installation section, you'll find the Global JavaScript code. Simply click the "Copy Code" button to copy the JavaScript code.
Add the copied code to the
<head>
tag in your store (all the pages).
The script will auto-detect that it's well integrated once you publish your website.
It is updated every 5mn.
Step 2 - Setting up conversion tracking
You can setup as many conversions as you want.
You need to call the function window.JoinStories.sendConversion
.
An example of how to call it on a trigger:
<script>
function sendConversion() {
if (!window.JoinStories || !window.JoinStories.sendConversion)
return; window.JoinStories.sendConversion({
conversion_type: 'click-to-buy', // type of conversion
conversion_name: 'Click to Buy', // name of the conversion
});
}
sendConversion();
</script>
conversion_id
is not mandatory, but if you have an ID on your side (e.g., if you also store it somewhere), you can provide it to us so that we use the same one. This will allow us to match our data with yours later when we do data exports.conversion_type
defines the type of conversion. It must be different for different conversion types. Example: one for click to buy, one for adding to favorites, etc.It must be written without spaces, as it is a slug. Example : "click-to-buy".
conversion_name
is simply a more readable version of the type, it should be unique for each type. This is what will be displayed in the dashboards.