You can easily connect Double to your Google Analytics (GA4) account using Google Tag Manager.
What you’ll need
A Google Tag Manager (GTM) container installed on your website
A Google Analytics 4 (GA4) property connected to that same GTM container
A Double embed snippet already added to your site
Step 1 - Enable the donation event from Double
Double automatically triggers a browser event when a donation is completed.
This event is called Double.donationCompleted, and it includes details such as the amount, currency, and transaction ID.
Add this script to your website (ideally right below your Double embed):
<script>
document.addEventListener("Double.donationCompleted", (e) => {
const d = e.detail.donation;
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: "donationCompleted",
value: d.amount,
currency: d.currency,
transaction_id: d.id,
});
});
</script>
Already added this for Google Ads?
You don’t need to add it again! The same event works for both Google Ads and Google Analytics - you’ll just add a new tag in GTM that listens to the same donationCompleted event.
Step 2 - Create a custom event trigger in Google Tag Manager
Go to your GTM workspace
Click Triggers → New → Trigger Configuration → Custom Event
In the Event name, enter:
donationCompleted
Choose All Custom Events (or add conditions if you prefer)
Save the trigger as Donation Completed
Step 3 - Create a GA4 event tag
Go to Tags → New → Tag Configuration
Select Google Analytics: GA4 Event
Choose your existing GA4 Configuration Tag
Set the Event name to:
donation_completed
(you can also use “purchase” if you want GA4 to treat it as a transaction)
Under Event Parameters, add:
value→ Data Layer Variablevaluecurrency→ Data Layer Variablecurrencytransaction_id→ Data Layer Variabletransaction_id
Set the Trigger to your Donation Completed trigger
Save and publish your changes
Step 4 - Test the Integration
Use Preview Mode in GTM to confirm:
A
donationCompletedevent appears in your data layerYour GA4 event tag fires successfully
Then make a test donation and verify in Google Analytics → Reports → Engagement → Events that you see donation_completed (or purchase) being tracked.
