Skip to main content
All CollectionsIntegrations with analytics systemsJS functions & GTM
JS functions. Integration with Google Tag Manager (transmission of call events)
JS functions. Integration with Google Tag Manager (transmission of call events)
Katerina Tverdochleb avatar
Written by Katerina Tverdochleb
Updated over 4 months ago

Google Tag Manager (GTM) is a multifunctional and free solution from Google that allows you to place custom scripts on website pages without directly interfering with its code.

GTM enables not only easy addition and updating of Google service scripts on your site but also setting rules for activating various tags.

The GTM container allows you to add both ready-made functions that Google has already provided (GA, events, transactions, remarketing, etc.) and your own scripts, which can be placed as custom code (Ringostat script, for example).

Setting up the integration allows sending events from Ringostat to Google Tag Manager, which will make it possible to trigger any script after its activation. In other words, with the right approach to solving the task and a vision of the end goal, you will be able to integrate Ringostat with almost any service that requires script execution.

What is dataLayer?

dataLayer is a JavaScript object array that can be used to pass an event to Google Tag Manager at a specific moment of a call. In the GTM interface, based on the transmitted data, you can set up triggers, as well as expand the information transmitted to Google Analytics about the site visitor who called.

Google Tag Manager cannot track offline events and can only track events that occurred on your website.

In the case of a call, the event will be sent by the Ringostat script and triggered from the visitor's side, in their browser. If at this moment their site is already closed, the call event will not be transmitted and, as a result, there will be a difference in the number of calls in the Ringostat journal and the system to which GTM redirects data from the trigger activation.

If the visitor opens the site again on the same device within 24 hours, the call event will be sent with a delay.

Setting up event sending from Ringostat
In your Ringostat personal account, go to the "Call tracking" -> "User JS functions" section.

  • You can send an event to GTM at the following moments:
    Before the call

  • At the moment of picking up the phone

  • After the call

Select the necessary moment for sending the event by clicking on its field and click on the "Edit code" button

Next, you need to specify the function name* that will be executed at this moment of the call, add the function to the editor field, and click "Save"

We recommend adding names that describe the action performed by the function

Example of adding an event to the data layer: dataLayer.push({'event': 'RingostatCall'})

After returning to the call moment selection menu, click the "Save" button

  1. JS functions. Event tracking in GTM

  2. Event transmission to Google Analytics 4 "Before the call"

  3. Event transmission to Facebook Pixel "After the call"

  4. Event transmission to Google DV360 or Google Campaign Manager "Before the call"

  5. Event transmission filtering

Did this answer your question?