Install with Google Tag Manager

Google Tag Manager (GTM) is a free tool that allows you to easily add or remove Javascript tags to your website and web-application without requiring any code changes. Users of GTM can install the Refiner client needed to launch surveys with a few clicks only.

Install tag on a website

To launch Refiner surveys on your website with Google Tag Manager, please follow these steps:

1/ Navigate to the Google Tag Manager container which is installed on your website

2/ Click on “Add New Tag”

3/ Name your new tag “Refiner” and click “Choose a tag …”

4/ Navigate to the “Community Tags” by clicking on the banner above the tag list

5/ Scroll to “Refiner” and click “Add to Workspace”

6/ Fill in the “Project ID”. You can find your project ID on the Installation page inside your Refiner account.

7/ Set the trigger for the Refiner snippet to “All Pages”

8/ Publish your updated Workspace

That’s it! The Refiner client is now installed in “Anonymous Mode”, ready to launch Website Surveys for anonymous website traffic.

Install tag in a web-app for logged-in users

If you want to launch surveys for logged-in users of your web-app using GTM, further installation steps are needed.

The key difference between launching surveys on a website (anonymous website traffic) and within a web-app, is that you’ll need to identify your users using variables from the GTM Data Layer.

Map user data from Data Layer

1/ Map the User ID, User Email and User Name fields shown in the screenshot above to values from your GTM Data Layer.

2/ You can also send additional user traits from your GTM data layer to Refiner. Traits sent to Refiner can be used to segment your users and create target audiences.

Trigger tag when user data is available

When you identify your users with GTM, it is important to make sure that user data is actually available through the Data Layer when the Refiner tag is fired.

Depending on the technology your web application us using, the GTM Data Layer might get populated asynchronously and user data might not be available yet when the page is loaded. If this is the case, you need to make sure that the Refiner tag is loaded once user data is available.

In most cases, changing the Trigger from “Page View” to “Window Loaded” will solve the issue. If you don’t find a Window Loaded event, you can create it in the “Triggers” section of your Google Tag Manager account.

If changing the Trigger to “Window Loaded” does not help, you’ll need to dig deeper. To make sure that the Refiner tag is loaded once user data is available, follow these steps:

  1. After adding our Tag, click on “Preview Workspace
  2. Navigate to the “Variables” in the Preview Mode
  3. Inspect when exactly user data is loaded to the Data Layer
  4. Set the trigger event of your Refiner tag to the event that loads the user data
  5. Activate the Debug Mode of the Refiner tag to see if the user ID was loaded correctly

If you have any questions or need a helping hand installing the Refiner client with GTM, please don’t hesitate to contact us.

Attach data to a survey response

Our GTM tag allows you to attach any kind of contextual data to survey responses of your users. This data can be either static or dynamic data coming from the Data Layer.

This option works independently from identifying your users. You can provide contextual data when surveying anonymous website visitors or logged-in users.

Was this helpful? Let us know with a quick a vote