On Unlimited and Plus

Google Analytics and Tag Manager

Survey events in GA4 and GTM.

UserLoop tells Google Analytics 4 when a visitor sees, answers, finishes or closes a survey, through the Google tag or Tag Manager container your site already has. What people type never leaves UserLoop.

Read the docs
Choice labels and scores only. No written answers, emails or phone numbers.
4survey events
6event parameters
3routes: gtag, data layer, server

What is the UserLoop Google Analytics integration?

The UserLoop integration for Google Analytics 4 and Google Tag Manager turns survey activity into GA4 events. On your website, four events fire as a visitor sees, answers, completes or dismisses a survey, sent through your existing Google tag or pushed to the data layer for a GTM container you import. For checkout, popup, theme block, link and email surveys, UserLoop can send a completed event from its servers. Only choice labels and scores are included.

Events
userloop_survey_shown, userloop_question_answered, userloop_survey_completed, userloop_survey_dismissed
Parameters
survey_id, survey_title, question_id, response_id, answer, score
Sent through
gtag, the GTM data layer or the Measurement Protocol
Plans
Unlimited and Plus

Set up

Three steps, and no code on the page

You need the UserLoop website snippet and your Google tag or GTM container on the site first. An organization admin does the rest in the dashboard.

  1. 01

    Open GA4 and GTM

    In UserLoop, go to Integrations, then GA4 and GTM. Choose Use website events only, which needs no credentials, or add your web stream's Measurement ID and API secret to send server events too.

  2. 02

    Choose gtag or the data layer

    Turn on one switch. gtag uses the Google tag already on your site. The data layer is for Tag Manager: import UserLoop's container with Merge and set its Measurement ID constant.

  3. 03

    Preview, then publish

    In GTM preview, complete a survey and check that all four UserLoop events arrive, then publish the container. For server events, switch on the surveys that should send.

How it reaches GA4

Three routes into Google Analytics

Website surveys report from the browser, through whichever Google setup your site already has. Surveys that run somewhere else report from UserLoop's servers.

Website surveys

Four events as a visitor moves through a survey

The UserLoop snippet already knows when a survey is shown, answered, finished or closed. With the integration on, it tells Google at the same moment.

  • Shown. userloop_survey_shown, once each time a survey's first step becomes visible.

  • Answered. userloop_question_answered for each answer, and again if the visitor changes it.

  • Completed. userloop_survey_completed once per response, when the last answer is in.

  • Dismissed. userloop_survey_dismissed when the visitor closes a survey without finishing.

Website surveys

Tag Manager

One container to import, one constant to set

UserLoop pushes every event to the data layer and gives you a container built for it, so there are no triggers or variables to make by hand.

  • Import with Merge. Download the container from the GA4 and GTM page and merge it into your web container.

  • Set your Measurement ID. One constant, UserLoop - GA4 Measurement ID, takes your web stream's G- ID.

  • Every key, every time. Each push carries all six parameters, set or not, so one event never inherits a value left behind by the last.

  • Triggers you can reuse. The four custom event triggers can fire any other tag in your container, not only the GA4 ones.

Install the snippet with Tag Manager
gtm-userloop-container.json
Tags (GA4 event)
  GA4 - userloop_survey_shown
  GA4 - userloop_question_answered
  GA4 - userloop_survey_completed
  GA4 - userloop_survey_dismissed

Triggers (custom event)
  userloop_survey_shown
  userloop_question_answered
  userloop_survey_completed
  userloop_survey_dismissed

Variables
  UserLoop - GA4 Measurement ID    constant: your G- ID
  UserLoop - survey_id             data layer variable
  UserLoop - survey_title          data layer variable
  UserLoop - question_id           data layer variable
  UserLoop - response_id           data layer variable
  UserLoop - answer                data layer variable
  UserLoop - score                 data layer variable
Four tags, four triggers and seven variables. Nothing else in your container changes.

Server events

Surveys off your site are counted too

Checkout, link and email surveys do not run through the website snippet, so there is no Google tag for them to use. UserLoop sends their completed event to GA4 from its own servers.

  • Five kinds of survey. Checkout, popup, theme block, link and email surveys each send one userloop_survey_completed per completed submission.

  • Your web stream's credentials. Add the Measurement ID and a Measurement Protocol API secret. The secret is stored encrypted.

  • Switched on per survey. Choose which surveys send, the same way as any other integration.

  • Never an email as identity. The client ID is a hash of the order or session. With neither, the event is skipped.

The events

What Google receives

The same event names and parameters on every route, so one GA4 report covers them all.

// Sent by the UserLoop snippet when the gtag switch is on.
// Only the parameters that are set are included.
gtag("event", "userloop_question_answered", {
  survey_id: "1731500000000x100000000000000001",
  survey_title: "Pricing page feedback",
  question_id: "1731500000000x200000000000000002",
  response_id: "0b7c2c1e-5a43-4f0e-9d3a-6f1e2b7c9a10",
  answer: "Too expensive",
});
You do not write any of this. It is what the integration sends, shown so you know what to look for in GTM preview or GA4's Realtime report.

Reference

Every event and parameter

Four events, six parameters, and a short list of things that are never included.

userloop_survey_shown
The survey's first step is visible. Once per show. Carries survey_id, survey_title and response_id.
userloop_question_answered
An answer is given, and again if the visitor changes it. Adds question_id, plus answer or score when the answer is a choice or a rating.
userloop_survey_completed
The last answer is in. Once per response. answer holds every choice and rating in the response, and score its first rating. This is also the one event sent from the server.
userloop_survey_dismissed
The visitor closed the survey without finishing. Carries survey_id, survey_title and response_id.
survey_id
The survey's ID in UserLoop.
survey_title
The survey's title, cut to 100 characters.
question_id
The question that was answered. On userloop_question_answered only.
response_id
One ID for one visitor's run through a survey, so its events can be tied together. Website events only.
answer
The chosen answer's label for single choice, multiple choice and satisfaction questions, several joined with a comma, or a rating as text. At most 100 characters.
score
A rating, as a number.
Never sent
A written answer, the text typed for "Other", an email address, a phone number, a date or any other typed value. Those questions still send userloop_question_answered, without answer.

Reports to build

Six questions GA4 can now answer

Register survey_title and answer as custom dimensions and score as a custom metric in GA4 first, so reports can use them.

  • “Which survey gets seen the most but answered the least?”

    Funnel explorationuserloop_survey_shownuserloop_question_answeredsurvey_title

  • “Do visitors who finish a survey go on to buy?”

    Segment: userloop_survey_completedpurchase

  • “What do visitors from paid social say stopped them?”

    userloop_question_answeredanswerSession source / medium

  • “Is our average score lower on mobile?”

    userloop_question_answeredscoreDevice category

  • “Which pages make people close the survey without answering?”

    userloop_survey_dismissedsurvey_titlePage path

  • “Count a finished survey as a conversion in Google Ads.”

    GTM trigger: userloop_survey_completedGoogle Ads conversion tag

Kept clean

Careful about what goes into analytics

An analytics property is the wrong place for personal data. The integration is built so none of it gets there.

  • No written answers

    Text answers and anything typed for "Other" stay in UserLoop.

  • No contact details

    Email addresses, phone numbers and dates are left out of every event.

  • 100 character cap

    answer and survey_title are cut to length before they are sent.

  • Once per occurrence

    An event is not sent again when a survey redraws or a failed save is retried.

  • Nothing in preview

    Previewing a survey in the editor sends no events.

  • No ID on the page

    Website events use your own Google tag. No Measurement ID or secret is in the snippet.

  • Your consent settings

    Website events go through your site's Google configuration and its consent controls.

  • One route per site

    Use gtag or the data layer. Both on a page that loads GTM counts each event twice.

Related

Where the full answers go

GA4 gets counts, choice labels and scores. To work with whole submissions, including what people wrote, send them to one of these.

Frequently asked questions

How do I track survey responses in Google Analytics 4?

Open GA4 and GTM under Integrations in UserLoop and turn on gtag or the data layer. Website surveys then send 4 events to GA4: userloop_survey_shown, userloop_question_answered, userloop_survey_completed and userloop_survey_dismissed.

Does UserLoop work with Google Tag Manager?

Yes. UserLoop pushes each survey event to the data layer and gives you a container to import with Merge. It holds four custom event triggers, six data layer variables and four GA4 event tags, and you set one constant: your Measurement ID.

Which UserLoop plan includes Google Analytics and Tag Manager?

Unlimited, at $19 a month, and Plus. An organization admin sets it up.

Do I need a Measurement ID or an API secret?

Not for website events. Those go through the Google tag or GTM container already on your site, so UserLoop needs no credentials. A Measurement ID and a Measurement Protocol API secret are only needed for server events from checkout, popup, theme block, link and email surveys.

Are written answers or email addresses sent to Google Analytics?

No. Events carry survey and question IDs, the label of a chosen answer and a score. Written answers, "Other" text, emails, phone numbers and dates are never included, and answer text is cut to 100 characters.

Why can't I see the answer in my GA4 reports?

GA4 only reports on custom parameters you have registered. In GA4's admin settings, add survey_title and answer as event-scoped custom dimensions and score as a custom metric. The events themselves show up without that step.

Will survey events be counted twice?

Only if both switches are on for a site that loads GTM and a Google tag, so choose one. Website surveys never send a server event as well, for the same reason.

What happens if a server event fails?

UserLoop tries again and shows it in the delivery log as a Completed submission event. Google confirms that it received an event, not that it reached your reports, so a retry after an uncertain send can count twice.

Can a server event be joined to a visitor's GA session?

No. Server events use a hash of the order or session as the client ID, never an email, and it does not match the browser's GA client ID. Use them to count completions by survey, not to follow one visitor.

Keep reading

Put survey events beside the rest of your analytics

GA4 and Tag Manager are included on Unlimited at $19 a month. Website events need no credentials: turn on one switch and watch them arrive.