• English
  • Français
  • Español

Guide to tracking your campaign goals with Google Tag Manager

The aim here is to generate an event in Google Analytics each time there is a conversion resulting from a Qualifio campaign (such as the submission of a form), all via Google Tag Manager. The objective is to measure the conversions generated by Qualifio campaigns directly in Google Analytics and to include those in your goals, reports etc.

Prerequisites

The Google Tag Manager tag needs to be present in the management of the website to which the Qualifio campaign is linked. Here’s how:

FAQ: inserting your Google Analytics/Google Tag Manager tag in Qualifio

Inserting your Google Analytics or Tag Manager in Qualifio

The standard Google Tag Manager tag is Tracking = Page views. If this is present in Google Tag Manager, a page view will be counted each time a Qualifio iframe is updated, whether the publication channel is Facebook, iframe, mini-site etc.

The aim here is to create a Conversion in Google Analytics whenever a participant submits their form and creates or updates a profile. This logic is applicable to any other type of conversion.

Need an example?

In this example, a conversion corresponds to a form submitted. The conversion therefore occurs when a participant clicks on the “Send” button below a form. It’s the button that will be used as conversion trigger.

In Google Tag Manager:
Creating a tag and a variable page title

  1. Creating a new Google Analytics-type tag called “Qualifio Conversion” (for example)
  2. Tracking type = Event
  3. Category & Action are to be defined in accordance with an internal nomenclature. In this example:
    a. Category: Conversion_Qualifio
    b. Action: Submit
    c. Label: see below

This conversion tracking will be applied automatically to all campaigns linked with a website in Qualifio. It is important therefore to distinguish the different Qualifio campaigns in Google Analytics.

The event’s label will be used for this purpose and will vary from one campaign to another.

In any Qualifio campaign, the source code for each page contains <h1 class=”campaign_title”>QPA: Test GTM</h1>— i.e. the title of the campaign. It is the value that needs to be attributed to the label in order to have the campaign’s title visible in Google Analytics for each conversion.

In order to do that, a variable needs to be created in Google Tag Manager.

  1. To create this variable, simply click on the + next to the “label” field
    Capture d’écran 2015-12-04 à 17.59.42
  2. Select “New Variable”, Personalised Javascript
  3. Copy and paste the following code:

function (){
var title = document.getElementsByClassName(“campaign_title”)[0].textContent;
return title;
}

4. Name the variable (PageTitle)

5. Save the variable

Result: a Conversion Tag is created. When triggered, it will create a conversion-type event in Google Analytics with the name of the Qualifio campaign.

Triggering the tag

This tag then needs to be triggered at the right moment, i.e. when the web user submits their form. This ‘Submit’ button has a specific identifier in the page’s code. This identifier is the same for any Qualifio campaign: register. It’s this register ID that we’re going to use.

Screen Shot 2015-11-25 at 20.58.27

  1. Click on the variable;
  2. Activate the “click” ID variable;
  3. Click on “Trigger”;
  4. Add a new trigger and give it a name;
  5. Event type must be “click”
  6. Target is “all elements”
  7. Trigger is “certain clicks”
  8. Select “click ID is equal to register”
  9. Create the trigger.

The tag now needs to be linked to the trigger:

  1. Click on the tag;
  2. Click on the conversion tag;
  3. Trigger: click on “click” and select the new trigger;
  4. Confirm.

Publishing

In Google Analytics, this new event simply needs to be linked to a Goal. Whichever user creates a Qualifio campaign linked to this site, once a register-type button exists – a conversion will be reported in Google Analytics each time it’s clicked on.

Capture d’écran 2015-12-07 à 11.52.12

Capture d’écran 2015-12-07 à 11.52.06


qualifio

What is Qualifio?

Qualifio is the leading interactive marketing and data collection platform, enabling businesses to easily create and publish viral interactions on websites, mobile apps and social media.Learn more

Trackback from your site.

Marketing & Business Development Executive

Quentin joined Qualifio in April 2014. He grew up in Africa & Asia before coming back to Belgium for his studies. During & after his master in Marketing & Communication at the University of Brussels, he developed a strong interest in Internet & Digital Marketing. Quentin previously worked as Sales & Marketing Manager for a Belgian startup active in 3D sport analysis technologies. Quentin speaks French, English & Dutch.

© 2017 Qualifio.com - Contact Us