Tracking Codes for Action Pages
Learn how to set up Google Analytics, GTM, Meta Pixel, X Pixel, and UTM parameters to track donations, optimize ad performance, and improve campaign attribution on your Anedot Action Pages.
Whether you're looking to track supporter behavior, monitor conversions, or improve your ad targeting, integrating analytics tools with your Anedot Action Pages is a powerful way to gain insight and drive results. This article breaks down how to configure Google Analytics (GA4), Google Tag Manager (GTM), Meta Pixel (including Conversions API), X Pixel (formerly Twitter), and UTM parameters—step by step. Whether you're new to analytics or looking to refine your setup, this guide will help you capture the right data, improve attribution accuracy, and make smarter marketing decisions.
Tracking Codes can be applied to Donation, Lead, and Event Pages.
To apply Tracking Codes to a Donation or Lead Page, access the Settings > General > Tracking Codes tab within the Page Builder.
To apply Tracking Codes to an Event Page, access the Settings > Analytics tab within the Page Builder.
Table of Contents
- Google Analytics (GA4)
- Google Tag Manager (GTM)
- UTM Parameters for Campaign Tracking
- Meta (Facebook) Pixel
- X (Twitter) Pixel
Google Analytics (GA4)
Setting up Google Analytics 4 (GA4) on your Anedot Action Page allows you to track how visitors engage with your page, where they come from, and when they have completed their submission. This data helps you measure campaign performance, optimize conversion rates, and make informed marketing decisions.
Tracked Events
Event | Trigger | Data Sent | Description |
page_view |
Page load | Default GA4 data | Captures every visit to your Action Page |
purchase |
Form submission (with eCommerce enabled) | value , currency |
Captures a completed donation |
Tips & Best Practices
-
Use GA4 + GTM together for more robust tracking (browser + custom tags).
-
Use UTM parameters on Action Page links to track campaign attribution
- The
Purchase
event is only sent when eCommerce is enabled. -
If you’re using a Callback URL instead of the default Anedot receipt page, the GA4
purchase
event won’t trigger. Use GTM to manually trigger it using the dataLayer push or a Page View trigger on your callback page. -
Anedot automatically pushes donation value to the dataLayer for custom GA4 or ad tracking setups.
Setup Steps
1. Log in to Google Analytics
- Create or access a GA4 Property.
2. Copy the Measurement ID
- Navigate to:
Admin > Data Streams > Web > Measurement ID
3. Add Measurement ID to Anedot
- Go to:
- Donation + Lead Page Builder: Settings > General > Tracking Codes
- Event Page Builder: Settings > Analytics
- Paste your GA4 Measurement ID.
- Click Publish.
4. Enable eCommerce (Optional)
- Check:
"Send eCommerce events to Google"
- This sends a GA4
purchase
Google Tag Manager (GTM)
Setting up Google Tag Manager (GTM) on your Anedot Action Page allows you to manage and deploy marketing and analytics tags without modifying code. GTM enables you to fire tags on confirmation events—helping you track conversions, send data to platforms like Google Analytics, and improve campaign attribution and performance analysis.
Setup Steps
1. Log in to GTM
Log in at tagmanager.google.com using your Google account.
2. Copy the Container ID
-
Navigate to: Google Tag Manager Dashboard > Workspace
-
Your Container ID (e.g.,
GTM-XXXXXXX
) is located in the top-right corner of the screen.
3. Add to Anedot
-
Go to:
-
Donation + Lead Page Builder: Settings > General > Tracking Codes
- Event Page Builder: Settings > Analytics
-
-
Paste your Container ID into the GTM field
-
Click Publish
4. Configure Triggers in GTM
- Page View Trigger (for
/receipt
)
Used for most ad platforms (like Google Ads) to track conversions.- Go to Triggers > New
- Click Trigger Configuration
- Select DOM Ready
- Under This trigger fires on, select: Some DOM Ready Events
- Condition:
Page Path
→equals
→/receipt
- Name your trigger (e.g., Receipt DOM Ready)
- Click Save
- Custom Event Trigger (for Ecommerce Event)
Used to trackpurchase
or other eCommerce events when GA4 eCommerce tracking is not enabled in Anedot.- Go to Triggers > New
- Click Trigger Configuration
- Select Custom Event
- Set Event Name to:
google_analytics_ecommerce_transaction
- Name your trigger (e.g., GA Ecommerce Event)
- Click Save
5. Configure Tags in GTM
- Google Ads Conversion Tag
Tracks successful submissions for Google Ads reporting.- In GTM, go to Tags > New
- Click Tag Configuration → choose Google Ads Conversion Tracking
- Enter your Conversion ID and Conversion Label
- (Optional) Set the Conversion Value:
- Use a constant value (e.g.,
50
) - Or reference a variable that pulls from
.ap-confirmation--total-amount
ordataLayer
- Use a constant value (e.g.,
- Assign a Trigger
- Click Save
- GA4 Event Tag (Optional — only if GA4 is not enabled in Anedot)
If GA4 is already enabled in Anedot and “Send eCommerce events to Google” is checked, this tag may duplicate tracking. Use only if GA4 is not enabled via Anedot.- In GTM, go to Tags > New
- Click Tag Configuration → choose GA4 Event
- Enter your GA4 Measurement ID
- Set Event Name to:
purchase
- Add Event Parameters (recommended):
value
→ Variable referencing donation amountcurrency
→ Set to"USD"
or applicable
- Assign a Trigger
- Click Save
6. Access Donation Value
- Option 1: Scrape from DOM
- Use the class:
.ap-confirmation--total-amount
to pull the value from the receipt page
- Use the class:
- Option 2: Use the
dataLayer
- The donation value is also pushed to the dataLayer and can be retrieved in GTM using JavaScript or predefined variables
Tips:
-
Use GTM and GA4 together for robust browser + server tracking
-
If using a Callback URL on your Action Page, standard tags tied to
/receipt
may not fire. In this case:-
You can trigger your Page View Tag using the Callback URL path instead of
/receipt
. -
Additionally, we recommend adding your GA4 Measurement ID directly in Anedot to ensure ecommerce tracking fires reliably (serves as redundancy if tags fail).
-
UTM Parameters for Campaign Tracking
UTM parameters are custom tags added to the end of your URL to help you identify the origin, method, and purpose of incoming traffic to your Action Pages. They are critical for campaign attribution and audience insights—especially when using Google Analytics 4 (GA4) and Google Tag Manager (GTM).
Why Use UTM Parameters?
Using UTM parameters allows you to:
-
Attribute donations to specific campaigns or ads
-
Understand which platforms (e.g., Facebook, email) drive the most traffic
-
A/B test ad variations and measure which performs better
-
View campaign-level and ad-level performance in GA4
-
Enable advanced logic in GTM (e.g., only fire a tag for a specific campaign)
When to Use UTM Parameters
Use UTM-tagged URLs any time you're sharing a link to your Action Page, such as:
-
Paid ad campaigns (Google Ads, Meta, X)
-
Email newsletters or automations
-
SMS and push campaigns
-
Social media posts or stories
-
Affiliate or partner links
-
QR codes on printed materials
Setup Steps
-
Use a tool like UTMMaker.com to create URLs
-
Add the URL to Action Page links
Example:
https://secure.anedot.com/account-url-slug/page-slug?utm_source=facebook&utm_medium=paid&utm_campaign=year_end_appeal
Supported Parameters
Parameter | Description |
---|---|
utm_source | Traffic source (e.g., facebook) |
utm_medium | Channel (e.g., email, social, cpc) |
utm_campaign | Campaign name (e.g., fall_fundraiser) |
utm_content | Ad/test variant (e.g., button_a, image_b) |
utm_term | Search term (used in paid keyword campaigns) |
View Campaign Data
- UTM data is automatically picked up by GA4
- Available in:
- GA4 Acquisition reports (
source
,medium
,campaign
) - GTM’s dataLayer (for use in tag logic or variables)
- GA4 Acquisition reports (
- No setup is required in Anedot to track UTM parameters—they are captured from the URL when a supporter loads the page
Meta (Facebook) Pixel
Setting up a Meta Pixel on your Anedot Action Page allows you to track supporter interactions and improve ad performance across Facebook and Instagram. The Pixel tracks key events like donations and form submissions—helping you measure results, attribute conversions, and build custom or retargeting audiences in Meta Ads Manager.
Anedot Tracking Options
When setting up Meta tracking, Anedot provides three configuration options:
Option | What it does | When to use it |
---|---|---|
Meta Pixel ID | Enables standard browser-based tracking for events like PageView , Lead , and Purchase . |
Use for basic ad reporting and remarketing. |
Meta Access Token | Enables Conversions API (CAPI) for server-side event tracking. Events are sent securely from Anedot’s servers. | Strongly recommended to improve tracking reliability and attribution (See Best Practices provided by Meta). |
Hide Client-Side Pixel | Disables the browser pixel, sending only server-side events via CAPI. | Use only in advanced setups with strict privacy needs or custom attribution logic. |
Note: Both the Pixel ID and Access Token must be added in Anedot to enable Conversions API.
Best Practice: Use Pixel ID + Access Token Together
Meta recommends enabling both browser and server-side tracking to ensure:
-
More reliable events, even with ad blockers or privacy settings
-
Better attribution, especially for iOS or restricted browsers
-
Event deduplication, avoiding duplicate conversion data
-
Improved optimization, boosting Meta Ads delivery and performance
When to Use "Hide Client-Side Pixel"
Only enable Hide Client-Side Pixel if your strategy:
-
Requires server-side-only tracking (e.g., custom attribution workflows)
-
Needs to meet strict privacy or consent policies
-
Intentionally avoids Meta’s browser pixel and deduplication logic
Tip: For most users, we recommend leaving the browser pixel active and using both the Pixel ID and Access Token together for complete, reliable tracking.
Tracked Events
Meta Event | Trigger | Extra Data |
---|---|---|
PageView |
Page load | — |
Lead |
Form submitted | — |
Purchase |
Donation complete | currency , value |
Tip: Use a Custom Domain for better attribution accuracy. Anedot provides this for free upon request.
Setup Steps
-
Retrieve Meta Pixel ID and Access Token from Meta Events Manager
-
Go to https://eventsmanager.facebook.com and log in with your Meta Business account. (Requires Admin access to Meta Business Manager)
-
Select Your Business Account.
-
In the left sidebar, click Data Sources > Pixels.
-
Copy the Pixel ID.
-
Your Pixel ID is listed under the name of the Pixel.
-
It is a 15–16 digit number (e.g., 123456789012345).
- (Optional) Generate Access Token to include Meta Conversions API tracking
- Go to Events Manager > Data Sources > Pixels > Settings
- Click Generate Access Token.
- Copy the token provided and store it securely (Meta only shows it once).
-
-
Add to Anedot
- Go to:
-
Donation + Lead Page Builder: Settings > General > Tracking Codes
- Event Page Builder: Settings > Analytics
-
- Paste your Pixel ID.
- (Optional) Paste the Access Token.
- Click Publish.
- Go to:
X (Twitter) Pixel
Adding the X Pixel to your Anedot Action Page allows you to track and measure the effectiveness of your ad campaigns on the X (formerly Twitter) platform. By capturing key conversion events—like donations or signups—you can attribute results to your X Ads, build retargeting audiences, and optimize performance based on real supporter actions. This data helps you better understand which campaigns drive engagement and allows for more efficient ad spend and targeting strategy.
Tracked Events
Event Name | Trigger | Data Sent | Description |
PageView |
On page load | None | Tracks that a supporter viewed the page. Useful for retargeting and ad reach. |
Purchase |
On successful submission | value , currency |
Captures a completed donation or transaction with monetary value for conversions. |
Notes:
- The
Purchase
event only fires when the default Anedot receipt page is shown.
If using a Callback URL, this event will not trigger automatically.
Use Google Tag Manager (GTM) to manually fire thePurchase
event on the callback page. (See instructions here)
value
is automatically sent on Anedot’s default receipt page using the.ap-confirmation--total-amount
element.
- If using a Callback URL, you must pass the donation value manually via GTM (e.g., from URL parameters or the dataLayer).
- These events can be used for conversion tracking, audience optimization, and campaign reporting within the X Ads platform.
Setup Steps
1. Log in to X Ads Manager
- Go to ads.twitter.com and sign in using your X (Twitter) account credentials.
2. Navigate to Events Manager
- In the top navigation bar, select Tools > Events Manager.
3. Locate Your Pixel
- Under the Pixels section, find the name of your Pixel. Your Pixel ID will be displayed below the name.
4. Copy the Pixel ID
- The Pixel ID is a string of numbers (e.g., 12345678).
5. Add to Anedot
- Go to:
- Donation + Lead Page Builder: Settings > General > Tracking Codes
- Event Page Builder: Settings > Analytics
- Paste Pixel ID.
- Click Publish.
Trigger the X Pixel Purchase Event with GTM
If your Action Page redirects to a custom receipt page (Callback URL), X Pixel’s Purchase
event won’t fire automatically. Use the steps below to use GTM to manually trigger the event on your custom thank-you page.
1. Log in to Google Tag Manager
- Go to tagmanager.google.com and log in with your Google account.
2. Create the Trigger
- Navigate to Triggers > New
- Name the trigger (e.g.,
Callback Page Purchase
) - Click Trigger Configuration
- Select Page View
- Choose Some Page Views
- Set the condition:
Page Path
→equals
→
/thank-you
(or the path of your callback URL)
3. Create the Custom HTML Tag
- Navigate to Tags > New
- Name the tag (e.g.,
X Pixel - Purchase
) - Click Tag Configuration
- Choose Custom HTML
- Paste the X Pixel Purchase script:
<script> twq('event', 'Purchase', { value: , currency: 'USD' });</script>
- Under Triggering, select the trigger created in previous step.
4. Save and Publish
- Click Save
- Click Submit and Publish your container changes.