blob: f3cfc25dc584ac9d2586cf2b355cbbbbcecdcce0 [file] [log] [blame]
{
"description": "Max source registration reporting endpoints per rate limit window",
"api_config": {
"rate_limit_max_source_registration_reporting_origins": "1"
},
"input": {
"sources": [
{
"timestamp": "1643235573000",
"registration_request": {
"source_origin": "https://example.source1.test",
"attribution_src_url": "https://reporter1.test/register-source",
"source_type": "navigation"
},
"responses": [{
"url": "https://reporter1.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://example.destination1.test",
"source_event_id": "111"
}
}
}]
},
// Should be registered as the source site is different.
{
"timestamp": "1643235574000",
"registration_request": {
"source_origin": "https://source2.test",
"attribution_src_url": "https://reporter2.test/register-source",
"source_type": "navigation"
},
"responses": [{
"url": "https://reporter2.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://destination1.test",
"source_event_id": "222"
}
}
}]
},
// Should be dropped due to the unattributed reporting origin limit.
{
"timestamp": "1643235575000",
"registration_request": {
"source_origin": "https://source1.test",
"attribution_src_url": "https://reporter2.test/register-source",
"source_type": "navigation"
},
"responses": [{
"url": "https://reporter2.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://destination1.test",
"source_event_id": "999"
}
}
}]
},
// Should be registered as the destination site is different.
{
"timestamp": "1643235576000",
"registration_request": {
"source_origin": "https://source1.test",
"attribution_src_url": "https://reporter2.test/register-source",
"source_type": "navigation"
},
"responses": [{
"url": "https://reporter2.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://destination2.test",
"source_event_id": "333"
}
}
}]
},
// Should be dropped due to the unattributed reporting origin limit.
{
"timestamp": "1643235577000",
"registration_request": {
"source_origin": "https://source1.test",
"attribution_src_url": "https://reporter3.test/register-source",
"source_type": "event"
},
"responses": [{
"url": "https://reporter3.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://destination1.test",
"source_event_id": "444"
}
}
}]
},
// Should be registered as the first source is outside the rate limit window.
{
"timestamp": "1645827573000",
"registration_request": {
"source_origin": "https://source1.test",
"attribution_src_url": "https://reporter3.test/register-source",
"source_type": "event"
},
"responses": [{
"url": "https://reporter3.test/register-source",
"response": {
"Attribution-Reporting-Register-Source": {
"destination": "https://destination1.test",
"source_event_id": "555"
}
}
}]
}
],
"triggers": [
// Should result in an event-level report.
{
"timestamp": "1643235583000",
"registration_request": {
"attribution_src_url": "https://reporter1.test/register-trigger",
"destination_origin": "https://destination1.test"
},
"responses": [{
"url": "https://reporter1.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "7"
}
]
}
}
}]
},
// Should result in an event-level report.
{
"timestamp": "1643235584000",
"registration_request": {
"attribution_src_url": "https://reporter2.test/register-trigger",
"destination_origin": "https://destination1.test"
},
"responses": [{
"url": "https://reporter2.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "6"
}
]
}
}
}]
},
// Should result in an event-level report.
{
"timestamp": "1643235585000",
"registration_request": {
"attribution_src_url": "https://reporter2.test/register-trigger",
"destination_origin": "https://destination2.test"
},
"responses": [{
"url": "https://reporter2.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "5"
}
]
}
}
}]
},
// Should not result in an event-level report due to no matching source.
{
"timestamp": "1643235585001",
"registration_request": {
"attribution_src_url": "https://reporter3.test/register-trigger",
"destination_origin": "https://destination1.test"
},
"responses": [{
"url": "https://reporter3.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "4"
}
]
}
}
}]
},
// Should result in an event-level report.
{
"timestamp": "1645827574000",
"registration_request": {
"attribution_src_url": "https://reporter3.test/register-trigger",
"destination_origin": "https://destination1.test"
},
"responses": [{
"url": "https://reporter3.test/register-trigger",
"response": {
"Attribution-Reporting-Register-Trigger": {
"event_trigger_data": [
{
"trigger_data": "3"
}
]
}
}
}]
}
]
},
"output": {
"event_level_results": [
{
"payload": {
"attribution_destination": "https://destination1.test",
"randomized_trigger_rate": 0.0024,
"scheduled_report_time": "1643411973",
"source_event_id": "111",
"source_type": "navigation",
"trigger_data": "7"
},
"report_url": "https://reporter1.test/.well-known/attribution-reporting/report-event-attribution",
"report_time": "1643411973000"
},
{
"payload": {
"attribution_destination": "https://destination1.test",
"randomized_trigger_rate": 0.0024,
"scheduled_report_time": "1643411974",
"source_event_id": "222",
"source_type": "navigation",
"trigger_data": "6"
},
"report_url": "https://reporter2.test/.well-known/attribution-reporting/report-event-attribution",
"report_time": "1643411974000"
},
{
"payload": {
"attribution_destination": "https://destination2.test",
"randomized_trigger_rate": 0.0024,
"scheduled_report_time": "1643411976",
"source_event_id": "333",
"source_type": "navigation",
"trigger_data": "5"
},
"report_url": "https://reporter2.test/.well-known/attribution-reporting/report-event-attribution",
"report_time": "1643411976000"
},
{
"payload": {
"attribution_destination": "https://destination1.test",
"randomized_trigger_rate": 0.0000025,
"scheduled_report_time": "1648423173",
"source_event_id": "555",
"source_type": "event",
"trigger_data": "1"
},
"report_url": "https://reporter3.test/.well-known/attribution-reporting/report-event-attribution",
"report_time": "1648423173000"
}
]
}
}