matelso platform
matelso optimally connects telephony, chat, email or contact forms. Our intelligent lead management simplifies communication and enables you to achieve better marketing results.
matelso platform in detail
Call Tracking

MarTech phone call analysis software for companies, agencies & portals to get valuable data from inbound calls.

Call Tracking in detail
Marketing Use Case
How the matelso platform boosts your marketing.
Sales Use Case
How the matelso platform boosts your sales process.
E-Commerce Showcase

Showcase of the matelso platform in E-Commerce

B2B Lead Gen Use Case

How does the matelso platform help with B2B Lead Gen campaigns?

Features
What capabilities does our matelso platform offer? All features at a glance.
Consulting
Do-it-with-me instead of DIY: Work with our consultants to really get the most out of the platform.
Consulting
Do-it-with-me instead of DIY: Achieving more together with our consultants.
Use Cases

Three industries that should rely on call tracking: B2B, automotive and agencies!

Learn
BlogThrough our blog, we share knowledge and insights with our readers – always useful, always interesting.
WebinarsWith our matelso webinars, you can experience our MarTech technologies and solutions and get valuable tips for your online marketing.
Knowledge BaseOn our matelso Knowledge Base you can delve deep into the engine room of our Call Tracking and MarTech technology.

Connect

CareerCreating a new data-based era of communication – if you share this vision, we should get to know each other.
Partner modelHelp your customers better understand and manage their customer journey – while also generating a new revenue stream.

matelso

About UsThe MarTech company matelso – we stand for innovative and simple solutions that make your marketing more efficient.
NewsroomNews, press releases and more – all news about matelso at a glance.

matelso Custom Push for Google Analytics 4

Matelso offers a standard integration for Google Analytics 4. In the standard integration, however, some values are fixed, such as the Google Client ID. If you want to use a different value or feature from the Custom Push configuration, we have instructions for you here. #

This integration is build upon the measurement protocol of google analytics 4: Measurement Protocol
Google introduced “Google Analytics 4”. In version 4 some reforms are to be minded. Among other things, there will no longer be UA IDs in the new version, but data streams and measurement IDs.

1. The new version 4 is now also supported as a standard integration in our matelso systems. With a custom push, however, you get more configuration options. The prices for this can be seen in the contract and in the sidebar under Integrations 2.0.

2. This article is intended as a support service. Therefore, the contents of this article cannot be covered by the standard support and any support provided by matelso on this topic will be charged as a consulting service. Please contact service@matelso.com for this purpose.

3. The Measurement Protocol interface of Google Analytics 4 is still in a preview mode (alpha). This means that there may be major changes to this interface, which may also lead to incompatibility of existing integrations. This also applies to the content of this article.

 

Create Custom Push #

In this step, we set up a Custom Push that transfers the call data into GA4 using the Measurement Protocol.

In the example, we are setting up a custom push called “GA4 Custom Push” that will be sent as a POST call. We don’t set up a filter because we want to transfer every call.

Next, we set up which data should be transmitted. For this we select “POST” as HTTP method and add 2 GET parameters:

Now we enter the Measurement Id again and our API Secret. You can find/create those informations in Google Analytics 4:

Now we fill the POST body with the following content:

{
"client_id": "{{{{webData.googleAnalytics4.PLAEHOLDERFORYOURM-ID.client_id.attribution(LASTNOTEMPTY)}}”,
"events": [{
"name": "InboundCall",
"params": {
"action": "{{callData.status}}",
"label": "{{callData.aNumber.city}}",
"value": "{{callData.callDuration.timeSpanFormatter(TotalSeconds)}}",
"currency": "EUR"
}
}]
}

The parameters “action”, “label” and “value” are set to the following DDD Keys (identical to the standard Universal Analytics Push configuration):

This is only one example of possible parameters. The parameters can now be freely set and defined by you.

Destination of the push is Google Analytics:

We choose HTTPS as protocol.

Host: www.google-analytics.com

Port stays at 443.

Path: /mp/collect

The rest is kept as default since our authentication is via API secret and not via https.

The last thing we do is link our custom push to the pools. The data now flows into Google Analytics 4.Als letztes verknĂĽpfen wir unseren Custom Push mit den Pools. Die Daten laufen nun in Google Analytics 4 ein.

The following Steps are only necessary, if you don’t use the account functionality of the matelso control panel to save the API Secret and collect the GA4 Client ID.

 

Add matelso GA4 Snippet #

<script>
(function(){
var ga4PropertyId = 'G-';
function getGa4() {
if(mtls.loaded) {
gtag('get', ga4PropertyId, 'client_id', function (clientID) {
window[window.CallTrackingObject]("addCustomTrackingValues", { ga4ClientId: clientID });
});
} else {
setTimeout(getGa4, 150);
}
}
getGa4();
})();
</script>

Simply play out this script on the page after the matelso script. If the script is played out via a tag manager, then play out this script on the same pages.

In this script the variable ga4PropertyId must be set to the Measurement Id of the GA4 property.

After this variable is set correctly and the script is built on the page, it can push the GA4 ClientId into the matelso DataLayer and we have access to it in Integrations 2.0.

 

ReferenceError: gtag is not defined #

If this error message appears in the browser console, we add the following after the opening script tag (“<script>”) in the script shown under 1:

function gtag(){dataLayer.push(arguments);}