{
"description": "Aggregatable contributions creation",
"input": {
"registrations": [
{
"timestamp": "0",
"registration_request": {
"context_origin": "https://source.test",
"Attribution-Reporting-Eligible": "navigation-source"
},
"responses": [
{
"url": "https://reporter.test/register-source",
"debug_permission": true,
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://destination.test",
"source_event_id": "123",
"aggregation_keys": {
"a": "0x1",
"b": "0x2",
"c": "0x4",
"A": "0xffffffffffffffffffffffffffffffff"
},
"filter_data": {
"product": ["123", "456"],
"geo": []
}
}
}
}
]
},
{
"timestamp": "1000",
"registration_request": {
"context_origin": "https://destination.test"
},
"responses": [
{
"url": "https://reporter.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"aggregatable_trigger_data": [
{
"source_keys": ["a", "b", "c"],
"key_piece": "0x8",
"filters": {
"product": [],
"source_type": ["navigation"]
}
},
{
"source_keys": ["a", "b", "c"],
"key_piece": "0x8",
"filters": {
"geo": [],
"source_type": ["event"]
}
},
{
"source_keys": ["a", "b", "c'"],
"key_piece": "0x10",
"filters": {
"product": ["123"],
"geo": [],
"source_type": ["navigation"],
"campaign": ["example"]
}
},
{
"source_keys": ["A"],
"key_piece": "0xffffffffffffffffffffffffffffffff"
}
],
"aggregatable_values": {
"a": 123,
"b": 456,
"A": 999
}
}
}
}
]
},
{
"timestamp": "2000",
"registration_request": {
"context_origin": "https://destination.test"
},
"responses": [
{
"url": "https://reporter.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"aggregatable_trigger_data": [
{
"source_keys": ["a"],
"key_piece": "0x8",
"not_filters": {
"geo": [],
"source_type": ["event"]
}
},
{
"source_keys": ["a"],
"key_piece": "0x8",
"not_filters": {
"product": [],
"source_type": ["navigation"]
}
},
{
"source_keys": ["a"],
"key_piece": "0x10",
"not_filters": {
"product": [],
"geo": ["US"],
"source_type": ["event"],
"campaign": []
}
}
],
"aggregatable_values": {
"a": 321,
"b": 654
}
}
}
}
]
},
{
"timestamp": "3000",
"registration_request": {
"context_origin": "https://destination.test"
},
"responses": [
{
"url": "https://reporter.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"aggregatable_trigger_data": [
{
"source_keys": ["b", "d"],
"key_piece": "0x8",
"filters": {
"source_type": ["navigation"]
},
"not_filters": {
"product": ["123"]
}
},
{
"source_keys": ["b", "d"],
"key_piece": "0x8",
"filters": {
"source_type": ["event"]
},
"not_filters": {
"product": ["789"]
}
},
{
"source_keys": ["b", "d"],
"key_piece": "0x20",
"filters": {
"source_type": ["navigation"]
},
"not_filters": {
"product": ["789"]
}
}
],
"aggregatable_values": {
"a": 456,
"b": 789,
"d": 123
}
}
}
}
]
},
// Should not result in an aggregatable report due to no contributions.
{
"timestamp": "4000",
"registration_request": {
"context_origin": "https://destination.test"
},
"responses": [
{
"url": "https://reporter.test/register-trigger",
"debug_permission": true,
"response": {
"Attribution-Reporting-Register-Trigger": {
"aggregatable_values": {
"d": 987
},
"debug_reporting": true
}
}
}
]
},
// Should not result in an aggregatable report due to no contributions
// and verbose debug report is not created as debug_reporting is not set.
{
"timestamp": "5000",
"registration_request": {
"context_origin": "https://destination.test"
},
"responses": [
{
"url": "https://reporter.test/register-trigger",
"debug_permission": true,
"response": {
"Attribution-Reporting-Register-Trigger": {
"aggregatable_trigger_data": [
{
"source_keys": ["a"],
"key_piece": "0x1"
}
]
}
}
}
]
},
// Should result in an aggregatable report with the key pieces defined in
// the source.
{
"timestamp": "6000",
"registration_request": {
"context_origin": "https://destination.test"
},
"responses": [
{
"url": "https://reporter.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"aggregatable_values": {
"a": 666,
"A": 333
}
}
}
}
]
}
]
},
"output": {
"reports": [
{
"payload": [
{
"body": {
"attribution_destination": "https://destination.test",
"source_event_id": "123",
"source_site": "https://source.test"
},
"type": "trigger-aggregate-no-contributions"
}
],
"report_time": "4000",
"report_url": "https://reporter.test/.well-known/attribution-reporting/debug/verbose"
},
{
"payload": {
"aggregation_coordinator_origin": "https://coordinator.test",
"histograms": [
{
"id": "0",
"key": "0xffffffffffffffffffffffffffffffff",
"value": 999
},
{
"id": "0",
"key": "0x11",
"value": 123
},
{
"id": "0",
"key": "0x12",
"value": 456
}
],
"shared_info": {
"api": "attribution-reporting",
"attribution_destination": "https://destination.test",
"reporting_origin": "https://reporter.test",
"scheduled_report_time": "3601",
"version": "1.0"
}
},
"report_url": "https://reporter.test/.well-known/attribution-reporting/report-aggregate-attribution",
"report_time": "3601000"
},
{
"payload": {
"aggregation_coordinator_origin": "https://coordinator.test",
"histograms": [
{
"id": "0",
"key": "0x11",
"value": 321
},
{
"id": "0",
"key": "0x2",
"value": 654
}
],
"shared_info": {
"api": "attribution-reporting",
"attribution_destination": "https://destination.test",
"reporting_origin": "https://reporter.test",
"scheduled_report_time": "3602",
"version": "1.0"
}
},
"report_url": "https://reporter.test/.well-known/attribution-reporting/report-aggregate-attribution",
"report_time": "3602000"
},
{
"payload": {
"aggregation_coordinator_origin": "https://coordinator.test",
"histograms": [
{
"id": "0",
"key": "0x1",
"value": 456
},
{
"id": "0",
"key": "0x22",
"value": 789
}
],
"shared_info": {
"api": "attribution-reporting",
"attribution_destination": "https://destination.test",
"reporting_origin": "https://reporter.test",
"scheduled_report_time": "3603",
"version": "1.0"
}
},
"report_url": "https://reporter.test/.well-known/attribution-reporting/report-aggregate-attribution",
"report_time": "3603000"
},
{
"payload": {
"aggregation_coordinator_origin": "https://coordinator.test",
"histograms": [
{
"id": "0",
"key": "0xffffffffffffffffffffffffffffffff",
"value": 333
},
{
"id": "0",
"key": "0x1",
"value": 666
}
],
"shared_info": {
"api": "attribution-reporting",
"attribution_destination": "https://destination.test",
"reporting_origin": "https://reporter.test",
"scheduled_report_time": "3606",
"version": "1.0"
}
},
"report_time": "3606000",
"report_url": "https://reporter.test/.well-known/attribution-reporting/report-aggregate-attribution"
}
]
}
}