Integration of Task Analyitcs with Google Analytics through Google Tag Manager

Integration of Task Analytics with Google Analytics through Google Tag Manager


The Google Analytics integration allows organizations to send information on tasks & success scores to Google Analytics. Combining Task Analytics with your existing web analytics software will provide you with valuable information that goes beyond the standard page views and clicks. Your web analytics experts are able to analyze customer journeys per individual task, create segments, check completion rates and make deep-dives to find the root cause of problems. 



The setup

The Task Analytics script will automatically detect if the environment Task Analytics is running on is using the Google dataLayer. If this is the case, the survey will push an event to the dataLayer once visitors have indicated whether they could complete a task or not. Task Analytics will sent one Google Analytics event; after the user answers the “Did you complete what you came for?” question with “yes” or “no”.

1) Enable the Google Analytics integration

Make sure you have toggled on the Google Analytics integration under Setup → Settings with the checkbox seen in the screenshot below:
 Toggle on the "Google Analytics" checkbox to enable the integration

2) Validate the DataLayer Push

If the Google Analytics checkbox is checked, an event will be fired, regardless whether you’ve set-up the event trigger in Google Tag Manager. It’s not going to cause errors if you haven’t yet, the data will still be pushed in the dataLayer.

The data that is pushed to the dataLayer:
  1. dataLayer.push([
  2.     event: "TaskMetrix"
  3.     taskName: "<taskName> [<taskCode>]"
  4.     taskResult: "Completed" // or “Gave in"
  5. ]);
Red text = variables
Tip
You can check whether the event is pushed to the dataLayer by filling out the survey. Once you’ve answered the “Were you able to complete your task?”, you will see an extra array object in the dataLayer. You can access the dataLayer via the console, typing “dataLayer”.
Check the dataLayer push by typing "dataLayer" in the console of your browser
The preview URL parameter does not fire dataLayer push events
Don’t use the preview URL parameter (?_tmcf) when validating the Google Analytics integration. The data will not be submitted to Task Analytics nor Google Analytics. This is to prevent filling the database with test data.

Set up Google Tag Manager

The last step is defining the dataLayer variables, trigger and tag in Google Tag Manager. This means:
  1. Creating the variables (taskName, taskResult)
  2. Setting up the trigger, called “TaskMetrix”
  3. Set up a tag to fire an event
With the information above, you will be able to define your own variables, create your own tag and trigger. You can use the Google Tag Manager preview function to verify if the event is fired and variables are sent to Google Analytics.

Use the Task Analytics import container
We’ve created a Google Tag Manager import container, containing the necessary elements to make Google Tag Manager work with Google Analytics and Task Analytics. Read the instructions

Analyzing results in Google Analytics
Users can answers questions multiple times, using the “previous” button. It’s possible to have multiple (conflicting) Google Analytics events (“yes” and “no”) from the same person. Within Task Analytics, only the most recent answer is taken into account. In Google Analytics, however, the event will be registered every time the user answers the question.

    • Related Articles

    • Enabling Google Analytics integration for Task Analytics

      Task Analytics can be set up to feed intent data to Google Analytics, providing enhanced segmentation of behavioral data. This allows you to add a segment to filter out what the customers came for and whether they could complete the task they ...
    • Analyzing Task Analytics data in Google Analytics

      You've finished the integration of Task Analytics and Google Analytics. Great! Now it's time to analyse the Task Analytics in Google Analytics. Create segments, filter data based on completion scores, segments or audiences.  Google Analytics 3rd ...
    • Import Google Tag Manager container for Google Analytics

      We’ve created a Google Tag Manager import container, containing the necessary elements to make Google Tag Manager work with Google Analytics and Task Analytics. You can download the container settings and import into your Google Tag Manager. Download ...
    • What Task Analytics data is sent to Google Analytics?

      If you’re using Task Analytics and have enabled the 3rd integration with Google Analytics, you’ll be able to analyze WHY visitors visit your website in your preferred web analytics tool. Segments based on task & task completion  The integration ...
    • Install Task Analytics with Google Tag Manager

      You can install Task Analytics on your website, app or intranet with the Google Tag Manager. Step 1: Get the Task Analytics javascript Retrieve the Task Analytics javascript. This javascript is generated automatically and is unique for your account. ...