Skip to main content
All CollectionsIntegrations and WebhooksIntegrations
Connect Google Analytics and Google Tag Manager to your Campaign (Tracking Code)
Connect Google Analytics and Google Tag Manager to your Campaign (Tracking Code)

How to add your Google Analytics or Google Tag Manager (GTM) to track donor behaviour in your campaign

Juan Yanez avatar
Written by Juan Yanez
Updated over a year ago


1. What Google tracking tools can I use in StockCrowd?

StockCrowd allows you to enter your Google Analytics or Google Tag Manager ID to better track the behaviour of your donors in your campaign.

When creating our campaign we are able to add either our Google Analytics or Google Tag Manager code to better track the behaviour of users on your page.

2. What is the difference between Google Analytics and Google Tag Manager?

Google Analytics is a tool that allows you to generate reports and statistics about your campaign. For example, how many people viewed the campaign yesterday, which web browser they used, which sections were the most popular, etc...

Google Tag Manager is a tool that allows you to track and measure any milestone that happens in your campaign, for example, how many users clicked on a certain button, how many people reported data in a donation form, etc...

3. How do I know whether to use Google Analytics or Google Tag Manager?

The choice of your tracking code will depend on whether you plan to use other platforms to promote your campaigns.

For example, if you plan to make ads with Facebook Ads, Google Ads, Youtube Ads etc. it will be more appropriate to use Google Tag Manager to be able to configure the activity of your online advertising in the campaign from GTM.

If you do not intend to have Digital Marketing campaigns, you do not need to choose Google Tag Manager, with Google Analytics it would be enough.

Captura de pantalla 2019-07-08 a las 9

4. How can I integrate Google Analytics or Google Tag Manager into a StockCrowd campaign?

馃搶 Note that you will be able to integrate Google Analytics or Google Tag Manager into each StockCrowd campaign, adding different tracking IDs in each of them.

To integrate Google Analytics or Google Tag Manager into a StockCrowd campaign, follow the steps below:

1. Go to Campaign > Settings > Tracking code

2. Click on Edit

3. Enter the Google Analytics Measurement ID in the field Google Analytics

(Example: UA--xxxxxxxx-x)

or the Google Tag Manager Container ID in the field Google Tag Manager

(Example: GTM-xxxxxxx)

馃搶 We do not advise you not to enter both codes. If you do, you may end up with duplicate data in the page views.

4. Click on Save Changes

5. How can I add a Facebook Pixel to a StockCrowd campaign?

To add a Facebook Pixel to your campaigns, we advise you to do it through Google Tag Manager by following the steps in this article.

6. How do I check that the tracking codes are configured correctly?

Once you have entered the tracking codes, you can check if they are working by installing the Google Tag Assistant Legacy extension for Google Chrome.

After the installation, follow these steps:

1. Access the web address of the campaign (URL).

2. Click on the Google Tag Assistant Legacy's icon.

3. Click on Enable.

4. Click on Record.

5. Refresh the page and click on the Google Tag Assistant Legacy icon again to view the tracking codes installed in the campaign.

7. What events are sent to Google Tag Manager from StockCrowd?

When a data capture flow starts, StockCrowd sends various events to Google Tag Manager to reflect user behaviour.

For each event, a data attribute is registered with some of the following parameters:

Tipo de atributo

Descripci贸n del atributo

UA

Google Analytics code entered in the Campaign.

IdCampaign

Campaign ID.

ID de la empresa

Organization ID.

importe

Donation amount.

orderID

Payment order ID

periodicidad

Indicates regular payment frequency.

Possible values are: Z00(One-off), Z01(Monthly), Z02(Quarterly) and Z04(Yearly).

nombre

User's name.

primerApellido

User's first last name. If the user is requested to enter the first and second surname in the same field of the donation box, both will be collected in this parameter.

segundoApellido

User's second surname.

email

User's email address.

Here follows a list of the events sent to Google Tag Manager from StockCrowd:

SC_EVENT_PAYMENT

It indicates that the user has started a data capture flow.

dataLayer.push({
event: 'SC_EVENT_PAYMENT',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25
}
});

SC_EVENT_PAYMENT_SELECCION

It indicates that the user has reached the payment's amount and frequency selection screen.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_SELECCION',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25
}
});


SC_EVENT_PAYMENT_SELECCION_COMPLETED

It indicates that the user has selected a payment's amount and frequency.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_SELECCION_COMPLETED',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
importe: 1,
periodicidad: "Z00"
}
});

SC_EVENT_PAYMENT_CHEQUES_INFO

It indicates that the user consulted the information to make a payment via checks.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_CHEQUES_INFO',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25
}
});

SC_EVENT_PAYMENT_TRANSFERENCIA_INFO

It indicates that the user consulted the information to make a payment via bank transfers.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_TRANSFERENCIA_INFO',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25
}
});

SC_EVENT_DATA_FORM_OPENED

It indicates that the user has reached the personal data screen.

dataLayer.push({
event: 'SC_EVENT_DATA_FORM_OPENED',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
importe: 1,
periodicidad: "Z00"
}
});

SC_EVENT_DATA_FORM_COMPLETED

It indicates that the user has filled his personal data.

dataLayer.push({
event: 'SC_EVENT_DATA_FORM_COMPLETED',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
importe: 1,
orderId: "61f8db47-baf8-444d-a867-c7ff4676d5cf",
periodicidad: "Z00",
nombre: "Super",
primerApellido: "L贸pez",
segundoApellido: "L贸pez",
email: "superL贸[email protected]"
}
});

SC_EVENT_PAYMENT_STRIPE_SOFORT

It indicates that the user has selected Stripe's SOFORT bank transfer as payment method.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_STRIPE_SOFORT',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
importe: 1,
orderId: "61f8db47-baf8-444d-a867-c7ff4676d5cf",
periodicidad: "Z00",
nombre: "Super",
primerApellido: "L贸pez",
segundoApellido: "L贸pez",
email: "superL贸[email protected]"
}
});

SC_EVENT_PAYMENT_STRIPE_SEPA

It indicates that the user has selected Stripe's SEPA direct debit as payment method.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_STRIPE_SEPA',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
importe: 1,
orderId: "61f8db47-baf8-444d-a867-c7ff4676d5cf",
periodicidad: "Z00",
nombre: "Super",
primerApellido: "L贸pez",
segundoApellido: "L贸pez",
email: "superL贸[email protected]"
}
});

SC_EVENT_PAYMENT_STRIPE_CARD

It indicates that the user has selected to pay through Stripe with a debit or credit card.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_STRIPE_CARD',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
importe: 1,
orderId: "61f8db47-baf8-444d-a867-c7ff4676d5cf",
periodicidad: "Z00",
nombre: "Super",
primerApellido: "L贸pez",
segundoApellido: "L贸pez",
email: "superL贸[email protected]"
}
});

SC_EVENT_PAYMENT_BRAINTREE_CARD

It indicates that the user has selected to pay through Braintree with a debit or credit card.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_BRAINTREE_CARD',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
importe: 1,
orderId: "61f8db47-baf8-444d-a867-c7ff4676d5cf",
periodicidad: "Z00",
nombre: "Super",
primerApellido: "L贸pez",
segundoApellido: "L贸pez",
email: "superL贸[email protected]"
}
});

SC_EVENT_PAYMENT_BRAINTREE_PAYPAL

It indicates that the user has selected to pay with Paypal through Braintree.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_BRAINTREE_PAYPAL',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
importe: 1,
orderId: "61f8db47-baf8-444d-a867-c7ff4676d5cf",
periodicidad: "Z00",
nombre: "Super",
primerApellido: "L贸pez",
segundoApellido: "L贸pez",
email: "superL贸[email protected]"
}
});

SC_EVENT_PAYMENT_PAYPAL

It indicates that the user has selected to pay with Paypal.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_PAYPAL',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
importe: 1,
orderId: "61f8db47-baf8-444d-a867-c7ff4676d5cf",
periodicidad: "Z00",
nombre: "Super",
primerApellido: "L贸pez",
segundoApellido: "L贸pez",
email: "superL贸[email protected]"
}
});

SC_EVENT_PAYMENT_REDSYS_CARD

It indicates that the user has selected to pay through Redsys with a debit or credit card.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_REDSYS_CARD',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
importe: 1,
orderId: "61f8db47-baf8-444d-a867-c7ff4676d5cf",
periodicidad: "Z00",
nombre: "Super",
primerApellido: "L贸pez",
segundoApellido: "L贸pez",
email: "superL贸[email protected]"
}
});

SC_EVENT_PAYMENT_PAYULATAM_CARD

It indicates that the user has selected to pay through PayULatam with a debit or credit card.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_PAYULATAM_CARD',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
importe: 1,
orderId: "61f8db47-baf8-444d-a867-c7ff4676d5cf",
periodicidad: "Z00",
nombre: "Super",
primerApellido: "L贸pez",
segundoApellido: "L贸pez",
email: "superL贸[email protected]"
}
});

SC_EVENT_PAYMENT_PAYULATAM_PSE

It indicates that the user has selected PayULatam bank transfer as payment method.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_PAYULATAM_PSE',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
importe: 1,
orderId: "61f8db47-baf8-444d-a867-c7ff4676d5cf",
periodicidad: "Z00",
nombre: "Super",
primerApellido: "L贸pez",
segundoApellido: "L贸pez",
email: "superL贸[email protected]"
}
});

SC_EVENT_PAYMENT_CRM

It indicates that the user has selected to pay through a CRM Transaction.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_CRM',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
importe: 1,
orderId: "61f8db47-baf8-444d-a867-c7ff4676d5cf",
periodicidad: "Z00",
nombre: "Super",
primerApellido: "L贸pez",
segundoApellido: "L贸pez",
email: "superL贸[email protected]"
}
});

SC_EVENT_GATEWAY_PAYMENT_SUCCEEDED

It indicates that the payment gateway has confirmed that the payment has succeeded.

In the case of asynchronous payment methods, such as Direct Debits, this event confirms that the payment process has successfully finished but the transaction has not been confirmed yet by the donor's bank.

dataLayer.push({
event: 'SC_EVENT_GATEWAY_PAYMENT_SUCCEEDED',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
importe: 1,
orderId: "61f8db47-baf8-444d-a867-c7ff4676d5cf",
periodicidad: "Z00",
nombre: "Super",
primerApellido: "L贸pez",
segundoApellido: "L贸pez",
email: "superL贸[email protected]"
}
});

SC_EVENT_GATEWAY_PAYMENT_FAILED

It indicates that the payment gateway has confirmed that the payment has failed.

dataLayer.push({
event: 'SC_EVENT_GATEWAY_PAYMENT_FAILED',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
importe: 1,
orderId: "61f8db47-baf8-444d-a867-c7ff4676d5cf",
periodicidad: "Z00",
nombre: "Super",
primerApellido: "L贸pez",
segundoApellido: "L贸pez",
email: "superL贸[email protected]"
}
});

SC_EVENT_PAYMENT_SUCCEEDED

It indicates that the user has reached the last screen of the payment process indicating that the payment has succeeded.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_SUCCEEDED',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
importe: 1,
orderId: "61f8db47-baf8-444d-a867-c7ff4676d5cf",
periodicidad: "Z00",
nombre: "Super",
primerApellido: "L贸pez",
segundoApellido: "L贸pez",
email: "superL贸[email protected]"
}
});

SC_EVENT_PAYMENT_FAILED

It indicates that the user has reached the last screen of the payment process indicating that the payment has failed.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_FAILED',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
importe: 1,
orderId: "61f8db47-baf8-444d-a867-c7ff4676d5cf",
periodicidad: "Z00",
nombre: "Super",
primerApellido: "L贸pez",
segundoApellido: "L贸pez",
email: "superL贸[email protected]"
}
});

Did this answer your question?