How to Use Google Tag Manager Triggers to Set Qualaroo Custom Properties

 

Google Tag Manager Triggers in collaboration with Qualaroo Custom Properties can help you refine your nudge targeting to specific events.

 

A trigger listens to your web page or mobile app for events such as form submissions, button clicks, etc. It tells the tag to fire once it detects the specified event.

 

Benefits of using GTM triggers to set custom properties:

 

  • Target specific site visitors

  • Pass data associated with the responses collected in your Qualaroo survey

 

Step 1: Follow Google's instructions to get GTM set up with your site and add the web property to your GTM account.

 

Step 2: Set up GTM Trigger

 

Set up GTM Trigger

 

Step 3: Add a new tag to set Qualaroo custom properties when your new Trigger is fired.

 

Add a new Tag

 

In the custom HTML tag you have created, the HTML content should be the following JavaScript:

 

<script>
setTimeout(function() {
  if (typeof window._kiq !== 'undefined') {
    // Should be removed after testing
    console.log('Setting custom property')
    _kiq.push(
     [
       'set', { 'customEvent': {{Event}} }
     ]
   );
  }
}, 10000);
</script>

 

Again, here's a screenshot of how it should look when it's all set up:

 

Set Qualaroo Custom Properties

 

The above JavaScript is setting the custom property 10 seconds after the event is fired. This is great if you want to control how long after a user action is made to show a survey. 

 

For example, to make it instantaneous, change the content to:

 

<script>
if (typeof window._kiq !== 'undefined') {
  // Should be removed after testing
  console.log('Setting custom property')
  _kiq.push(
    [
     'set', { 'customEvent': {{Event}} }
    ]
  );
}
</script>

 

Step 4: 

  • Create a variable for the Custom Event you have created.

  • Go to “Variables” and add a new one that should look like this:

 

Add a Variable

 

For this next part, you'll need a developer's help to set up how your GTM Trigger is fired. We'll show you how to do this with a button click:

 

<button onclick="dataLayer.push({'event': 'buttonClicked'});">Click here</button>

 

This button will add the event “buttonClicked” to the dataLayer, which will then set the Qualaroo custom property called “customEvent” with the value “buttonClicked,” because that's what your custom variable is set as.

 

In addition, using GTM and Qualaroo should make it even easier for you and your team to utilize more of Qualaroo's advanced features without needing much help from your developers -- in fact, implementing the above should only take your developers as long as it takes you to grab them a coffee from the breakroom for their help ;)


That is all about using GTM triggers to set Qualaroo custom properties.

 

 

© 2005 - 2024 ProProfs
-
add chat to your website