---
name: configure-aggregated-event-measurement
description: >-
  Configures the post-iOS14.5/ATT measurement protocol Meta uses for opted-out iOS users, where only the
  single highest-priority event per person per domain counts. Covers verifying the domain in Business
  Manager - DNS TXT, HTML meta-tag, or uploaded HTML file, all HUMAN STEPs - then ranking up to 8 conversion
  events per domain in the Aggregated Event Measurement priority list. Because only one event counts per
  opted-out user, the ranking is a business call: map Purchase or Lead to priority 1 so the revenue-defining
  event wins, then order the rest down-funnel to up-funnel. Covers subdomain handling - each verified
  subdomain gets its own independent 8-event configuration - and the trap that reordering the priority list
  triggers a Meta-enforced ~72-hour pause. Reach for it once standard events exist and campaigns are about
  to optimize for conversions on iOS. It ends at a verified domain with 8 prioritized events - the events
  themselves are defined in set-up-pixel-and-standard-events.
---
# Configure Aggregated Event Measurement (AEM) and Domain Verification

## Purpose
App Tracking Transparency made most iOS users individually untrackable without explicit opt-in.
Aggregated Event Measurement is Meta's privacy-safe substitute: a domain is verified as owned, up
to 8 conversion events are configured for it in priority order, and for any opted-out iOS user
only the single highest-priority event they trigger gets counted at all. Domain verification and
the 8-event priority list are the entire configuration surface, get the ranking wrong and the
event that actually matters (Purchase, Lead) can lose the "only one counts" contest to something
upper-funnel.

## When to run
- A domain serving conversion campaigns hasn't been verified in Business Manager yet.
- iOS conversion volume/reporting looks thin relative to Android despite comparable traffic, the classic AEM misconfiguration symptom.
- A new conversion event needs to be added or reprioritized in the 8-event list (e.g., a new
  product line's Purchase-equivalent event).
- Multiple subdomains serve conversions and only the root domain has been configured.

## When NOT to run
- The domain is already verified and the 8 events already reflect current business priority, nothing to do; re-check only if priorities have genuinely changed.
- The issue is event definition or parameters, not priority ranking →
  `set-up-pixel-and-standard-events`.
- The issue is which attribution window credits the event, not whether it's counted at all for
  opted-out users → `configure-attribution-settings`.

## Prerequisites
- Standard or custom events already firing (`set-up-pixel-and-standard-events`), AEM ranks
  events that must already exist.
- Admin access to the domain's DNS or web root (for verification) and to Business Manager's
  domain and Events Manager settings.
- Internal agreement on which event is the true top priority (usually Purchase or Lead) before
  touching the ranking, this is a business decision, not a technical default.

## Procedure
1. **Confirm the pixel-domain pairing.** `mads_list_pixels` to identify which pixel serves the
   domain being configured, AEM is scoped per domain but tied to that domain's pixel(s).
2. **Verify the domain.** HUMAN STEP: in Business Manager > Brand Safety > Domains, add the domain
   and verify by one of three methods, DNS TXT record (via the registrar, propagation up to
   ~24-48h), HTML meta-tag (paste into the site's `<head>`), or HTML file upload (host the given
   file at the domain root). Confirm status shows Verified before continuing.
3. **Open the AEM configuration for the domain.** HUMAN STEP: Events Manager > pixel > Aggregated
   Event Measurement shows the 8-slot priority list for that verified domain.
4. **List every event worth counting for opted-out iOS users**, up to 8: typically Purchase,
   Lead, CompleteRegistration, AddPaymentInfo, InitiateCheckout, AddToCart, Subscribe, ViewContent, trim to the account's actual funnel; don't pad to 8 for its own sake.
5. **Rank by true business priority, not funnel order.** Priority 1 is the single event Meta
   counts for an opted-out iOS user who takes multiple actions, map Purchase (e-commerce) or Lead
   (lead-gen) to priority 1 so the revenue-defining event wins.
6. **Order the remainder down-funnel to up-funnel** (e.g., 2 AddPaymentInfo, 3 InitiateCheckout,
   4 AddToCart, 5 ViewContent), so a next-most-valuable action is still captured if priority 1
   doesn't fire.
7. **Save deliberately, not experimentally.** Reordering later triggers Meta's ~72-hour processing
   pause on campaigns optimizing for the reshuffled events, during which delivery can degrade, confirm the order is final before submitting.
8. **Repeat per subdomain.** IF conversions happen on more than one verified subdomain (e.g.,
   `shop.example.com` alongside `example.com`) THEN configure each subdomain's own independent
   8-event list, verification and priority don't inherit from the root domain.
9. **Confirm post-save.** HUMAN STEP: revisit the configuration screen after saving to confirm the
   order persisted, and note the change date so a later dip can be checked against the ~72-hour
   pause window rather than misdiagnosed as something else.

## Decision rules
- IF the domain shows unverified THEN nothing else in this skill functions, fix verification
  first, every time.
- IF the account is e-commerce THEN Purchase is priority 1 by default; deviate only with a
  specific stated reason.
- IF the account is lead-gen THEN Lead (or the CAPI qualified-lead event, if that's what campaigns
  actually optimize for) is priority 1.
- IF fewer than 8 meaningful events exist THEN configure only the real ones, an empty or filler
  slot is not a gain.
- IF a reorder is being considered for a minor reason THEN weigh it against the ~72-hour pause it
  triggers, batch multiple changes into one reorder rather than reordering repeatedly.
- IF conversions span subdomains THEN verify and configure each one, a root-only setup silently
  leaves subdomain conversions unmeasured for opted-out iOS users.
- **Done means:** the domain shows Verified, up to 8 real conversion events are ranked with the
  true top business priority in slot 1, and every conversion-bearing subdomain has its own
  configured list.

## Common failure modes
- Never verifying the domain and assuming AEM "just works" because the pixel fires, without
  verification, opted-out iOS measurement is effectively blind.
- Priority 1 given to an upper-funnel event (ViewContent) out of habit, starving Purchase/Lead of
  the guaranteed-counted slot.
- Reordering the priority list casually or frequently, eating repeated ~72-hour pauses and never
  letting delivery stabilize.
- Configuring only the root domain when checkout or forms actually live on a subdomain.
- Padding the list to 8 with low-value events instead of leaving slots unused when the funnel
  doesn't have that many meaningful steps.
- Reordering AEM the same week as an unrelated campaign change, making it impossible to tell
  which change caused a delivery dip.

## Related skills
- Prerequisite: `set-up-pixel-and-standard-events` (the events being ranked must already exist
  and fire correctly).
- Related: `implement-conversions-api` (CAPI events can also be AEM-ranked and improve opted-out
  iOS coverage since they don't depend on the browser).
- Interacts with: `configure-attribution-settings` (AEM decides whether an opted-out iOS event
  counts at all; attribution windows decide the credit window once it does).
