res.set(
"Attribution-Reporting-Register-Source",
JSON.stringify({
source_event_id: "412444888111012",
destination: "https://shop.example",
trigger_data: [0, 1, 2, 3, 4],
trigger_data_matching: "exact",
expiry: "604800",
priority: "100",
debug_key: "122939999",
event_report_window: "86400",
}),
);Attribution-Reporting-Register-Source header / notebook
Attribution-Reporting-Register-Source header
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
res.set(
"Attribution-Reporting-Register-Source",
JSON.stringify({
source_event_id: "412444888111012",
destination: "https://shop.example",
trigger_data: [0, 1, 2, 3, 4],
trigger_data_matching: "exact",
expiry: "604800",
priority: "100",
debug_key: "122939999",
event_report_window: "86400",
aggregation_keys: {
campaignCounts: "0x159",
geoValue: "0x5",
},
aggregatable_report_window: "86400",
}),
);