Integrations

Google Analytics

11min

All the information collected from the Serviceform tools will be automatically sent to the Google Analytics Account connected to the website. The information will firstly go to Events.

Document image


You can create the Goals using the data from the Chat Complete or Form submitted.

Create Goals in Google Analytics using an Event







In your Google analytics account, go to 'Admin' and then 'Goals'.

Document image


Click on 'New Goal'.

Document image


Setup you goal, by using a Custom configuration.

Document image


In the Goal description add a Name and select the Event type.

Document image


In the goal detail add:

For chatbots

  • Category: Serviceform
  • Action: Chat complete

For popups

  • Category: Serviceform
  • Action: Popup lead
Document image


Save your Goal and it's all set.



Change the Event name on your chatbot

Under Settings in the chatbot builder, you have the Notification settings, there, you can change the datalayers for both interactions or submissions.

Document image




Create Goals in Google Analytics using different chatbot options

For this you'll need to have basic undestanding of coding.

1. Think of the use cases that you need

Let’s say you want to seat as a goal “users who finished the submission and are interested in buying” or “users who finished the submission and are interested in recruitment processes”.

2. Add the Javascript

In the select one type of question paste the code in the Custom Javascript field, under the option 'show advanced seetings'. For example, this for buyers:

window.sfGaOptions = {  eventCategory: 'Chatbot option', eventAction: 'click', eventLabel: 'Buyers', transport: 'beacon' }

And this for recruiting:

window.sfGaOptions = {  eventCategory: 'Chatbot option', eventAction: 'click', eventLabel: 'Recruiting', transport: 'beacon' }



3. Change the eventLabel according to the name you want to be displayed in GA

4. Paste this at the end of the bot in Custom JS, under Settings

if (typeof ga === 'function') {  if ("ga" in window) {  tracker = ga.getAll(); for (var i = 0; i < tracker.length; i++) { if (tracker[i]) { tracker[i].send('event', sfGaOptions); } } } }

Do as many options as you like.