Service Form Logo.

Sending custom data from Serviceform tools to GA4

Learn how to collect data from user interactions in Serviceform tools.

If you're not yet familiar with Google Tag Manager and Analytics, don't worry! We've got you covered. Check out our previous articles (Setup & send data) for a step-by-step guide to get you up to speed. This article mainly focuses on the following:

      • Sending data from Serviceform tools.

How to send data from Serviceform tools?

The Defaults events initiated by the Serviceform tool are sent via the Data layer. In addition to these, you can create and send custom events to the Data layer which can be then forwarded to Google Analytics via Google Tag Manager. Here's how to do it:

1. Login to your Serviceform account and select your preferred tool under Tools section.

2. Navigate into the Flow section.

3. Choose an element in the flow builder that you want to trigger a custom event.

4. Click on Actions and add a new action to the selected element.

5. Select Run Custom JS(Javascript).

6. Under Custom Javascript, type the javascript code to push the event to the data layer. You can name your event, i.e. button_push, according to your preference.

          window.dataLayer.push ({'event': 'button_push'});

7. Once you have saved and published the chatbot in your Website, you can receive the custom events from the chatbot when the element is triggered.

8. Open Google Tag Manager and set up a trigger to listen to the custom event.

9. Create a Tag in Google Tag Manager in order to send the data to Google Analytics.

10. Navigate to the Google Analytics dashboard, click on Reports, then proceed to Engagement and finally select Events. You can find the custom event that was pushed from your Chatbot to Tag Manager and subsequently to Google Analytics.

By following these steps, you can seamlessly connect your Serviceform chatbot with Google Analytics through Google Tag Manager. It's like setting up a virtual handshake for your chatbot and analytics - easy and effective! Once everything is set up, you can track all your chatbot events effortlessly. Note that it would take up to 48 hours for the data to be updated in Google Analytics. Happy tracking!