How it works
You define an event source (a stream of conversions you send withlog_event) or an audience (a list of people you
sync with save_audience) once, for the advertiser. A seller account such as a
Meta ad account or a Snap ad account only understands its own objects: a Meta
dataset, a Snap Pixel, a TikTok pixel, a LinkedIn conversion rule, a Meta Custom
Audience. A mapping tells Apostra which of those objects is the same thing
as yours on that account.
There are two kinds of object on a seller account:
- Yours, once mapped. A pixel or list you map to one of your event sources or audiences works in every campaign that runs on that account.
- Seller-managed or unmapped. Objects that belong to one storefront, such as a Meta Instant Forms leads source, or any object you leave unmapped, stay specific to that storefront. They pass through unchanged and are usable in that storefront’s own campaigns. Do not map your event sources to seller-managed objects.
- Map. Save the mapping with
sellerAccountsonsave_event_sourceorsave_audience, or pick it on the Connections page. - Confirm. Apostra asks the seller account to confirm the object is there.
The mapping reads
pending, thensynced, typically within a minute. An audience also reports the seller’s own size and match rate. - Buy. When a media buy’s optimization goal names your event source, Apostra sends the seller the mapped platform object instead of your id.
Action needed if you name your own event sources in conversion goals. Map
each event source on every seller account you buy on. A media buy whose goal
names an event source with no mapping on that account fails before anything
reaches the seller. Goals that carry a raw platform pixel id, buys with no
event goal, and a Meta product’s explicit
pixelId behave as before.Find what is on each account
Open the Connections page for one connected account. It lists the pixels, datasets and audiences already there, and whether each is yours (Mapped to) or only on that storefront. See Open Media Partners. Over MCP, callopen_connections_page with a connectionId and accountId:
get with the connection, its inventory and
one account:
upstreamObjectId. That is
the value you pass as sellerId when you map. The account id (here 301) is
the accounts[].id from get({ "kind": "connection", "id": "992" }).
Map an event source
Save the event source withsellerAccounts. Each entry names the seller account
and the id of the object on it:
sellerId is null and status is pending until the seller account confirms
the object. While the Conversion events switch is off for that storefront on
the Connections page, the mapping stays pending with a
SELLER_DATA_SHARING_NOT_PERMITTED blocker and nothing is checked. Turn the
switch on and Apostra confirms the mapping within about an hour.
Event types must match
A destination that declares the event types it accepts must accept every type your source records. A LinkedIn conversion rule records one type, so it maps only to a source whoseeventTypes are all on that rule’s list. A source with no
eventTypes records every type, so it maps only to a destination that declares
none. Meta, Snap and TikTok datasets and pixels accept all types. A mismatch is
refused at save time with VALIDATION_ERROR on the entry’s sellerId. Narrow
the source’s eventTypes, or map a destination that accepts them.
Use the source in a campaign goal
Name the event source in an event goal. Use your ownevent_source_id, not the
platform’s id:
event_source_id. Seller-managed sources and a platform’s built-in events
are sent unchanged.
When a buy is refused
A media buy whose goal names an event source that cannot be used on that account fails before anything reaches the seller. A read of the media buy showserrorCode: "invalid_request", owned by you (buyer_input), and the failure
reason starts with one of the codes below. Fix the cause, then create a new media
buy.
A mapping that is still being confirmed is not a refusal: the buy is held and
sent once the mapping reads
synced. If a Meta product on the buy sets an
explicit pixelId that differs from the dataset you mapped, the buy is refused
for the conflict. Remove the explicit pixelId or map the same dataset.
The full list of blocker codes and what each media-buy state does is in
Measurement and incrementality.
Map an audience
Map an audience the same way. The audience must already exist: save its members first, then map it once it appears in the advertiser’s audience list:get({ "kind": "audience", "advertiserId": "42" }). An audience read takes
the advertiser, not an audience id, and returns every audience for it, 50 per
page (audienceOffset pages on).
get({ "kind": "audience", "advertiserId": "42" }), and find the audience by
audienceId; each of its sellerAccounts[] entries carries status, sellerId, and, once confirmed, the seller’s own size
and match in match:
match is null until the mapping is confirmed or when the seller reports
nothing. If the audience is not on the account, or the seller reports it
deleted, suspended or failed, the mapping reads SELLER_AUDIENCE_MISSING.
Check the id on the Connections page and map the right audience.
Unmap
To end a mapping, send the account withunmap: true instead of a sellerId.
This works the same on save_event_source and save_audience:
INVALID_STATE and names the media buys;
unmap once they have ended or been canceled. A later media buy on that account
that names the source fails as if it were never mapped.
Troubleshooting
Related
- Log events: send conversions to a registered event source.
- Measurement and incrementality: how a source reaches each seller account and every refusal code.
- Open Media Partners: the Connections page and its account inventory.
- V3 tool reference:
save_event_source,save_audience, and the connection inventory read.