Advanced configuration of your Tags and events in Analytics and GTM

How to measure your results

Written By Paula Torres (Administrator)

Updated at September 3rd, 2021


Afrus allows the implementation of tracking of the Google Tag Manager (GTM), Google Analytics (GA) and Facebook Pixel (FP) platforms, through the donation and Leads forms offered by Afrus.

For this reason we will show you the step by step of:

  • How to implement the tracking code?
  • How to configure Google Analytics tracking?
  • How to configure the GTM tracking?




1. How to implement the Tracking code?

to. Step by Step.


1. The first thing we must do from Afrus, is to go to the Forms section.

2. Then, enter the form in which you want to configure the tracking.


3. Go to the ADVANCED step - ANALYTICS and there you select the option you want to use, either Google Analytics or Google Tag Manager, or, failing that, Facebook Pixel.


4. Then, enter the code generated by the desired platform.

5. Finally click the Save button. With this, the implementation of the code in Afrus would be configured for that form.



Important: Make sure the code is correctly placed. (exactly the same).

b. How to check if it is working?

To verify the operation of the tracking you must open a tab in the tracking platform (Analytics, GTM or fb Pixel) and a tab where the form that you will use to generate the events is located.

Once the tabs are open, proceed to complete (fill out) the form and in the following sections see the one you want to view.


2. Tracking configuration through Google Analytics

Afrus has two Tracking measures through Analytics through TARGETS and ELECTRONIC COMMERCE.

Which will be explained below.

OBJECTIVES

to. List of Objectives

Afrus has different objectives / goals that will be executed as the leads or donors fill in the form data.

Therefore, in order for the objectives to be tracked and received by GA, their configuration must be carried out.

The available objectives / goals will be shown below:


Goals

Category

Action

Label

Value

LEAD

Form

DONATION

LEAD

(Leave vacant)

DONATIONSTART

Form

DONATIONSTART

(Leave vacant)

(Leave vacant)

ADDPAYMENTINFO

Form

ADDPAYMENTINFO

(Leave vacant)

(Leave vacant)

ADDTOCART

Form

ADDTOCART

(Leave vacant)

(Leave vacant)

DONATION MONTHLY

Form

DONATION

MONTHLY

(Leave vacant)

DONATION UNIQUE

Form

DONATION

UNIQUE

(Leave vacant)

LEAD (Form Leads)

Form

lead

(Leave vacant)

(Leave vacant)

b. Setting the objectives

1. Go to the Google Analytics configuration panel, once there, click on the Objectives option, in the third column:



2. Then, the objectives screen will open, where you must click on NEW OBJECTIVE

3. When you click it, you will enter the internal page where you must fill in the fields for the creation of the objective:


The fields that you must fill in are:

  • OBJECTIVE CONFIGURATION : When displaying it, we must choose the Custom option and then click Continue.


  • OBJECTIVE DESCRIPTION: In the Name box we place a text that identifies the goal, which is for internal use. And in the option Type choose the option "Event" and then click Continue r.
* (The space ID of the objective can be left by default)


  • OBJECTIVE INFORMATION: This is the key step to correctly configure the goal, in it we must place the parameters that require us, which are described in point a. List of Objectives.
When you have the fields filled in, as appropriate (see point a. List of Objectives.) Click Save. And you will have the goal set.

C. How do we verify the objectives?

The goal / objective has already been set and a form has been filled out.
We go from the left main menu of Google Analytics, click on the option "Conversions" -> "Objectives" -> " Overview"

On this screen you will be able to see the number of objectives met (Forms processed correctly) and the amount or value of the objective (Sum of donations)


ELECTRONIC COMMERCE

Afrus's communication with GA4's e-commerce is already pre-configured, leaving its configuration quite simple.

to. G4A Configuration


1. To activate this option from Afrus, you must click within the form to be agreed on the ADVANCED option - ANALYTICS - CONTAINER GA4


2. From Analytics, you must enter the account and select the third column " Electronic commerce configuration "


3. Then you must click on the buttons "Enable e-commerce" and " Enable reports of enhanced e-commerce", as shown in the following image:


4. Then click Save.

2. How can we verify it?


Already configured e-commerce. And a form has been completed. From the home page, in the left side menu, click on the option "Conversions" -> "Electronic Commerce" -> " Overview" .




Note: It should be clarified that the Electronic Commerce options must be activated within the administrative settings of Google Analytics.


3. Tracking configuration through GTM

For Google Tag Manager, Triggers and Tags must be configured at https://tagmanager.google.com/.

Afrus has different events that will be sent in each step of the form, allowing, through the configuration of the Triggers , to be able to capture them and view the data sent in the datalayer (internal data of Google Tag Manager) .

The events sent are shown below in a table:

to. Events Table

The events sent are shown below in a table:

Events (edit)

Category

Action

Label

Value

Trigger code

Description

DONATIONSTART

Form

DONATIONSTART

(Leave vacant)

(Leave vacant)

afrus.donationStart

you view the payment form (payment platform)

ADDTOCART

Form

ADDTOCART

(Leave vacant)

(Leave vacant)

addToCart

(with all payment details) donate button



LEAD


Form

DONATION

LEAD

(Leave vacant)

afrus.lead

(donation lead)

ADDPAYMENTINFO

Form

ADDPAYMENTINFO

(Leave vacant)

(Leave vacant)

ADDPAYMENTINFO

(relative card data)



DONATION MONTHLY

Form

DONATION

(ADDITIONAL PROCESS SEE INSTRUCTIONS BELOW )

(ADDITIONAL PROCESS SEE INSTRUCTIONS BELOW )

afrus.submitDonation

(monthly donation is correct)


DONATION UNIQUE

Form

DONATION

(ADDITIONAL PROCESS SEE INSTRUCTIONS BELOW )

(ADDITIONAL PROCESS SEE INSTRUCTIONS BELOW )

afrus.submitDonation

(one-time donation is correct)

submit-lead

Form

lead




(lead form)

b. How to create Triggers and Tags

Tags and Triggers are the main means of connecting with GA or other platforms.

To create a TAG:

1. We enter the Tags section and press the "New" button

2. In the screen shown below we can place the name , configure the tag and configure and / or link the trigger


3. You must fill in the name of the Tag, and then click on Choose a tag type to beign set up. To start with the tag configuration


4. Select the first Google Analytics option.

  • In Track Type We can see the option "Event" when selecting it, you must place the parameters of the goal that we place in the GA configuration.
  • You must put the GA code in the "Google Analytics Settings" field and then click on "Save" .
  • This will Close the drop-down window and leave us in the previous window.



IMPORTANT: For events other than donations, we place the data as described in the table (Point a. Table of events)


* Example for the Lead event, fill in the corresponding data (image):

  • Category - Form
  • Action - DONATION
  • Label - LEAD.

And so with each of the events (Point a. Table of events)


5. Then in Google Analytics settings, select the Google Analytics ID option enclosed in brackets:

IMPORTANT: For donation events ( Donation and Monthly) , the same Triggers are used (As shown in the events table point a.)


- For GTM to separate the events ( Donation and Monthly) an additional step must be carried out.

Decision Tree
The following additional steps must be taken.
  • Ver Paso 1
  • Ver Paso 2
  • Add Button

- The LABEL field must be filled.


- The LABEL, we are going to put the name "frequency" this will determine if it is a one-time or monthly donation. To do this, we press the button that is just on the right side of the label text field, which will display another screen.


- Then click the plus symbol (+) at the top, and this action will display another screen, where you will configure the name and then click in the center of the screen (Where the icon is)


- Following this, another window will be displayed, in this one we select the Datalayer Variable option and another window will be displayed again.



- Then, you must place the text "frequency" in the "Data Layer Variable Name" field, since it will be the variable that we will receive from the form.


- The "Data Layer Version" field leaves the text Version 2 . Having this, click Save, and the other windows will automatically close.


- When filling in the previous data, it will automatically take us to the Frequency configuration screen, where we will see that the field will be filled, with the word {{Frequency}}


  • Add Button

-
We continue with the VALUE field

- We are going to place the text "transactionTotal" this will determine the amount of the donation.

- To do this, click the button that is just on the right side of the Value text field, which will display a screen.


- We identify it with a name, it can be "transactionTotal" and then click on the center of the screen (where the icon is), and this will display another window:


- On this screen you must select the Datalayer Variable option and again it will display another window:



- When this screen is displayed, the "Data Layer Variable Name" field must be filled with the text "transactionTotal" and the "Data Layer Version" field in Version 2.


- And it will leave us in the window where we configure the goal data.




6. Then, you can create Trigger, for this click on choose a trigger .

7. Then the following screen will open



8. Then click on the plus symbol (+) at the top, this will show the following screen, within it we will place the name and then you must click on the middle of the icon



9. Clicking will open the list of Triggers, you must select Custom Event.



10. Once the option is selected, you must place the Trigger code of the event you want to observe and then click it. Then, we deselect the Use regular expression check, as shown in the image below:



11. We finish with the “Save” button, this will close the current session and will leave us where we were configuring the Tag.

Note: For the settings to take effect in Google Tag Manager. All the settings made in the "Submit" button on the GTM initial screen must be confirmed.

C. How to preview the Tags and Triggers?


Once the Trigger and Tags have been configured with the events, Google Tag Manager has a tool that allows you to preview the configured Tags to observe what data the form is sending and / or receiving Google Tag Manager, for this in the main screen of https: // tagmanager.google.com/ you must press the "Preview" option at the top of that screen.



Pressing it will show us a message like the following one, indicating that we are in preview mode



We go to the form, reload the page



We will be able to observe the different “Tags” that have been configured in GTM and visualize, by clicking on them, what data is being sent, as well as the process of executing them.

For this event, once the form is completed, Google Tag Manager is in charge of processing the data.


Electronic Commerce

to. How to create Tags or Triggers for Electronic Commerce?


1. For Afrus communication with Google Analytics through Google Tag Manager we must configure a tag (label) and trigger (trigger), within the GTM configuration. To do this, we select the Tags option from the main screen.


2. From the Tags section we can do both at once. We enter the Tags section and press the "New" button

3. In the screen shown below we can place the name, configure the tag and configure and / or link the trigger

















4. We select the first option of Google Analytics. In Track Type We can see the option "Transaction" that we must select,














5. Then make sure to put the GA code in the “ Google Analytics Settings” section .










6. Next you must click on “Save”. This will close the drop-down window and leave us in a previous window.

6.1 Continuing from the same screen, at the bottom of this screen, we can create a trigger and connect it. Click on choose a trigger to start with the configuration,




7. Then click the plus symbol (+) at the top, it will show us the following screen, within it we will place the name and click on the middle of the icon













8. There are many types of Triggers but in this case we select the Custom Event option.



9. Once we select the option, we place a code for the corresponding event trigger and then select the Use regular expression check, as shown in the following image:












10. We end with the "Save" button, this will close the current session and leave us where we were configuring the Tag, we end this section by pressing the "Save" button.



Note: For the settings to take effect in Google Tag Manager. All the settings made in the "Submit" button on the GTM initial screen must be confirmed.





Was this article helpful?