set-up-an-event-source · version 1.0.0 · for buyers.
When to use
- A person wants a campaign to optimize for purchases, leads or another conversion.
- A person asks whether their site is sending conversion events.
- Set up a campaign found a conversion goal in the brief.
Before you start
- You are connected to the buyer account and know the
advertiserId. - You know which conversions matter to the person and on which domains they happen.
- Someone who can change the advertiser’s website or app is available to install the tag.
Steps
- Call
get_statusand confirm the account and advertiser. - Call
searchwithkind: "measurement_source",filter.advertiserId, and the person’s words asquery(it matches the name,eventSourceIdand integration platform). Reuse an event source that already covers the advertiser. - Call
getwithkind: "measurement_source", the source’sid(it begins withevent:) and theadvertiserId. Read its event types, allowed domains and health:not_seen,receivingorneeds_attention. - If there is no suitable source, confirm the event types and allowed domains with the person,
then call
save_measurement_sourcewithsourceType: "event", a stableeventSourceIdof your choosing, a clearname, the exacteventTypes, andintegrationPlatformset to the system that will send the events (the person’s server, CRM or measurement partner). Or callopen_pagewithpage: "event_sources"and theadvertiserIdinargumentsso the person creates it there. - The person’s server sends events: the Event sources page shows a server-side snippet and a
Send test event button. From an agent,
log_eventsends events to the source; only send real events the person gives you, never invented ones. - Call
geton the source again until its health isreceiving. If it staysnot_seenor turnsneeds_attention, tell the person what the page reports. - If the person wants the campaign to optimize for the conversion, read the campaign first, then
call
save_campaignwithoptimizationGoals: an event goal whoseeventSourcesentry names the source’seventSourceId(its key, not theevent:id) and an event type the source sends (another type is refused withunsupportedEventTypes). Send the whole ranked list (primary first);nullremoves every goal. An unknown key is refused withunknownEventSourceIds. If the person goes ahead without tracking, leave the goal out and say the campaign won’t optimize for that outcome. - Tell the person what happens next: when the campaign sends a buy to a seller, Semicola registers
the source on that seller and the goal goes with the seller’s own id.
GET /api/v2/buyer/event-sources?advertiserId=…lists each seller insellerProvisioning:provisioned,needs_install,unsupportedorfailed. A goal whose source isn’tprovisionedon a seller is left out of that seller’s buy. Changing the goals on a live campaign sends them to its live buys too (optimizationGoalsCascadeResultin the response). - If the advertiser needs an integration Semicola does not offer yet, file it with
save_askandtype: "integration".
Guardrails
- Never send or ask for personal data about the people behind the events.
- Do not say events are arriving until the health says
receiving. - Missing conversions are unavailable, not zero.
- Never attach a guessed or unregistered
eventSourceIdto a goal. - Don’t promise attribution or conversion reporting: Semicola counts events and forwards them to sellers the source is provisioned on; each seller does its own optimization.
- Send test event sends test traffic (
testEventCode): validated, never counted as a conversion, and it doesn’t change the health. UsetestEventCodeonlog_eventonly for test events.
Done when
- The event source reports
receiving. - The campaign carries the event goal (or the person chose to go without one), and the brief states the conversion goal.
- The person knows which events are counted and where to check health later.