Skip to main content
All CollectionsIntegrations with analytics systemsJS functions & GTM
JS functions. Sending events in Google Analytics 4 "Before the call"
JS functions. Sending events in Google Analytics 4 "Before the call"
Katerina Tverdochleb avatar
Written by Katerina Tverdochleb
Updated over a week ago

In the Ringostat Personal Account, we go to the "Script substitution" page -> "User JS functions", select the call moment and add an event dispatch to the data layer:

dataLayer.push({'event': 'beforeCall'});

In the GTM interface, we create an activation trigger with the "User Event" type and specify the event name from the data layer:


We go to the tags section and create a new tag, specifying the following data:

Tag type - Google Analytics: Google Analytics 4 event;

Metric identifier - specify the Measurement ID (GA4 counter identifier);

Event name - we name the event the same as the trigger (for example, beforeCall);

Activation trigger - previously created trigger "Before the call";

Did this answer your question?