Connecting goals in Quriobot to a marketing tag from Quriobot is very easy to do! On this page you can find two examples for Google Analytics and the Facebook pixel. 


If you want to follow everything in Google Analytics please use this explanation instead


Google Analytics:

To track custom events via Google Analytics, you can make use of the analytics JS API and the 'script' chat text type: 

function () {
        ga.getAll()[0].send({
        hitType: 'event',
        eventCategory: 'Quriobot',
        eventAction: 'Started',
        eventLabel: window.location.href
    })
}


You can add the code above to any SCRIPT chat message (developer mode has to be enabled) (select this in the drop-down on the right side) within the bot when you want your event to be tracked:


Note that in this example we use the first existing GA tracker.

Alternatively, you can create a new one:


function() {
    ga('create', 'UA-XXXXX-Y', 'auto', 'tracker1');
    ga.getByName('tracker1').send({
        hitType: 'event',
        eventCategory: 'Quriobot',
        eventAction: 'Started',
        eventLabel: window.location.href
   })
}



Facebook pixel

For launching the Facebook pixel you will need the code below. Within that code you configure your Facebook ID (id=) and you configure the Event (ev=) you want it connected to.

This example makes use of a <noscript> logic to able to use these within the bot HTML chat message type by launching an invisible pixel which in term is connected to the Facebook service.

<p style="display: none">1</p>
<div style="border-radius: 9px; overflow: hidden">
<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=XXXXXX&ev=test&noscript=1"/>
</div>



You can add the code above to any HTML chat message (select this in the drop-down on the right side) within the bot when you want your tag to be launched:

Note: If you want to use more parameters to connect with please find more info here: http://randomproblems.com/use-facebook-img-tag-fire-pixel-events/


 



Important note: please keep (local) rules about tracking people in mind and make sure you ask for permission.




Need more help or looking for inspiration? Join the Quriobot community!

Quriobot
Friendly & Fun
Interact & Convert



JS API