Skip to main content
All CollectionsAdvanced analytics
Advanced Analytics - Custom conversions
Advanced Analytics - Custom conversions
Marine CIPRIANO avatar
Written by Marine CIPRIANO
Updated yesterday

The minimal integration includes the following steps:

  1. Add the JavaScript script code to the <head> section

  2. Add the Conversions Tracking codes

Step 1 - Adding the JavaScript script code

  1. Once you are logged into your JOIN Stories account, you can continue with the installation by clicking this link.

  2. In your settings, click on Installation

  3. Within the Installation section, you'll find the Global JavaScript code. Simply click the "Copy Code" button to copy the JavaScript code.


  4. 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.

Did this answer your question?