Thanks to the power of our Engagement Builder, we are able to send a webhook to Google Analytics 4 after a selected event (for example, after a call ends, or a form is filled in). You can decide on the name of the events we send, the conditions of the trigger, and some of the parameters to be included and extracted in GA4 to ensure you can make the most of this data.
NOTE: Make sure to contact our support team in order to get the right rules in place in our end, so we can ensure we are capturing the relevant parameters from Google when you send us requests for dynamic numbers. Whether you use our javascript solution or our DNCS API, we need to make sure to find and store certain Google values for this to work correctly.
Creating a Workflow in our Engagement Builder
If you log into the Kaisa dashboard, you will see Engagement Builder as an option on the left hand side.
You will then need to click the build a workflow button in the top right and choose to build a custom workflow:
Then, name the workflow and pick which accounts the workflow should apply to (by default it applies to all your accounts in the Organisation, but you can use it for selected accounts, or even exclude selected accounts):
Event and Criteria
Once this has been completed, you can pick the event and criteria. You can pick a condition that will trigger the Event to be sent to GA4; we have picked when a call ends, but there are multiple criteria you can choose to narrow the conditions down (for example send only Answered calls, or of a certain duration or a specific Media. All conditions are explained here).
Delivery Method
The last thing to do is set up the delivery method. In this case, we must select Send a Webhook
We need to add Google's endpoint so they can receive our Events in their conversion API. The endpoint will point to Google Analytics and will contain your measurement ID and API secret. You can use this template below, adding your Measurement ID and your API secret directly in the endpoint:
Your measurement ID can be found in your Google account and if you don't have a API secret, navigate to: Admin > Data Streams > choose your stream > Measurement Protocol > Create - in your Google account.
More on Secrets here.
Your Webhook should look something like this:
The POST request body can be used as shown above/below. However, it is possible to customise the body, and you can also contact our support team if you require additional parameters: support@Kaisa.io
Our javascript solution will automatically try to find and store Google parameters needed for this to work, including the client_id and the session_id from Google (these cannot be removed from the payload below).
{
"client_id": "{{ meas_custom_dynamic.p_gtag_client_id }}",
"events": [
{
"name": "Event_name_goes_here",
"params": {
"campaign_id": "Kaisa",
"campaign":"{{session.utm_campaign}}",
"source":"{{session.utm_source}}",
"medium":"{{session.utm_medium}}",
"term":"{{session.utm_term}}",
"content":"{{session.utm_content}}",
"session_id": "{{ meas_custom_dynamic.p_gtag_session_id }}",
"engagement_time_msec": "{{ duration }}000"
}
}
]
}
Once Events are received in your Google account, you will have to create a series of Custom Metrics and Custom Dimensions in order to store the parameters included with each Event (each Kaisa phone call in this scenario), like the Media or the call duration for example.
You can read more about creating these in Google's own documentation.
We also have a built in integration in Classic Freespee, that you can use to send data to GA4. This solution offers less customisation and has a set of defined parameters to be sent, but can be delayed if needed among other features. If you are interested in our Classic GA4 workflow, you can also find additional information here.
And that is it! If you have any questions or feedback at all, feel free to reach out to support@Kaisa.io
Comments
0 comments
Please sign in to leave a comment.