website logo
⌘K
Getting started
Create your Serviceform account
Pixel
Your Dashboard
Conversational tools
Serviceform glossary
FAQs
Cookies
GA 4 and DataLayer
Send events into GA4 from DataLayer
Cookie controller
Website analytics (Insights)
Custom event tracking
Chatbot
Design your chatbot
Build your chatbot
Settings
Preview your chatbot
Install your chatbot
Duplicate your chatbot
Translate your chatbot
Facebook Chatbot
Advanced
Live chat
Livechat teams
Trigger your livechat
Set hours
Desktop notifications
SMS notifications
Livechat in Serviceform App
Talk with the clients
Popup
Create your first popup
Popup type settings
Popup content
Popup design
Thank you page
Tracking and advanced settings
Language
Install your popup
Leadbar
Create your Lead bar
Types of Bars
Form
Build your form
Question types
Settings and design
Custom CSS & JS
Install your form
Emails
Install tools
Insights
Website analytics
Flow statistics
Live chat statistics
Ourly Calendar
Setup Ourly
Events
Sync Calendar
Email signature
Add email signature to Gmail
Social Inbox
Connect Facebook and Instagram
Meta Business Suite
Integrations
Sending lead via Webhooks
Google Analytics
Zapier and Webhooks
HubSpot with Zapier webhooks
Collect payments with Stripe
Leads
Filter leads
Export leads as XLS
Account
Settings
Change password
Plan settings and invoice history
Docs powered by archbee 
10min

GA 4 and DataLayer

In this post you can find documentation on how Serviceform works with Google Analytics, Google Tag Manager and Datalayer.

What is Google Analytics 4

Google Analytics has been the go-to website analytics tool for years, and the latest version Universal Analytics came out in 2012 - but in 2023 Google Analytics 4 is going to replace Universal Analytics globally. Universal analytics will be removed on July 1, 2023. What is the difference: - More privacy focused - Hard to setup - Bounce rate is dead, user engagement is the new thing - Cookieless management - Event tracking changes

Our partners have a lot of work to replace the scripts.



Google Tag Manager

Googles product for managing scripts / tags and third party tools on your website. Tags

Triggers

DataLayer

A way to store events. Can be foun

How to send default Serviceform events into GA4 from DataLayer.

By default serviceform chatbots and forms send the following events to datalayer.

  • Interaction - 'chat start' Interaction with any chatbot.
  • Lead - 'chat complete' Lead / submission. Practically chat is completed.
  • Live chat - 'live chat' A live chat between agent and end-user.
  • Redirect - 'redirect' Redirect from a chatbot or form to any outside or in page url.

Practically they are sent as DataLayer events. For example:

Text
|

To use these in Google Tag Manager, all you need to do is add a trigger and tag.

1. Add a trigger

This should have the event name from the datalayer push before: serviceform

You should set it to trigger on All Custom Events. Now all default serviceform events are triggering this trigger.

Document image

2. Add a tag

Tag type: Google Analytics: GA4 Event Add your configuration tag, or your configuration measurement ID (You can find this in your GA 4 admin data streams website settings).

And event parameters. You can modify these to your needs. In the example we use the event name {{DLV - chatProgress}} which will be any of the values mentioned before based on the users trigger. For example: live chat, chat started, chat complete, redirect.



Document image

3. Check your data

Double check that your data comes through to Google Analytics as wanted.

Document image

Customise

Due to the power of Google Tag Manager you can also customise these much further by adding logic to the tag configuration. You could for example change Event name: Serviceform {{DLV - chatProgress}} To make separation from your other events.

Updated 11 Jan 2023
Did this page help you?
Yes
No
UP NEXT
Send events into GA4 from DataLayer
Docs powered by archbee 
TABLE OF CONTENTS
How to send default Serviceform events into GA4 from DataLayer.
1. Add a trigger
2. Add a tag
3. Check your data
Customise