Google Analytics 4
Learn how to integrate givetly with Google Analytics 4.
Integrate givetly with Google Analytics 4 via Google Tag Manager to track events on Checkout modals.
Found a mistake? Missing topic? Hard to read? Inform us
Implementation Steps
Prerequisites
- Administrative access to your organization’s Google Tag Manager account or access to the container on your site.
- Administrative access to your Google Analytics account or access to the property on your site.
- Follow our guides for linking givetly to Google Tag Manager for the Checkout modal.
Step 1. Get your Google Analytics Measurement ID
- Log in to Google Analytics.
- In the navigation menu, select Admin.
- Select your account and property.
- Under property options, select Data Streams.
- Choose your website’s data stream.
- Copy the Measurement ID and save it.
Step 2. Add your Measurement ID to the givetly GA4 Configuration tag in Google Tag Manager
Use the Measurement ID from Google Analytics in your givetly Google Analytics 4 Measurement ID variable in Google Tag Manager:
- Log in to Google Tag Manager.
- Select your site’s container.
- Select Variables in the left sidebar.
- Choose givetly Google Analytics 4 Measurement ID.
- Edit the tag using the pencil icon.
- Insert the Measurement ID into the Value field.
- Save your changes.
Step 3. Review Tags, Variables, and Triggers
Review the pre-configured setup included in the givetly container template for Google Tag Manager:
Tags
- givetly Donation (purchase event): Passes data to the
purchase
event in GA4. - givetly Checkout Open and Checkout Close: Tracks when Checkout is opened or closed, aiding in understanding supporter interaction.
While the givetly Checkout Open tag triggers on page load, the givetly Checkout Close tag does not trigger when a page is closed.
Variables
Includes non-personally identifiable variables by default for analytics data enrichment:
- Each tag contains a SupporterID user property, which is the unique identifier for a supporter in givetly.
The checkoutOpen
and checkoutClose
events may lack some parameters
compared to donationComplete
, as some values appear post-conversion.
Triggers
The table below shows how events sent to Google Tag Manager correlate with triggers and tags:
Event | Trigger | Tag fired |
---|---|---|
donationComplete | givetly Donation Complete | givetly Donation |
checkoutOpen | givetly Checkout Open | givetly Checkout Open |
checkoutClose | givetly Checkout Close | givetly Checkout Close |
Step 4. Publish your Configuration
When configuration is complete, publish your changes:
- Select Submit in the Tag Manager dashboard’s top right.
- Name your workspace version, e.g., “givetly GA4 configuration.”
- Optionally, add a workspace description.
- Click Publish.
Step 5. Test your Configuration
Verify your setup using the Realtime report in Google Analytics:
- Enable Test mode tracking in Analytics tools.
- Use test mode to make a donation on your site.
- After donation, check the Realtime report for
donationComplete
andcheckoutOpen
events.
Should the tags not appear, review your setup per this guide or use Google Tag Manager’s preview mode to check trigger functionality.