Besides tracking shares and clicks, our sharing campaign also enables you to track conversions for those shares.
For example, let's say you want to get more signups for your newsletter and ask your advocates to share the link to the signup page with their friends. You can see how many times they shared it and in the reporting section you can even see the amount of traffic that was generated, but you can't see how many people actually signed up because of your advocates. By adding Ambassify's conversion pixel to your site, you can start keeping track of this and rewarding your advocates for the conversions.
Setting up the conversion pixel
First things first, you need to create an share campaign, just like you're used to. When you're creating a share campaign, you'll see there's a setting to enable conversion tracking at the bottom of the page. Go ahead and enable it. It will show you the code needed on your own website to track the conversions (it's the same for every campaign.)
What you need to do now is copy it and paste it on a page of your website inside of the page head tag. IMPORTANT: once someone visits this page, a conversion will be tracked in Ambassify and the advocate whose shared link was last used will be awarded the points. We recommend placing this pixel on a confirmation page or similar to prevent getting too many conversions. (For example on the thank you page of your newsletter signup.) That way it will only track a conversion after someone completed the desired interaction on your page.
If you do not have a dedicated confirmation page that only gets loaded when a conversion should be triggered, you can look into adding custom behavior below.
Adding custom behavior
From this point forward, things get a bit more technical so you might need some help from a web developer.
The conversion pixel as it is available from the Conversions tab of a campaign will track a conversion when it is loaded. This is useful when you have a thank you page on which you can place the pixel and it makes it very low effort to install the pixel.
However if you would like to track conversions when something dynamic happens on your page, such as when a button is clicked, you will need to modify the script slightly.
In most cases this will involve some co-operation of your web developer.
The pixel will generate a conversion within Ambassify every time the ambt('conversion')
line of the script is called. If you would not want to generate a conversion every time the script is loaded, but rather based on some event you can move that line into the event handler for your specific use-case.
An example that will track a conversion anytime a classic form submit button is clicked:
function trackConversion() {
ambt('conversion');
}
document
.querySelector('input[type=submit]')
.addEventListener('click', trackConversion);
Enriching the conversion data
By default the conversion tracking is able to track when something happened and where it happened and we will show this data in the administration panel. Depending on your website's capabilities, it's also possible to tell the conversion tracking script who visited a specific page.
Going back to the newsletter example, you could read the data someone filled in in the subscription form and pass it to our script. This way, the Ambassify backend could also show you who signed up.
To make this possible, you will need to make some changes to your conversion script.
Replace the call to ambt("conversion")
(inside the req square in the image above) with the code outlined below. Replace the givenName
and familyName
with code that fills in the right name and you are ready. If you do not have the first and last name separately, it's also possible to use name
instead.
ambt('conversion', 'ViewAction', {
agent: {
givenName: 'John',
familyName: 'Doe'
}
});