Turnjo
Log in
← All docs/Google Analytics & Tag Manager

Google Analytics & Tag Manager

Send Turnjo's events to the Google Analytics or Google Tag Manager already on your site, so popup views, leads and Chat show up next to the rest of your data.

Turn it on

  1. Open the site's Settings and find Google Analytics & Tag Manager.
  2. Under Send events to, choose how your site loads Google Analytics:
    • Google Tag Manager (dataLayer) if Google Analytics runs through a Tag Manager container.
    • Google Analytics 4 (gtag.js) if the Google tag is pasted straight into your site.

Choose only the one your site uses. Picking Tag Manager on a site that also loads gtag.js directly is fine; picking both isn't possible, so events are never counted twice.

The events

Event When
turnjo_view A popup, slide-in, bar or survey is shown
turnjo_lead Someone submits a popup's form
turnjo_survey_submit Someone submits a survey
turnjo_chat_open A visitor opens Chat

Each event has two parameters: turnjo_id, the popup or survey's ID, and turnjo_type, what it is (for example popup, slide_in or survey; chat for Chat).

With Google Tag Manager

Events are pushed to the dataLayer. To pass them on to Google Analytics:

  1. In Tag Manager, create a Custom Event trigger with the event name turnjo_lead (or use the regex turnjo_.* with Use regex matching for all of them).
  2. Create two Data Layer Variables, turnjo_id and turnjo_type.
  3. Create a Google Analytics: GA4 Event tag with the event name {{Event}}, add the two variables as parameters, and fire it on the trigger.
  4. Submit and publish the container.

With Google Analytics 4

Events are sent with gtag('event', …) and appear in Reports → Engagement → Events within a day (straight away in DebugView).

To count leads as conversions, go to Admin → Events and mark turnjo_lead as a key event. To report on turnjo_type, add it as a custom dimension under Admin → Custom definitions.

Consent

These events only go to analytics your site has already loaded. If your consent banner holds Google Analytics back until the visitor agrees, Turnjo's events wait too.

With consent mode on, Turnjo also holds its own events back until your banner reports consent. Events from before consent wait in memory on that page and are sent the moment the visitor consents there. If they decline, or leave the page first, those events are dropped and never sent. With consent mode off, events are sent straight away as before.