Sending Widget Events to Google Analytics

Learn how to integrate your Reteno forms with Google Analytics.

You can send the event data related to the interaction of users with your Reteno widgets to your Google Analytics (GA) account.

Reteno supports the Universal Analytics and Google Analytics 4 scripts for tracking events on your website. You have to install the script, using one of the following methods:

šŸ“˜

Important

It is recommended to install the Google Analytics 4 script, since the Google Universal Analytics property will stop processing data starting on July 1, 2023 (July 1, 2024, for Analytics 360 properties).

After that, you have to enable exporting the widget event data to Google Analytics.

Setting Up GA4 Script for a Website

To set up the Google Analytics GA4 script for a website:

  1. In your GA account, select the Admin icon to open the GA settings.
Google Analytics Admin menu with the Admin icon highlighted in the bottom-left corner
  1. Click Create → Property.
Admin page with the Create dropdown open and the Property option highlighted
  1. In the Property setup, enter the property name, select the country, the time zone and the currency, then click Next.
Create a property form with property name, reporting time zone, and currency fields, and the Next button highlighted
  1. Describe your business — indicate the industry category and company size.
Describe your business form with Industry category set to Shopping and Business size options highlighted

Choose your business objectives and click Create.

Choose your business objectives screen with Sales selected and the Create button highlighted
  1. Select the Web platform in the property menu.
Start collecting data screen with the Web platform option highlighted
  1. Enter the website URL and the stream name in the corresponding boxes, then click Create stream.
Set up your web stream form with Website URL and Stream name fields, and the Create & continue button highlighted
  1. Go to the Web stream details and click the copy icon beside the Measurement ID.
Web stream details panel with the Measurement ID and its copy icon highlighted in red
  1. Go to your site and insert the following code after the <head> tag, where substitute MEASUREMENT_ID with the one copied in the previous step.
<!-- Google Analytics -->
   <!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id={MEASUREMENT_ID}"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', '{MEASUREMENT_ID}');
</script>

Setting Up GA4 with GTM

Before proceeding to setting up GA4 with GTM, you have to:

  1. Create a GTM account and a container following these instructions.
  2. Follow the GTM standard web page installation instructions.

To set up Google Analytics 4 (GA4) with Google Tag Manager (GTM):

  1. Follow steps 1 to 6 described in Setting up GA4 script for a website section.
  2. In Tag Manager, select Tags in the left-hand side menu and click New to create a new tag.
Tag Manager Tags section highlighted in the left menu, showing no tags yet and the New button highlighted
  1. Set the following tag configuration and triggering, then click Save:
  • Select Google Analytics: GA4 Event as Tag Type.
  • Use the measurement ID copied in step 7 of this instruction.
  • Select All pages for Firing Triggers.
Tag configuration for the RetenoTM tag with Google Analytics: GA4 Event type highlighted, Measurement ID filled in, and All Pages selected as the firing trigger
  1. In the left-hand side menu, select Triggers and then New to create a new trigger.
Tag Manager Triggers section highlighted in the left menu, showing no triggers yet and the New button highlighted
  1. In the slideout window, enter the trigger name and click the Trigger Configuration pane.
Reteno event trigger configuration with the Choose trigger type panel open and Custom Event option highlighted
  1. Set the following configuration in the trigger configuration window:
  • Select Custom Event as the trigger type.
  • Enter reteno as the event name.
  • Select All Custom Events for the trigger to fire on.
Reteno event trigger configuration with Custom Event type, event name reteno, and All Custom Events option highlighted
  1. Go to Variables in the left-hand side menu, and select New in the User-Defined Variables pane.
Tag Manager Variables section highlighted in the left menu, with the New button highlighted under User-Defined Variables
  1. In the slide-out window, enter configuration name and click the Variable Configuration pane.
eventAction variable configuration with the Choose variable type panel open and Data Layer Variable option highlighted
  1. In the slide-out window, set the following parameters, then click Save:
  • Variable Type
  • Data Layer Variable Name
  • Data Layer Version
eventAction variable configuration with Data Layer Variable type, variable name eventAction, and Data Layer Version set to Version 2

You have to create the 3 variables with the following parameters:

Variable TypeData Layer Variable NameData Layer Version
Data Layer VariableeventActionVersion 2
Data Layer VariableeventCategoryVersion 2
Data Layer VariableeventLabelVersion 2
  1. Go to Tags in the left-hand side menu, and create a new tag with the following configuration, then click Save:
  • Select Google Analytics: GA4 Configuration as Tag Type.
  • Select the tag you created at step 3 in Configuration Tag.
  • Enter reteno as the event name.
  • In Event Parameters, use the parameters and their values created in steps 8 and 9.
  • In Firing Triggers, select Reteno event.
RetenoGA4 tag configuration with GA4 Event type, event name reteno, Event Parameters table, and Reteno event selected as the firing trigger
  1. Click Submit on the top panel.
Tags list showing RetenoGA4, RetenoTM, and Google Analytics GA4 tags, with the Submit button highlighted

Enabling Widget Event Data Exporting to GA

To enable the widget event data transfer:

  1. In your Reteno account, click Site — Widgets, and select the widget type in the left-hand side menu.
Analytics
  1. Select the widget, which events you want to export.
  2. In the Widget Details menu, select Integrations and enable the Export data to Google Analytics slide button.
Widget Integrations tab with the Export data to Google Analytics toggle switched on and highlighted

All the event data collected for that widget will be passed automatically to your GA account.

Viewing the Real-time Analytics

To view the real-time analytics in your GA account:

  1. Select Reports → Realtime in the left-hand side menu.
  2. Select reteno in the Event name column.
Google Analytics Realtime overview page with the Realtime menu item and the Event count by Event name panel highlighted

The list of event parameters displays. Click them to see the events.

Event count by Event name panel for the reteno event, with eventAction, eventCategory, and eventLabel parameter rows highlighted

The highlighted parameters are explained in the following table.

ParameterDescription
eventActionIt contains the events as described in Event categories and actions.
eventCategoryWidget type.
eventLableWidget ID.

Event Categories and Actions

GA displays Reteno events in a table as shown below.

Google Analytics table listing Reteno events by Event Category and Event Action, showing BUILT_IN, DETACHED, and FLOATING_BOX categories with active user counts

The Event Category column contains the description of a widget/form type as described in the following table.

Widget/form typeDescription
BUILT_INInline widget/form
DETACHEDPop-ups
FLOATING_BOXFloating box, informer
LAUNCHERLauncher
CONTENT_LOCKERContent locker

The Event Action column in GA contains the action type made on a widget. The event actions are explained in the table below.

Event ActionDescription
LauncherShow_ a wThe launcher button displays on a website.
LauncherClick_The launcher button clicked.
FormShow_websThe form is displayed on a website.
FormClose_rm.A site visitor closed the form.
FormButtonClick_ttonA site visitor clicked the form button.
FormClick_ereA site visitor clicked anywhere within the form.
FormStartFilling_he fA site visitor started filling up the form.
FormFinish_subsA site visitor completed the subscription form (clicked ā€œSubscribeā€, no form validation errors)
FormSuccessSubscribe_ccesForm filling up status (subscription success)
FormAlreadySubscribe_bed)Form filling up status (already subscribed)
FormErrorSubscribe_erroForm filling up status (subscription error)

The send part of the events for a specific widget sending its data to GA has the following structure: f(form){id}v(variant){id}, where f(form){id} is the form ID and v(variant){id} is the form variant ID (see Note).

For example, FormShow_f781v781 in your GA table means that the form with the ID of 781, and the variant ID of 781 was displayed on a site.

The form ID is displayed in Reteno, on the Widgets page in the ID column.

Widgets page listing Launcher, Informer_popup, and Widget forms with their ID column highlighted

Did this page help you?