> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wegive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Common Checkout Data

> Session identifiers, gift context, attribution, and page data in GTM and Tealium.

WeGive publishes the same common checkout facts through each tag manager's native data layer. These common fields contain no donor contact information. [Optional donor fields](/external/onboarding/tracking/donor-sharing) are published separately.

| Interface | Read current common context |
| - | - |
| GTM | Create a Data Layer Variable for `wegive.checkout_session_uuid`, `wegive.amount`, or another path below. |
| Tealium | Read `window.utag_data.wegive_checkout_session_uuid`, `window.utag_data.wegive_amount`, or the corresponding flat key. Define these as UDO variables in Tealium for tag mappings. |

There is no `getTrackingContext` API or Meta browser donor view. Common data-layer context is published even without a GTM container. Context publication does not require a loaded SDK; Tealium fields require a configured account/profile. Treat WeGive-owned fields as read-only, and read again when handling an interaction instead of retaining an initial snapshot.

## Common fields

The table uses logical field names. GTM places them under `wegive`; Tealium prefixes scalar names with `wegive_`.

| Field | Type / meaning |
| - | - |
| `version` | Number, `1` |
| `page_name` | Current Vue route name, falling back to its path; string or null |
| `page_path` | Current route full path, including query string and hash; string or null |
| `page_language` | V2 only: active rendered language code (`en`, `es`, `fr`, `de`, `pt`, `nl`, `it`). No inferred region. Omitted in V1. |
| `checkout_session_uuid` | String or null; exact session-creation response UUID |
| `organization_id`, `organization_uuid`, `organization_name` | Organization ID, UUID and name; unavailable values null |
| `organization_brand_id` | Numeric brand ID or null; resolved checkout domain/session brand |
| `checkout_id`, `checkout_name` | Selected checkout ID and name, or null |
| `checkout_test_id` | Assigned A/B test ID or null; selected `checkout_id` identifies the variant |
| `campaign_id` | WeGive campaign ID or null; distinct from UTM campaign |
| `amount` | Current gift amount in major currency units, excluding covered fees, or null |
| `currency` | Uppercase currency code or null |
| `frequency` | `once` or the selected recurring frequency; null if recurring frequency unavailable |
| `designations` | Array of `{id, name, amount}`; allocation amounts in major currency units |
| `fee_covered`, `is_anonymous` | Boolean or null |
| `payment_type` | Selected payment/wallet type or null |
| `transaction_id`, `scheduled_donation_id` | Created record identifiers or null |
| `transaction_status` | Numeric authoritative response status or null |
| `correlation_id` | Transaction response reference string or null; no substitution with a session/plan ID |
| `utm` | Current-page URL attribution object |
| `retained_utm` | Retained attribution from V2's attribution helper or the V1 session response when available |

IDs follow WeGive's source ID type (number or string); UUIDs are strings. Each attribution object has `utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, `utm_content`, and `utm_id`, with string values or null. This interface does not set an attribution cookie. A/B assignment survives refresh only in the matching browser history entry for that organization, checkout and path; it is never inferred from a checkout's membership in a test.

## Lifecycle and page context

The UUID is null until session creation returns. It stays null after creation failure, and is available to scripts loaded later. Earlier events are neither delayed nor replayed to attach it. Unmounting or replacing checkout clears checkout-specific identity and donor context in WeGive's namespaces; stale responses cannot populate a replacement checkout. Organization metadata can remain available outside checkout. GTM authentication fields under `value` follow the selected donor-sharing mode's lifetime, described in the donor-sharing guide.

GTM context updates are messages without an `event` key. WeGive resets `wegive`, `wegive_donor`, and `wegive_user_data` to null before publishing replacement values so GTM's data model does not merge stale nested fields or array entries. Tealium updates the current object and removes stale WeGive-owned donor keys, preserving unrelated customer keys. Previously published data-layer messages and copies retained by other scripts cannot be erased by these resets.

Page context follows the checkout's Vue route. `page_name` is the route name, falling back to path; `page_path` includes query/hash. These are application route values, not checkout-step names or organization-specific labels. Route changes update context. GTM/Tealium page-view tracking operates separately from the standard checkout catalog; context updates do not themselves emit page views.

V2 exposes the active language at `wegive.page_language` in GTM and `utag_data.wegive_page_language` in Tealium. V2 GTM `content-view` and Tealium page-view payloads also carry `page_language`; initial Tealium page data is seeded before SDK loading. Language changes alone do not emit a page view. V1 supports English only and does not include a language field. Base codes such as `es` do not imply a region such as `es-US`.

Current gift context describes the editable checkout amount before covered fees. Conversion payloads describe the returned payment/plan total; use those fields for revenue. The `correlation_id` value is a transaction reference, not a promise about a receipt number or a Salesforce Opportunity lookup. Your organization owns that mapping.

If your organization also receives checkout-session webhooks, their `data.checkout_session.uuid` contains the same session UUID. You can use it to match server notifications with browser tracking. This is an optional use of the identifier; webhooks do not supply the UUID to the browser.

## GTM variables and raw JavaScript

`window.dataLayer` is an array of messages, not an object with a `checkout_session_uuid` property. In GTM, define Data Layer Variables using paths such as `wegive.checkout_session_uuid`; GTM reads its current data model when your event tag runs. See the [GTM guide](/external/onboarding/tracking/google-tag-manager).

For JavaScript outside GTM, the latest message containing WeGive's complete common namespace can be read as follows. Honor an explicit null reset; do not search past it for an older identity.

```javascript theme={null}
var checkoutContext = null;
var messages = window.dataLayer || [];
for (var i = messages.length - 1; i >= 0; i--) {
  var message = messages[i];
  if (message && Object.prototype.hasOwnProperty.call(message, 'wegive')) {
    checkoutContext = message.wegive;
    break;
  }
}
var sessionUuid = checkoutContext ? checkoutContext.checkout_session_uuid : null;
```

This reads only WeGive's common namespace; it is not a replacement for GTM's complete internal data model. The array may also contain GTM events, command arguments, and functions. Do not mutate previous messages or forward the entire history to a destination.

## Tealium variables

Read `window.utag_data || {}` at interaction time. Standard events pass the same common facts explicitly to `utag.link`; custom events must supply the context they need. Do not assume `utag.link` automatically merges all page data into its event object. See [Tealium's tracking functions](https://docs.tealium.com/platforms/javascript/api/tracking-functions/) and the [custom listener example](/external/onboarding/tracking/tealium).

| Common fact | Tealium key |
| - | - |
| Any scalar field | `wegive_<field>`, e.g. `wegive_checkout_session_uuid` |
| Designations | Aligned arrays `wegive_designation_id`, `wegive_designation_name`, `wegive_designation_amount` |
| Current UTM | `wegive_utm_utm_source`, `wegive_utm_utm_medium`, and the same pattern for the other UTM keys |
| Retained UTM | `wegive_retained_utm_utm_source`, with the same pattern for the other keys |

## Meta context and identifiers

The Pixel `setupEvent` includes non-contact `wegive_*` parameters where context is available. It is a setup event, not a browser conversion event.

Server CAPI `custom_data` includes `checkout_session_uuid`, `organization_id`, `organization_brand_id`, `checkout_id`, `checkout_test_id`, `designation_id`, `scheduled_donation_id`, `transaction_status`, and `correlation_id`. It uses the attribution-session lookup, including a recurring renewal's originating session. Missing session-dependent values are null. The donor-sharing setting affects server matching fields; it does not control these non-contact facts, event IDs, amount conventions, conversion eligibility, or retries.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.