Skip to main content

JS functions. Filtering events for transmission

Valeriia Zaptalova avatar
Written by Valeriia Zaptalova
Updated over 2 weeks ago

In the Ringostat Panel, you may configure call transmission through Custom JavaScript Functions for different substitution types: Callback or calls from dynamic number substitution.

Calls from static number pools that do not originate from the website cannot be transmitted in this way.

To configure this, please add a JS function in the section Call trackingCustom JavaScript Functions.


Example configuration — transmitting the Call via Callback event

To do this, please click Edit code and add the following code along with the event name — for example, RingostatCallback:

(function(data) {
if (Insertion_type=='callback')
{
dataLayer.push({'event': 'RingostatCallback'})
}
});

You may choose the event name freely — the most important part is linking it to further settings in GTM.

In the GTM interface, please create — as described above — a trigger of the Custom Event type, with the name corresponding to the defined event:

Next, please go to the Tags section and create a new tag, setting:

  • Tag type – Google Analytics / Universal Analytics

  • Tracking type – Event

  • Category – event name (the same as in the trigger)

  • Action – action

  • Label – event label

  • Value – event value (e.g., 10)

  • Google Analytics settings – GA identifier or a variable containing the identifier

  • Activation trigger – the trigger created earlier

After completing these steps, please save and publish the changes.

After a Callback-type call appears on the website, an event with the name you specified will appear in the Google Analytics reports.


Available additional filters

Below are the parameters that can be used to create filters:

Parameter

Description

Type

Call type: in/out/callback

Call count

How many calls the clietn made

Pool name

Name of the number pool (usually indicates the source/channel to which the number is assigned)

Source

Traffic source of the visitor – UTM utm_source

Medium

Traffic medium – UTM utm_medium

Campaign

Advertising campaign – UTM utm_campaign

Content

Ad content – UTM utm_content

Keyword

Keyword used in the campaign – UTM utm_term

Visitor UUID

Google Analytics Client ID of the visitor

Visitor IP

Visitor’s IP address

Google_Analytics_resource_ID

Google Analytics tracking ID

Unique_call

Indicates whether this is the first call from the given number

The_number_in_the_E.164_format

Phone number in E.164 format (up to 15 digits, usually with “+”)

Responsible_managers

List of employee IDs participating in call handling

ID call

Unique call ID in Ringostat

Custom

Custom parameter captured on the website

Roistat_Visit_ID

Roistat visit ID (if integration is active)

Last Page

Page from which the call was made

Insertion type

Substitution type: Dynamic/Static/Callback

Referrer

Source/referrer from which the visitor arrived

User_agent

Device and browser information

Call_forwarding_scheme

Name of the forwarding scheme to which the call was routed

Project_ID

Project ID in Ringostat

Additional_number

Internal employee number in the system


To add a variable, please begin typing its name or press Ctrl + Space and select the variable from the list.

Did this answer your question?