ProProfs Qualaroo Event Listener

Using the ProProfs Qualaroo event listener code, you’ll be able to track website visitors’ interaction with the ProProfs Qualaroo survey on your website and then send these tracked actions as event data to your analytics tools such as Piwik Pro, Google Analytics, Matomo, etc. via Google Tag Manager or other tag management platforms.

How to track ProProfs Qualaroo survey form interactions and completions with google tag manager

This guide will help you integrate ProProfs Qualaroo event tracking with Google Tag Manager (GTM) to capture user interactions with your Qualaroo surveys. By pushing these events to the dataLayer, you can send the data to analytics platforms such as Google Analytics (GA4), Piwik Pro, and others for event analysis.

Step 1: Add the Qualaroo Event Listener Script to GTM

Start by copying the Qualaroo event listener script and adding it to a Custom HTML Tag in GTM. Configure the tag to fire on the DOM Ready trigger to ensure the Qualaroo survey widget is fully loaded before the script starts capturing user interactions.

💡 Pro Tip: Using the DOM Ready trigger ensures that the Qualaroo widget is present and ready for interaction before you start tracking user actions.

The script listens for four key actions:

  • Survey Displayed 
  • Survey Minimized
  • Survey Closed
  • Survey Response Submitted

When any of these actions occur, the script pushes an event to the dataLayer under the event name qualaroo_interaction.

Step 2: Create a Custom Event Trigger in GTM

Once the script is added to GTM, create a Custom Event Trigger to listen for the qualaroo_interaction event in the dataLayer. This trigger will activate whenever one of the defined events happens.

  1. Go to Triggers in GTM.
  2. Create a new Custom Event Trigger.
  3. Set the Event Name to qualaroo_interaction.

This ensures that GTM tags will be fired whenever one of the specified Qualaroo events occurs, allowing you to send the event data to your analytics platforms.

Step 3: Define DataLayer Variables in GTM

To work with the data pushed to the dataLayer, define the following dataLayer variables in GTM. These variables will allow you to capture specific details about the Qualaroo survey interactions.

Here are the variables you should define:

  • survey_action_type: Indicates the type of user interaction (e.g., survey is displayed, survey is minimized, survey is closed, user replied to a question).
  • survey_id: The unique ID of the survey (relevant for events like survey is displayed or survey is minimized).
  • answers: Captures the answers submitted by the user for the submit event.
  • nudge_id: The ID of the nudge or prompt shown to the user (relevant for the submit event).
  • screen_id: The ID of the screen or question that the user interacted with (also relevant for the submit event).

These variables are essential for setting up advanced triggers and passing detailed data to your analytics tools.

Step 4: Set Up Marketing Tags and Pixels

After defining the necessary variables and creating the custom event trigger, the next step is to set up your marketing tags and attach the trigger to your tags.

<script>

(function() {

  window.dataLayer = window.dataLayer || [];

  window._kiq = window._kiq || [];

  // Survey is displayed

  _kiq.push(['eventHandler', 'show', function(survey_id) {

    window.dataLayer.push({

      event: 'qualaroo_interaction',

      survey_action_type: 'survey is displayed',

      survey_id: survey_id || null

    });

  }]);

  // Survey is minimized (requires specific survey_id)

  // Replace 'XXXXX' with your actual survey ID if needed

  _kiq.push(['eventHandler', 'show', function(survey_id) {

    // Track the minimize attempt

    window.dataLayer.push({

      event: 'qualaroo_interaction',

      survey_action_type: 'survey is minimized',

      survey_id: survey_id || null

    });

    // Optionally minimize the survey UI immediately

    // _kiq.push(['minimizeSurvey']);

  }]);

  // Survey is closed

  _kiq.push(['eventHandler', 'close', function() {

    window.dataLayer.push({

      event: 'qualaroo_interaction',

      survey_action_type: 'survey is closed'

    });

  }]);

  // User submits a response to a question

  _kiq.push(['eventHandler', 'submit', function(answers_array, nudge_id, screen_id) {

    window.dataLayer.push({

      event: 'qualaroo_interaction',

      survey_action_type: 'user replied to a question',

      answers: answers_array || [],

      nudge_id: nudge_id || null,

      screen_id: screen_id || null

    });

  }]);

})();

</script>

Video of how to use the listener

Related Event Listener

CharityEngine

Track donations that happen on your CharityEngine embed form as a conversion using this code.

PaperForm

Track paper form submissions as conversions and activate your marketing pixels/tags based on these actions.

Text

Collect and send analytics data on how users engage with your website’s text.com chat widget.

download the google tag manager recipe for tracking ProProfs Qualaroo survey form interactions and completions

we make you smarter with data

made with ❤️

The DumbData Team
Before you leave, try out these free tools.
FREE GA4 AUDIT TOOL & UTM AUDIT TOOL