Configure GA tracking for your S2F chatbot
This guide explains how to configure your Google Analytics (GA4) or Google Tag Manager (GTM) account to track conversion events from the S2F chatbot. The chatbot script sends tracking data from the user's browser, which must be captured by your analytics setup.
s2f_chatbot with specific chatbot interaction details as event parameters (event_action, event_category, event_label).
The S2F chatbot tracks the complete customer journey through a series of events. All events are sent with the event name s2f_chatbot and differentiated by the event_action parameter.
The following three primary events track the customer's progression through the booking funnel:
chatbot_conversation_startchatbot_booking_details_acceptedchatbot_job_bookeds2f_chatbot. The specific action is identified by the event_action parameter. This is important when setting up custom events in GA4.
In GTM, go to Variables â User-Defined Variables â New.
Create a variable for each item below.
DLV - s2f_chatbot_event_actions2f_chatbot_event_model.event_actionDLV - s2f_chatbot_event_categorys2f_chatbot_event_model.event_categoryDLV - s2f_chatbot_event_labels2f_chatbot_event_model.event_labelGo to Triggers â New and configure the trigger to fire whenever the chatbot sends an event.
CE - s2f_chatbot Events2f_chatbotGo to Tags â New. This tag will send the collected data to GA4 when the trigger fires.
GA4 Event - S2F Chatbots2f_chatbotevent_action {{DLV - s2f_chatbot_event_action}}event_category {{DLV - s2f_chatbot_event_category}}event_label {{DLV - s2f_chatbot_event_label}}CE - s2f_chatbot EventIn your GA4 property, go to Admin â Data display â Custom definitions and click Create custom dimensions.
Create the three event-scoped dimensions below exactly as shown.
event_categoryevent_categoryevent_actionevent_actionevent_labelevent_labelTo track conversions effectively, you'll need to create custom events in GA4 based on the event_action parameter values.
Navigate to Admin â Events, then click Custom Configurations â Custom Events â Create. Choose "View More Options" and create the following events:
S2F_Chat_Startevent_name
equals (ignore case)
s2f_chatbot
event_action
equals (ignore case)
chatbot_conversation_start
S2F_Chat_DetailsAcceptedevent_name
equals (ignore case)
s2f_chatbot
event_action
equals (ignore case)
chatbot_booking_details_accepted
S2F_Chat_Bookedevent_name
equals (ignore case)
s2f_chatbot
event_action
equals (ignore case)
chatbot_job_booked
After creating the custom events:
S2F_Chat_Start and S2F_Chat_Booked as Key Events at minimum.
Once your Key Events are set up in GA4, you can import them into Google Ads for conversion tracking:
S2F_Chat_Start (for engagement tracking) and S2F_Chat_Booked (for conversion tracking) to optimize your Google Ads campaigns effectively.
After implementation, verify your tracking is working correctly:
s2f_chatbot event appear with the appropriate event_action values. S2F_Chat_Start, etc.) are appearing in your Events report.