Skip to main content
Connect your Google Tag Manager container to WeGive, then configure triggers and variables to send checkout events to your reporting destinations.

Connect and configure

  1. Create or select a web GTM container. For Google Analytics reporting, create/select your GA4 property and configure its Google tag in GTM.
  2. In WeGive’s Integrations area, open Google Tag Manager Setup, enter Google Tag Manager Container ID (for example GTM-ABC1234), and save.
  3. In GTM, create a Custom Event trigger for the exact WeGive event you need, then Data Layer Variables for its fields. Connect those variables to your destination tag and publish through your organization’s normal GTM process.
givingDetails reports advancement from the Giving step, and donationConfirmed reports donation-completion continuations. value.frequency describes gift frequency; value.coverFees indicates fee coverage. Consult the shared catalog for portal/layout availability and exact units: donationConfirmed.value.amount is cents, while value.amount_dollars and ecommerce value are major currency units. Do not assume a funnel event’s value.amount has the same units as a conversion. Use an exact Custom Event trigger rather than a broad substring match when similar names could collide. Choose one signal per intended conversion. Counting both purchase and donationSuccess as independent successful gifts duplicates revenue. A recurring-plan creation is not necessarily an immediate payment. The data layer also receives context updates without an event key; a push count or array position is not a checkout milestone.

Native data layer and custom interactions

In GTM’s Variables area, create a Data Layer Variable (Version 2) for each field your tags use, such as wegive.checkout_session_uuid and wegive.frequency. Give each variable a descriptive name, then select it in your destination tag’s field mapping. window.dataLayer is a message array; window.dataLayer.wegive is not the current context. See Google’s data-layer documentation. Use a Custom HTML tag that runs inside the checkout window to install the following listener. When pasting into a Custom HTML tag, wrap the JavaScript in script tags. Configure it to install once; its guard also prevents duplicate installation. Delegation observes fields mounted after the tag runs.
Create a Custom Event trigger for custom_mailing_address_edit. In the tag triggered by that event, map your Data Layer Variables for session UUID and frequency to the destination’s fields. The example pushes just an event; GTM reads the current context already published by WeGive. It does not require another WeGive accessor or a search through old data-layer entries. Expanded sharing makes donor variables available separately, but this example sends no contact values itself. Your event name, rules, and mappings belong to you. Observe native blur in document capture to read current donor values; custom selectors and hosted fields use the paths in the hook reference.

Optional Google identity

In WeGive select Donor sharing → Expanded donor details, then click Save at the bottom of the integration settings form. In GTM create a Version 2 Data Layer Variable named DLV - WeGive Google identity, with Data Layer Variable Name wegive_user_data. Create a Custom JavaScript variable returning that value:
The double braces are GTM variable references, not browser JavaScript to paste into the console. Select this Custom JavaScript variable as the Code data source of a User-Provided Data variable. For GA4, enable the required property feature and connect that variable through the supported user_data parameter following Google’s setup instructions. Google Ads has its own enhanced-conversions configuration. Publishing the WeGive object alone does not enable either destination. Use that supported identity route rather than mapping raw contact fields into ordinary Analytics parameters. Off and Existing fields only do not populate wegive_user_data. Review the sharing contract for sharing settings, defaults, partial values, and mixed integrations.

Preview and diagnose

Open GTM Preview against the checkout’s actual URL. Inspect the data-layer event and current variables, trigger match, tag execution, and destination receipt separately. Inspect the checkout frame for embedded flows. Verify UUID availability, sharing settings, pending payments, and deferred recurring plans. A GTM event does not prove destination delivery. See Setup requirements for the validation checklist.