For the complete documentation index, see llms.txt. This page is also available as Markdown.

Tracking Codes for Action Pages

Add Google Analytics 4, Google Tag Manager, Meta Pixel, and X Pixel IDs to Donation Pages, Event Pages, and Lead Pages, reuse them with presets, and test.

Tracking codes connect your Action Pages to Google Analytics 4 (GA4), Google Tag Manager (GTM), the Meta (Facebook) Pixel, and the X (Twitter) Pixel, so you can measure visits, donations, and signups. You add them in the Page Builder under Setup > Settings > Tracking codes. This article covers adding tracking codes, Settings presets, each tracking tool, embedded pages, UTM parameters, when tracking fires, and testing your setup.

Before You Begin

  • To add or change tracking codes and Settings presets, you need Action Pages: Edit permissions. Without them, the Page Builder shows a View-only access notice and you can't save. See Permission Sets.

  • Donation Pages, Event Pages, and Lead Pages all use the same Setup > Settings > Tracking codes section.

  • Tracking codes are set on each page or on the Settings preset the page uses. There's no account-wide tracking codes screen.

  • Tracking doesn't run in the Page Builder preview. Test on your live page.

Supported Tracking Codes

Tool
Field in Tracking Codes
What It Sends

Google Analytics 4

Google Analytics and Send e-commerce events to Google Analytics

Page views, donation and lead events, and e-commerce purchase events

Google Tag Manager

Google Tag Manager

Loads your container and pushes donation and lead events to the data layer

Meta Pixel

Facebook Pixel

PageView, Purchase, and Lead events

X Pixel

X Pixel

Page views only

  • The fields accept IDs only. You can't paste a pixel script into a page.

  • There's no built-in field for other tools, such as TikTok, LinkedIn, or Google Ads. Add those tags through your own GTM container. See Add Other Tags Through GTM.

Add Tracking Codes to an Action Page

To add tracking codes:

  1. Go to Action Pages > Action Pages and open your page in the Page Builder.

  2. In the left menu, under Setup, select Settings.

  3. In the Tracking codes section, enter the IDs you use.

  4. Click Save.

Your changes go live when you save. There's no separate publish step, but the live page can take about a minute to show the update.

Tracking Code Fields

  • Google Analytics: Your GA4 Measurement ID, which starts with G- (for example, G-XXXXXXXXXX). Up to 16 characters.

  • Send e-commerce events to Google Analytics: Sends a GA4 purchase event for each donation on Donation Pages and Event Pages.

  • Google Tag Manager: Your GTM Container ID, which starts with GTM- (for example, GTM-XXXXXXXX). Up to 12 characters.

  • Google origin allowlist: Fill this in only when the page is embedded on your website. See Embedded Pages.

  • Facebook Pixel: Your Meta Pixel ID. Up to 17 characters.

  • X Pixel: Your X Pixel ID.

Use Settings Presets

A Settings preset saves your tracking codes so you can reuse them across pages. Every account starts with a preset named Default, and new pages use it. You manage presets in the Settings preset section of Setup > Settings.

  • Select a preset: Applies that preset to the page. Applying a preset replaces the tracking codes on the page.

  • Save: Saves your tracking code changes to this page only. The preset and other pages that use it don't change.

  • Update Preset: Saves your tracking code changes to the preset itself, which updates every page that uses it. Before you confirm, the dialog shows how many pages use the preset.

  • Save as Preset: Saves the page's current settings as a new named preset. Save the page to attach it to the new preset.

  • Apply to pages…: Opens Update Pages to Preset, where you choose the pages that should use the preset.

For more on presets, see Presets in the Page Builder.

Change Tracking Codes on Every Page That Uses a Preset

To update a preset:

  1. Go to Action Pages > Action Pages and open any page that uses the preset.

  2. In the left menu, under Setup, select Settings.

  3. In the Tracking codes section, update the IDs.

  4. Click Update Preset.

  5. Review the number of pages that use the preset, then confirm.

The message "Updated "[preset name]"." appears, and every page that uses the preset loads the new tracking codes.

A page that was edited and saved on its own keeps its own copy of the tracking codes and doesn't pick up later preset updates. To bring it back to the preset, use Apply to pages….

Apply a Preset to Several Pages

To apply a preset:

  1. Open a page that uses the preset, and go to Setup > Settings.

  2. In the Settings preset section, click Apply to pages….

  3. In Update Pages to Preset, select the pages, or select All Pages.

  4. Click Apply.

The message "Applied "[preset name]" to [number] action pages." appears, and the selected pages use the preset's tracking codes.

Google Analytics 4 (GA4)

Send GA4 data one way only. Use either the built-in Google Analytics field or your own GTM container, not both.

  • Built-in field (recommended for most accounts): Enter your Measurement ID in Google Analytics and check Send e-commerce events to Google Analytics. Anedot sends page views and purchase events for you.

  • Your GTM container: Leave Google Analytics empty and leave the e-commerce box unchecked. Build your GA4 tags in GTM on Anedot's data layer event. See Send GA4 Purchases From GTM.

Set Up GA4

To set up GA4 with the built-in field:

  1. In Google Analytics, go to Admin > Data streams, select your web stream, and copy the Measurement ID.

  2. In the Page Builder, go to Setup > Settings and paste the whole ID, including G-, in Google Analytics.

  3. Check Send e-commerce events to Google Analytics.

  4. Click Save. If your pages use more than one Settings preset, repeat these steps for each preset.

  5. In Google Analytics, go to Admin > Events and make sure purchase is marked as a key event.

Use the Measurement ID from a web stream. Don't use a Property ID, a GT- tag ID, a UA- ID, or a GTM- ID in this field.

What Anedot Sends to GA4

Event
When It Fires
Details

page_view

The page loads

Standard GA4 page data

purchase

A donation succeeds on a Donation Page or Event Page, and Send e-commerce events to Google Analytics is on

transaction_id, value, currency (USD), affiliation (page name), and one item (one-time or recurring)

"[Page name] donation"

A donation succeeds on a Donation Page or Event Page

A custom event with the donation value

"[Page name] lead"

A Lead Page signup succeeds

A custom event with no value

  • All values are in U.S. dollars.

  • GA4 data is sent from the donor's browser only. Anedot doesn't send GA4 data from its servers.

  • To tell your pages apart in GA4 reports, use the page path or the affiliation (page name) on each purchase.

Use purchase as your GA4 key event. The "[Page name] donation" event names contain spaces, so they don't work well as key events.

GA4 Cross-Domain Tracking

Cross-domain tracking keeps a donor's GA4 session together when they move from your main website to your Action Page, so donations are credited to the campaign that brought the donor in.

These steps are our recommended setup:

  1. Use the same GA4 Measurement ID on your main website and in every Settings preset your Action Pages use.

  2. Check Send e-commerce events to Google Analytics, then click Save.

  3. Add GA4 one way only, either in the Google Analytics field or in GTM.

  4. If your Action Pages use a different root domain or secure.anedot.com, go to Admin > Data streams in Google Analytics, select your web stream, and select Configure tag settings > Configure your domains. Add your main domain, your custom domain, and anedot.com. Pages on a subdomain of your website, such as give.example.org, don't need this step.

  5. In Configure tag settings, click Show all, then select List unwanted referrals. Add your own domains, anedot.com, paypal.com, and opennode.com.

  6. In your web stream's Enhanced measurement settings, open Page views, show the advanced settings, and turn off Page changes based on browser history events.

  7. Mark purchase as a key event.

Google Tag Manager (GTM)

GTM lets you add your own marketing and analytics tags, such as Google Ads conversion tags, to your Action Pages.

To add GTM:

  1. In Google Tag Manager, copy your Container ID (for example, GTM-XXXXXXXX).

  2. In the Page Builder, go to Setup > Settings and paste the ID in Google Tag Manager.

  3. Click Save.

Use one container per page. To use the same container on many pages, add it to a Settings preset. See Use Settings Presets.

What Anedot Sends to the Data Layer

When a donation or signup succeeds, Anedot pushes one event to the data layer:

Event
Page Types

google_analytics_ecommerce_transaction

Donation Pages and Event Pages

generate_lead

Lead Pages

Anedot pushes this event for every successful donation or signup, whether or not Send e-commerce events to Google Analytics is on. Each push includes these fields:

  • transactionId: The submission ID.

  • transactionTotal: The donation total in U.S. dollars (donations only).

  • predictedLtv: An estimated lifetime value in cents, based on the recurring frequency (donations only).

  • gift_type: One-time or recurring.

  • fName, lName, city, state, postalCode, and country: The donor's name and location.

The data layer doesn't include email, phone, or UTM fields. To use UTM values in GTM, use GTM's built-in Page URL or Query variables.

Fire a Tag on a Donation or Signup

The receipt opens on the same page without a full page reload, so page view, DOM Ready, and "/receipt" page path triggers don't fire when a donation succeeds. Use a Custom Event trigger on Anedot's data layer event instead.

Step 1: Create the Trigger

To create the trigger:

  1. In GTM, go to Triggers and click New.

  2. Choose Custom Event as the trigger type.

  3. For Event name, enter google_analytics_ecommerce_transaction. For Lead Pages, enter generate_lead.

  4. Name the trigger and click Save.

Step 2: Create the Variables

To create a variable for the donation amount:

  1. Go to Variables and click New.

  2. Choose Data Layer Variable.

  3. For Data Layer Variable Name, enter transactionTotal.

  4. Name the variable and click Save.

Repeat these steps with transactionId if your tag needs an order or transaction ID.

Step 3: Create Your Tag

To create your tag:

  1. Go to Tags and click New, then choose your tag type, such as Google Ads Conversion Tracking.

  2. Enter the tag's details. For a conversion value, select your transactionTotal variable.

  3. Under Triggering, select the Custom Event trigger from Step 1.

  4. Click Save, then submit and publish your container.

Send GA4 Purchases From GTM

If you send GA4 data through GTM instead of the built-in field, your own GTM tags must send the purchase event.

To send purchases from GTM:

  1. Create a GA4 event tag with the event name purchase.

  2. Set transaction_id to your transactionId variable, value to your transactionTotal variable, and currency to USD.

  3. Under Triggering, select the google_analytics_ecommerce_transaction Custom Event trigger.

  4. Click Save, then submit and publish your container.

Leave the Google Analytics field empty on your Action Pages so purchases aren't counted twice.

Add Other Tags Through GTM

To add a tool without a built-in field, such as TikTok or LinkedIn, add that tool's tag to your GTM container and fire it on the Custom Event trigger from Fire a Tag on a Donation or Signup. Use transactionTotal for the donation value.

GTM Restrictions on Action Pages

Anedot blocks GTM's DOM Element and JavaScript Variable variable types on Action Pages. Use Data Layer Variables for donation details. If a tag needs one of the blocked variable types, contact our Support team about removing the restriction for your account.

Meta (Facebook) Pixel

The Meta Pixel tracks visits, donations, and signups in the donor's browser.

To add the Meta Pixel:

  1. Copy your Meta Pixel ID from your Meta account.

  2. In the Page Builder, go to Setup > Settings and paste the ID in Facebook Pixel.

  3. Click Save.

Meta Events

Event
When It Fires
Details

PageView

The page loads

None

Purchase

A donation succeeds on a Donation Page or Event Page, after the payment is confirmed

Value in U.S. dollars, currency (USD), one-time or recurring, predicted lifetime value, and hashed donor contact details

Lead

A Lead Page signup succeeds

Hashed email

PageView and Purchase are separate events, so a page view and a donation from the same donor aren't double counted.

X (Twitter) Pixel

The X Pixel loads X's base pixel on your page, which records page views.

To add the X Pixel:

  1. Copy your X Pixel ID from your X Ads account.

  2. In the Page Builder, go to Setup > Settings and paste the ID in X Pixel.

  3. Click Save.

Embedded Pages

Google origin allowlist: Only fill this in if your page is embedded on your own site and you want donation events sent to that site. Enter full addresses like https://www.example.org, separated by commas. If you also use Google Tag Manager on this page, contact Support first.

  • Leave Google origin allowlist empty on pages that aren't embedded.

  • For more accurate tracking, link to your Action Page instead of embedding it.

UTM Parameters

UTM parameters are tags you add to the end of an Action Page link to show where your traffic comes from. GA4 reads them from the page URL, and Anedot keeps them on the URL without adding or removing any, so you don't need to set anything up in Anedot.

Add UTM parameters whenever you share an Action Page link, such as in ads, emails, text messages, social posts, partner links, or QR codes. For example:

https://secure.anedot.com/account-url-slug/page-slug?utm_source=facebook&utm_medium=paid&utm_campaign=year_end_appeal

Parameter
Description

utm_source

Traffic source (for example, facebook)

utm_medium

Channel (for example, email, social, or cpc)

utm_campaign

Campaign name (for example, fall_fundraiser)

utm_content

Ad or test variant (for example, button_a)

utm_term

Search term for paid keyword campaigns

UTM data appears in GA4 Acquisition reports as source, medium, and campaign. For other parameters Action Pages support, see URL Parameters.

When Tracking Fires

  • Page load: Each tracking code loads and records a page view.

  • Successful donation or signup: Donation and signup events fire in the donor's browser after the payment is confirmed. Declined or failed payments don't send these events.

  • Receipt: The receipt opens on the same page without a full page reload. Opening a receipt link directly doesn't send tracking events.

  • Callback URL: If your page uses a Callback URL, Anedot sends the tracking events before it redirects the donor.

  • Event Pages: Ticket purchases are tracked as donations, and ticket prices are included in the total.

  • Lead Pages: Send lead events (generate_lead in GTM and Lead in Meta) with no value, even when the page collects money.

  • Recurring gifts: Tracking codes run in your donor's browser, so they record a recurring gift once: when the donor signs up and makes the first payment. That event includes the first payment's amount and marks the gift as recurring. Later scheduled payments happen automatically without the donor on your page, so they don't send events to Meta, Google Analytics, or Google Tag Manager.

  • Future pledges: Tracked at signup, with today's charge as the value.

  • Post-conversion upgrades: Each accepted upgrade sends its own purchase event with its own transaction ID.

  • Not tracked: Bitcoin checkouts that redirect away from the page, and gifts entered in Finance > Terminal.

  • Amount, currency, and ID: Amounts are in U.S. dollars, the currency is always USD, and the transaction ID is the submission ID. If one checkout creates more than one submission, the IDs are joined with commas.

When a donor opens your page from a social media app, such as Facebook or Instagram, they may be asked to open it in their phone's browser before they pay. Analytics tools may then count them as a new visitor.

Test Your Setup

To test your tracking codes:

  1. Open your live Action Page, not the Page Builder preview, in a private browser window with ad blockers turned off.

  2. Open your testing tools, such as Google Tag Assistant or GA4 DebugView, GTM Preview, and the Meta Pixel Helper browser extension.

  3. Confirm that a page view appears in each tool.

  4. Make a small real donation, or submit a Lead Page signup.

  5. Confirm that the donation or lead events appear in each tool.

Was this helpful?