Using the data layer
Various events and objects about your campaigns and supporters are pushed into the data layer. This lets you use analytics services such as Google Analytics 4 (GA4) or tag management platforms like Google Tag Manager (GTM) to reference and track information, including transactions, donation amount, donation frequency, campaign ID, and more.
We recommend reviewing the events and objects in this article to familiarize yourself with the available data for different campaign types.
Events
Users trigger events by taking action on your campaigns. Certain events apply to specific campaign types, so take a moment to review both the events and your campaigns.
| Event name | Campaign type | Details |
|---|---|---|
| custom_page_view | All campaigns | Supporter visits a campaign. |
| begin_checkout | Studio | Supporter enters the checkout flow. |
| purchase | Studio | Supporter completes their transaction. |
| form_error | Studio | Supporter tries to proceed to the next step of the checkout flow and encounters an error. |
| form_submit | Studio | Supporter tries to proceed to the next step of the checkout flow, regardless of whether they encounter an error that prevents them from doing so. |
| transaction | All campaigns | Supporter completes their transaction, including donations, registrations, and tickets |
| ga_purchase | All campaigns | Supporter completes their transaction |
| ga_add_to_cart | Ticketed events Registration with Fundraising |
Supporter adds a ticket to their cart during checkout. This event fires for each item added to the cart. |
| ga_remove_from_cart | Ticketed events Registration with Fundraising |
Supporter removes a ticket from their cart during checkout. This event fires for each item added to the cart. |
| fundraising_page_sign_up | Peer-to-Peer Registration with Fundraising |
Supporter signs up as a fundraiser. |
| fundraising_team_sign_up | Peer-to-Peer Registration with Fundraising |
Supporter joins or creates a fundraising team. |
Note: Events starting with “ga” are used primarily for Google Analytics eCommerce Tracking.
Event examples
custom_page_view
{
event:"custom_page_view",
member:{
id:4432416,
loggedIn:true
},
page:{
name:"Campaign"
}
}
transaction (Donation)
{
transaction:{
campaign_id: 123456,
charged_total_gross_amount: 25,
charged_currency_code: "USD",
charged_fees_amount: null,
charged_classy_fees_amount: 1.25,
Charged_pp_fees_amount: 0.82,
first_name: "Byron",
last_name: "Jones",
email: "test@email.org",
company_name: null,
created_at: "2021-12-08T00:00:00+0000",
designation_id: 226227,
designation_name: "General Fund Project",
designation_external_reference_id: null,
donation_gross_amount: 25,
donation_net_amount: 25,
fee_on_top: false,
fundraising_page_id: null,
fundraising_team_id: null,
has_dedication: false,
id: 8024900,
is_anonymous: false,
is_gift_aid: false,
member_id: 123456,
organization_id: 12345,
overhead_net_amount: 0,
promo_code_code: null,
purchased_at: "2021-12-08T17:57:49+0000",
raw_donation_gross_amount: 25,
raw_currency_code: "USD",
raw_overhead_net_amount: 0,
raw_total_gross_amount: 25,
total_gross_amount: 25,
recurring_donation_plan_id: null,
refunded_at: null,
status: "success",
tax_entity_id: null,
payment_source: "MANUAL",
type: "donation",
frequency: "one-time",
billing_postal_code: "787"
},
event: "transaction",
}
ga_purchase (donation)
{
ecommerce: {
purchase: {
products: [
{
id: 8024900,
name: "Donation",
sku: "1",
category: "Direct Donation",
price: 25,
quantity: 1
}
],
actionField: {
id: 8024900,
revenue: 25
}
}
},
event: "ga_purchase",
}
transaction (ex. registration with fundraising)
{
transaction: {
campaign_id: 123456,
donation_fee_on_top: false,
donation_frequency: "one-time",
id: 290002,
member_id: 765432,
raw_currency_code: "USD",
registration_fee_on_top: false,
items: [
{
adjustment_amount: null,
cart_id: 290006,
entries: 1,
id: 359446,
overhead_amount: 0,
price: 21,
product_id: 14257,
promo_code_id: null,
registrants: [
{
cart_item_id: 359416,
donation_share: 1,
first_name: "John",
last_name: "Howard",
email: "john@email.org",
id: 291711,
registration_id: null
}
]
},
{
adjustment_amount: null,
cart_id: 290006,
entries: 1,
id: 359217,
overhead_amount: 0,
price: 0,
product_id: 14658,
promo_code_id: null,
registrants: [
{
cart_item_id: 359417,
donation_share: null,
first_name: "Billy",
last_name: "Howard",
email: "billy@email.org",
id: 291712,
registration_id: null
}
]
}
],
type: "cart"
},
event: "transaction",
}
ga_purchase (registration with fundraising)
{
ecommerce: {
purchase: {
products: [
{
id: 8024926,
name: "Donation",
sku: "1",
category: "Additional Donation",
price: 25,
quantity: 1
},
{
id: 359416,
name: "Adult Walker",
sku: "359416",
category: "Ticket",
price: 25,
quantity: 1
},
{
id: 359417,
name: "Child Walker",
sku: "359417",
category: "Ticket",
price: 0,
quantity: 1
}
],
actionField: {
id: 8024926,
revenue: 0,
coupon: null
}
}
},
event: "ga_purchase",
}
ga_add_to_cart
{
ecommerce: {
add: {
products: [
{
id: 146588,
name: "Adult Walker",
price: 25,
quantity: 1
}
]
}
},
event: "ga_add_to_cart",
}
ga_remove_from_cart
{
ecommerce: {
remove: {
products: [
{
id: 146588,
name: "Adult Walker",
price: 25,
quantity: 1
}
]
}
},
event: "ga_remove_from_cart",
}
fundraising_page_sign_up
{
fundraiser: {
alias: "Sarah Jones",
campaign_id: 12345,
created_at: "2021-12-08T18:11:38+0000",
designation_id: 226227,
fundraising_team_id: null,
id: 935208,
member_id: 9876543,
organization_id: 34212,
raw_currency_code: "USD",
raw_goal: "500.000",
normalized_currency_code: "USD",
normalized_goal: 500,
status: "active",
team_role: null,
title: "Sarah Jones"
},
event: "fundraising_page_sign_up",
}
fundraising_team_sign_up
{
team: {
id: 76543,
name: "Team Work",
normalized_goal: 500,
normalized_currency_code: "USD",
raw_goal: "500.000",
raw_currency_code: "USD",
team_lead_id: 1234567
},
event: "fundraising_team_sign_up",
}Studio embedded form events
Your organization needs to use Google Tag Manager to accurately track events in your embedded donation form. If you’ve already implemented Google Tag Manager, you can use your analytics tool to track embedded specific events added to the data layer.
Since the embedded donation form is a multi-step checkout process, these custom events let you better understand how supporters navigate your embedded donation form.
| Event name | Details |
|---|---|
| studio_checkout_cta_hover | When a Supporter hovered over the CTA (Continue, Main Donate Button, Text Link) |
| studio_inline_amount_change | When the Supporter changes the amount in the inline grid |
| studio_inline_frequency_change | When the Supporter changes the donation frequency in the inline grid |
| studio_form_amount_change | When the Supporter changes the amount in the donation form |
| studio_form_frequency_change | When the Supporter changes the donation frequency in the donation form |
| begin_checkout | Supporter hovers and opens the modal |
| studio_checkout_close | Supporter closes checkout |
| add_payment_info | Supporter submits their payment information |
| purchase | Supporter completes their transaction |
| form_submit | Supporter proceeds to the next step of the checkout flow, regardless of whether they encounter an error that prevents them from doing so |
| studio_form_error | Supporter tries to proceed to the next step of the checkout flow and encounters an error |
| studio_form_start | Supporter opens the form |
| studio_form_back | Supporter goes back one step |
| studio_form_skip | Supporter skips a question on the form |
| studio_faq_open | Supporter opens Frequently Asked Questions |
| studio_faq_expand | Supporter expands an FAQ question |
| share | Supporter clicks one of the social share links |
Legacy embedded form events
Users trigger the following events by taking an action on your legacy embedded donation form. You can use these as Triggers in Google Tag Manager by selecting the Custom Event trigger type and entering the event name.
| Popup event name | Inline event name | Details |
|---|---|---|
embedded-giving:modal:track-event:open |
embedded-giving:inline:track-event:open |
The supporter opens the donation form Note: Inline donation forms are always open on the page, so this event tracks when the inline form loads for the supporter's screen. |
embedded-giving:modal:track-payment-methods |
embedded-giving:inline:payment-methods |
Payment method options display to the supporter |
embedded-giving:modal:payment-method-details |
embedded-giving:inline:payment-method-details |
Payment detail fields display to the supporter |
embedded-giving:modal:recurring-nudge |
embedded-giving:inline:recurring-nudge |
Optional recurring nudge displays to supporter |
embedded-giving:modal:contact |
embedded-giving:inline:contact |
Contact information fields display to supporter |
embedded-giving:modal:thank-you |
embedded-giving:inline:thank-you |
Thank you page displays to supporters |
embedded-giving:modal:faq |
embedded-giving:inline:faq |
The supporter opens the FAQ menu |
Objects
Within the custom events we fire to the data layer, there are several objects that act as categories to group together relevant variables. Some objects are available after a specific event, and others appear on every event.
Objects:
Transaction
Details related to the transaction. Included on transaction custom event.
Note: Fields will differ based on which type of transaction occurred. Donation transactions include fields such as donation_gross_amount, whereas Ticketed transactions (“cart”) include product-level information about tickets purchased, such as price and promo_code_id.
Examples:
Example of a donation transaction
transaction: {
campaign_id: 365472,
charged_total_gross_amount: 1,
charged_currency_code: "USD",
charged_fees_amount: null,
charged_classy_fees_amount: 0.05,
charged_pp_fees_amount: 0.33,
company_name: null,
created_at: "2021-11-01T00:00:00+0000",
designation_id: 61519,
designation_name: "General Funds Project",
designation_external_reference_id: null,
donation_gross_amount: 1,
donation_net_amount: 1,
fee_on_top: false,
fundraising_page_id: null,
fundraising_team_id: null,
has_dedication: false,
id: 52586607,
is_anonymous: false,
is_gift_aid: false,
member_id: 3664877,
organization_id: 52859,
overhead_net_amount: 0,
promo_code_code: null,
purchased_at: "2021-11-01T20:46:39+0000",
raw_donation_gross_amount: 1,
raw_currency_code: "USD",
raw_overhead_net_amount: 0,
raw_total_gross_amount: 1,
total_gross_amount: 1,
recurring_donation_plan_id: null,
refunded_at: null,
status: "success",
tax_entity_id: null,
payment_source: "MANUAL",
type: "donation",
frequency: "one-time",
billing_postal_code: "064"
}
Two tickets purchased to an event for $1 each.
transaction: {
campaign_id: 252013,
donation_fee_on_top: null,
donation_frequency: null,
id: 4078608,
member_id: 3664877,
raw_currency_code: "USD",
registration_fee_on_top: false,
items: [
{
adjustment_amount: null,
cart_id: 4078608,
entries: 1,
id: 6406371,
overhead_amount: 0.99,
price: 1,
product_id: 385585,
promo_code_id: null,
registrants: [
{
cart_item_id: 6406371,
donation_share: null,
id: 4618381,
registration_id: null
}
]
},
{
adjustment_amount: null,
cart_id: 4078608,
entries: 1,
id: 6406372,
overhead_amount: 0,
price: 1,
product_id: 385586,
promo_code_id: null,
registrants: [
{
cart_item_id: 6406372,
donation_share: null,
id: 4618382,
registration_id: null
}
]
}
Organization
Information about your organization’s unique account, including its unique ID and name (configurable in your account settings). Available on all custom events.
Example:
Supporter is interacting with the organization “Test Nonprofit”, which has the ID 52859
organization: {
id: 52859,
name: "Test Nonprofit"
}
Campaign
The campaign associated with this action. Available on all custom events.
Note: raw_currency_code and raw_goal are the values that are visible on the page and normalized_currency_code and normalized_goal are the values that are set at the campaign or organization level, and reflect the currency and goal that transactions will ultimately be charged in.
Example:
campaign: {
id: 252013,
name: "Do Good, Drink Good",
country: "US",
created_at: "2019-09-30T19:15:08+0000",
normalized_currency_code: "USD",
designation_id: 61519,
normalized_goal: 1,
raw_goal: "1.000",
raw_currency_code: "USD",
type: "ticketed"
}
Member
Information about the supporter’s unique account and login status. Available after the custom event custom_page_view, which fires on every page.
Example:
member: {
id: 3664877,
loggedIn: true
}
Fundraiser
Information about the individual fundraiser. Available on the custom events fundraising_page_sign_up.
Note: raw_currency_code and raw_goal are the values set by the fundraiser and will be visible on the team page, whereas normalized_goal and normalized_currency_code are set at the campaign or organization level.
Example:
An active peer-to-peer fundraiser named John Doe with a goal of $500 USD who is not a member of a fundraising team.
fundraiser: {
alias: "John Doe",
campaign_id: 373632,
created_at: "2021-11-02T15:22:51+0000",
designation_id: 61519,
fundraising_team_id: null,
id: 3573188,
member_id: 3664877,
organization_id: 52859,
raw_currency_code: "USD",
raw_goal: "500.000",
normalized_currency_code: "USD",
normalized_goal: 500,
status: "active",
team_role: null,
title: "John Doe"
}
Team
Information about the fundraising team that the individual fundraiser is a member of. Available on the custom event fundraising_team_sign_up.
Note: raw_currency_code and raw_goal are the values set by the team creator and will be visible on the team page, whereas normalized_goal and normalized_currency_code are set at the campaign or organization level. average_donation (if relevant) is the average of donations made directly to the team, and does not include donations made to fundraisers on the team.
Example:
The supporter is a member of a fundraising team named “Test Team”. The team has two members (fundraisers) who have raised a total of $250. This was generated from three donors who have made a total of five donations. They are 50% towards their goal of $500 USD raised.
team: {
average_donation: 100,
id: 389737,
name: "Test Team",
normalized_goal: 500,
normalized_currency_code: "USD",
raw_goal: "500.000",
raw_currency_code: "USD",
team_lead_id: 3664877,
total_donations: 5,
total_donors: 3,
total_fundraisers: 2,
total_raised: 250,
percent_to_goal: 50
}
Page
Information about the page that the supporter is currently on. Available on the custom event custom_page_view, which fires on every page.
Possible Values:
- “Campaign”
- “Team”
- “Fundraiser”
- “Campaign Donate”
- “Fundraiser Donate”
- “Fundraiser Dashboard”
- “Team Donate”
- “Team Dashboard”
- “Cart”
- ”Event Receipt”
- “Campaign Donation Receipt”
- “Fundraiser Donation Receipt”
- “Team Donation Receipt”
- “Search”
Example:
Supporter is on the event receipt or “thank you” page after making a successful event transaction
page: {
name: "Event Receipt"
}
eCommerce
Product-level information formatted for Google Analytics eCommerce Tracking. Includes information about items added or removed from the supporter’s cart, as well as itemized transactions. This object can be used to custom-configure GA4 eCommerce Tracking as well as other tags where more granular checkout and transaction data is needed.
Example:
One $1 ticket was added to the supporter’s cart named “Test Ticket 2” and two tickets were purchased in total, for $1 each.
ecommerce: {
add: {
products: [
{id: 385586, name: "Test Ticket 2", price: 1, quantity: 1}
]
},
purchase: {
products: [
{
id: 6406371,
name: "Test Ticket 1",
sku: "6406371",
category: "Ticket",
price: 1,
quantity: 1
},
{
id: 6406372,
name: "Test Ticket 2",
sku: "6406372",
category: "Ticket",
price: 1,
quantity: 1
}
],
actionField: {id: 52627140, revenue: 0, coupon: null}
}