Sending events to Google Analytics (GA) or Facebook via Quriobot

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 () {
        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');
        hitType: 'event',
        eventCategory: 'Quriobot',
        eventAction: 'Started',
        eventLabel: window.location.href

Facebook pixel

For launching the Facebook pixel you can you Tracking pixel chat text type and insert the pixel code obtained from the Facebook.

Note: If you want to use more parameters to connect with please find more info here:

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

Using GTM data layer to send the events


1. Enable developer mode in QB

2. Set up the data layer push scripts per step (eg Start and finish)

3. Create a custom variable in GTM of the data layer variable type and you call that, for example, conversion_type

4. Create GTM triggers for, for example, chatbot started/finished from other intermediate steps where the data layer is fired.

5. Choose chatBot as the event name (that is the event name in the data layer push)

6. Choose a few adjusted events for the trigger

7. Choose a conversion type that is the same as the data layer variable (eg Chatbot started or chatbot ended)

8. Create a tag that is triggered by the above

choose as Category eg Chatbot

choose as Action: {{conversion_type}}

In the end, you have something like that in GTM:

The great thing is that you can fire conversions from GTM to Google Analytics, Google Ads, Facebook, and other channels in one fell swoop.

Edit this page

See also