Skip to main content

Connect Google Analytics and Google Tag Manager to your Campaign

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

Written by Davide Ferrari

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.

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

Tool

What it does

Google Analytics

It 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

It 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 filled in a donation form, etc.

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

The choice of tracking tool will depend on how you use other platforms to promote your campaign.

For example, if you plan to run ad campaigns with Facebook Ads, Google Ads or Youtube Ads, it will be more appropriate to use Google Tag Manager to track the results of your ad campaigns from GTM.

If you don't plan to send data to your digital marketing department, you do not need to choose Google Tag Manager — Google Analytics would be enough.

⚠️ We do not recommend entering both codes. If you do, you may end up with duplicate data in page views.

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

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

1. Go to Campaign Settings Tracking codes

2. Click on Edit

3. Enter the corresponding ID:

  • For Google Analytics: enter your Measurement ID in the Google Analytics field. The format is UA-xxxxxxxx-x.

  • For Google Tag Manager: enter your Container ID in the Google Tag Manager field. The format is GTM-xxxxxxx.

4. Click on Save Changes.

📌 Note that you can integrate Google Analytics or Google Tag Manager into each StockCrowd campaign, using different tracking IDs in each one.

❗️ Please note that for P2P-type campaigns, the Google Analytics code is not available — only Google Tag Manager. This is because this type of campaign works differently.

How do I add a Facebook Pixel to a StockCrowd campaign?

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

How do I check that the tracking codes are correctly applied?

You can verify that the tracking codes are active in your campaign using the Google Chrome extension called Google Tag Assistant Legacy. Follow these steps:

1. Go to your campaign URL in the browser.

2. Click on the Google Tag Assistant Legacy extension icon:

3. Click on Enable:

4. Click on Record:

5. Refresh the page and click on the extension icon again to see the tracking codes detected in your campaign:

Why can't I see the code I installed?

If the code doesn't appear but you've already configured it, you may need to update the HTML of the campaign after creating its URL.

What events does StockCrowd send to Google Tag Manager?

When a user starts the donation flow, StockCrowd sends events to the Google Tag Manager dataLayer to reflect user behaviour.

Parameters of the data attribute

Each event includes a data attribute with some of the following parameters:

Parameter

Description

UA

Google Analytics code entered in the campaign. If provided, a page view pulse will be sent with a virtual page generated from StockCrowd.

idCampaign

Campaign ID.

idEmpresa

Organisation ID.

importe

Donation amount.

orderId

Payment request order number.

periodicidad

Constant indicating the payment frequency.

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

nombre

User's first name.

primerApellido

User's first last name. If the campaign is configured to request both surnames together, they will both be included in this field.

segundoApellido

User's second surname.

email

User's email address.

prefijoTelefono (*)

User's phone prefix.

telefono (*)

User's phone number.

documento (*)

User's document number.

tipoDocumento (*)

User's document type.

⚠️ Attributes marked with (*) will only appear if the form displays those fields.

Event list

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

SC_EVENT_PAYMENT

It indicates that the user has started the 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 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 the 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 has consulted the information to make a payment by cheque.

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 has consulted the information to make a payment by bank transfer.

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. This screen may appear before or after payment, depending on the campaign configuration.

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

SC_EVENT_DATA_FORM_COMPLETED

It indicates that the user has completed their personal data.

dataLayer.push({
event: 'SC_EVENT_DATA_FORM_COMPLETED',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
documento: "Y564423V",
tipoDocumento:304,
prefijoTelefono:"+34 España"
telefono:"600600600"
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 a bank transfer via the Stripe payment gateway.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_STRIPE_SOFORT',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
documento: "Y564423V",
tipoDocumento:304,
prefijoTelefono:"+34 España"
telefono:"600600600"
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 to pay with a SEPA direct debit via the Stripe payment gateway.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_STRIPE_SEPA',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
documento: "Y564423V",
tipoDocumento:304,
prefijoTelefono:"+34 España"
telefono:"600600600"
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 with a debit or credit card via the Stripe payment gateway.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_STRIPE_CARD',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
documento: "Y564423V",
tipoDocumento:304,
prefijoTelefono:"+34 España"
telefono:"600600600"
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 with a debit or credit card via the Braintree payment gateway.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_BRAINTREE_CARD',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
documento: "Y564423V",
tipoDocumento:304,
prefijoTelefono:"+34 España"
telefono:"600600600"
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 via Braintree. Please note that if Braintree is your campaign's default payment gateway, it will exclude direct PayPal payments.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_BRAINTREE_PAYPAL',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
documento: "Y564423V",
tipoDocumento:304,
prefijoTelefono:"+34 España"
telefono:"600600600"
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 via the PayPal payment gateway.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_PAYPAL',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
documento: "Y564423V",
tipoDocumento:304,
prefijoTelefono:"+34 España"
telefono:"600600600"
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 with a debit or credit card via the Redsys payment gateway.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_REDSYS_CARD',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
documento: "Y564423V",
tipoDocumento:304,
prefijoTelefono:"+34 España"
telefono:"600600600"
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 with a debit or credit card via the PayU Latam payment gateway.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_PAYULATAM_CARD',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
documento: "Y564423V",
tipoDocumento:304,
prefijoTelefono:"+34 España"
telefono:"600600600"
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 a bank transfer via the PayU Latam payment gateway.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_PAYULATAM_PSE',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
documento: "Y564423V",
tipoDocumento:304,
prefijoTelefono:"+34 España"
telefono:"600600600"
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 via direct debit through a CRM Transaction.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_CRM',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
documento: "Y564423V",
tipoDocumento:304,
prefijoTelefono:"+34 España"
telefono:"600600600"
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 returned a successful status for the payment request.

For asynchronous payment methods, such as direct debits or bank transfers, this event only means the operation completed successfully, but the payment has not yet been confirmed by the donor's bank.

dataLayer.push({
event: 'SC_EVENT_GATEWAY_PAYMENT_SUCCEEDED',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
documento: "Y564423V",
tipoDocumento:304,
prefijoTelefono:"+34 España"
telefono:"600600600"
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 returned a failed status for the payment request.

dataLayer.push({
event: 'SC_EVENT_GATEWAY_PAYMENT_FAILED',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
documento: "Y564423V",
tipoDocumento:304,
prefijoTelefono:"+34 España"
telefono:"600600600"
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 final page of the payment flow successfully.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_SUCCEEDED',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
documento: "Y564423V",
tipoDocumento:304,
prefijoTelefono:"+34 España"
telefono:"600600600"
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 final page of the payment flow with a failed status.

dataLayer.push({
event: 'SC_EVENT_PAYMENT_FAILED',
data: {
UA: null,
idCampaign: 88,
idEmpresa: 25,
documento: "Y564423V",
tipoDocumento:304,
prefijoTelefono:"+34 España"
telefono:"600600600"
importe: 1,
orderId: "61f8db47-baf8-444d-a867-c7ff4676d5cf",
periodicidad: "Z00",
nombre: "Super",
primerApellido: "López",
segundoApellido: "López",
email: "superLó[email protected]"
}
});

SC_EVENT_DATA_SIGNATURE_SUCCEED

It indicates that the signature has been registered successfully.

{
"event": "SC_EVENT_DATA_SIGNATURE_SUCCEED",
"data": {
"idCampaign": 5275,
"idEmpresa": 33,
"UA": null,
"UA_SC": "UA-73976615-20",
"divisa": "EUR",
"tituloCampaign": "Evento de firmas",
"prefijoTelefono": "+34 España"
}

SC_EVENT_CONSENT_UPDATED

It indicates the cookies agreement consent has been updated.

❓Frequently Asked Questions

Why doesn't the tracking code install correctly after adding it, and why doesn't it show up when measuring?

When the measurement doesn't appear, it's usually because the code has not actually been inserted into the campaign's HTML, even if you've already saved it in the settings. This can happen for two reasons:

  1. If your HTML is hosted outside of StockCrowd (hosted out), you may not have downloaded the updated HTML after adding or modifying the code, in order to re-upload it to your hosting provider.

  2. If it's a URL managed through StockCrowd, you need to update the code by saving the campaign URL again. To do this, from Home or from My Campaigns, find the campaign, select the campaign's link icon (🔗), click Edit (pencil icon), and simply save the URL again.

How do I add a Facebook Pixel to a StockCrowd campaign?

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

What is the correct format for the Google Analytics ID?

The Google Analytics identifier must have the format UA-xxxxxxxx-x. You can find your measurement ID in the settings section of your Google Analytics account. If you're unsure where to find it, check Google's support article on how to locate your measurement ID.

What is the correct format for the Google Tag Manager ID?

The Google Tag Manager identifier must have the format GTM-xxxxxxx. You can get this ID on the main page of your container within Google Tag Manager. Make sure to copy the full ID including the GTM prefix so it works correctly.

Can I use Google Analytics and Google Tag Manager at the same time?

It's not recommended to use both codes simultaneously in the same campaign. If you do, you may end up with duplicate data in page views, which can distort your statistics. We recommend choosing a single tool based on your needs: Google Analytics for basic visitor tracking, or Google Tag Manager for more detailed tracking of events and conversions.

Why don't the tracking codes show up in Google Tag Assistant Legacy?

If you've set up the codes but they don't appear in Google Tag Assistant Legacy, you may need to update your campaign's HTML after creating its URL. Changes may take a few minutes to propagate. Try refreshing the page in your browser and running Google Tag Assistant Legacy again.

What events can I measure with Google Tag Manager in my campaigns?

StockCrowd sends multiple events to Google Tag Manager that let you measure each step of the donation process, including when a user starts the donation flow, completes their details, selects a payment method, and finishes the transaction. These events include detailed information such as the amount, recurrence, and donor data, allowing you to create custom reports and link your campaigns with advertising tools like Facebook Ads or Google Ads.

Do P2P campaigns have the same tracking as standard campaigns?

P2P (peer-to-peer) campaigns only support Google Tag Manager and do not include the Google Analytics option. This is because this type of campaign works differently from standard campaigns, requiring a more specific event tracking system. However, you can use all the available Google Tag Manager events to measure behavior in your P2P campaigns.


Need more help? Contact us at [email protected]

Did this answer your question?