Form Builder

Tracking with Google Tag Manager

Senest redigeret:

It is a tendency that browsers become more and more occupied with privacy policies, the result of which being that cross-domain tracking is seen as unwanted and as such is being blocked. We therefore recommend using Google Tag Manager to track your OnlineFundraising forms. Using Tag Manager all tracking is sent via your own website and not external domains such as OnlineFundraising.dk.

With Tag Manager it is easy to manage cookies, which helps ensure that OnlineFundraising will not send tracking in case visitors of your website did not consent to using cookies. Without Tag Manager OnlineFundraising continues to send tracking regardless of cookie preferences.

It is possible to configure OnlineFundraising such that data becomes available in the data layer of Google Tag Manager (GTM). This guide describes how to configure the data layer for tracking. 

Please note that this guide requires technical insight to your Tag Manager setup. If you do not have this we recommend forwarding this guide to the person/people responsible for the setup; or reaching out to the OnlineFundraising team. 

Content overview

Preparation

DinOrganisation.png

Before proceeding, please complete the following steps:

  1. Add ContainerId of GTM in OnlineFundraising Settings
  2. Add a Succes Landing Page for all purposes
  3. Add embed script to your landing page

Once these criteria are met, the following information is available in the data layer of the of the landing page:

Key Eksempel på data
of_agreement_frequency monthly
of_agreement_name Christians vej til kongressen
of_amount 1
of_currency DKK
of_data_set_guid e11d110e-9c3d-4aea-87ea-4872903a3ed9
of_embed_url http://demo.devflowtwo.com/gtmtest/
of_form 8
of_oneoff no
of_payment_method Test
of_payment_session_guid bd7c66be-e309-49bc-8fe4-ffbcc157216c
of_payment_status success
of_payment_type payment
of_purpose_accounting_code pac2
of_purpose_name Christians vej til kongressen
of_vat 0

 

Extra variable

It is possible to add one data point from the form to the data layer. To do this, add a field to the form with the following reference:

datalayer_var_1

In doing so, the following data is available in the data layer as well:

of_datalayer_var_1 (Data from the datalayer_var_1 field)

 

Please note that adding the GTM containerId to the OnlineFundraising settings, Google Analytics tracking is disabled automatically. Any other types of tracking, such as Facebook Pixel, must be disabled manually.

Configure GTM

Once the preparations have been completed it is possible to configure GTM according to your needs, both according to Google Analytics and Facebook Pixel.

Attached to this article you will find a template container which utilises the above-mentioned variables to setup events and eCommerce tracking in Google Analytics as well as Facebook Pixel.

To use the example, please provide values for Google Analytics and Facebook Pixel in corresponding variables:

  1. Google Analytics Tracking_ID
  2. Facebook Pixel ID

Cross-domain tracking

Applying cross-domain tracking enables tracking from the organisation's domain and avoids issues with tracking inside iframes. This is a solid and future-proof approach.

"Abandon Cart"

Until now, it has been possible to get events and page views using OFv4 GA Tracking to identify when a donor abandons the form without making a final submission of the form. Information such as this can be used to make remarketing focused on Donors who were close to donating but never crossed the finish line.

Now, tracking happens upon submitting af form, which means the nuance of the "Abandon cart" scenario" is lost. This is a result of stricter control of cross-domain tracking and as such not a scenario we can support in OnlineFundraising.

An alternative could be to view Donors who enter the landing page but never submits the form as a retargeting segment. This approach is not as precise as one could want, but a viable option under the current circumstances.

Webinar

See our webinar (in Danish) for in-depth walkthrough of tracking with GTM and Facebook Conversion API.

Learn more about

  • Preparing OnlineFundraising for tracking
  • Setup of Google Tag Manager such that events, transactions and page views are sent correctly to Google and Facebook
  • Configuring Facebook Conversion API and customisation of your existing Pixel to avoid duplicates
  • How to test your Tag Manager configuration