chromium/content/test/data/attribution_reporting/interop/event_level_trigger_priority.json

{
  "description": "Trigger priority for event-level reports",
  "api_config": {
    "rate_limit_max_attributions": "4"
  },
  "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"
              }
            }
          }
        ]
      },
      // Will result in an event-level report.
      {
        "timestamp": "1000",
        "registration_request": {
          "context_origin": "https://destination.test"
        },
        "responses": [
          {
            "url": "https://reporter.test/register-trigger",
            "response": {
              "Attribution-Reporting-Register-Trigger": {
                "event_trigger_data": [
                  {
                    "trigger_data": "1",
                    "priority": "1"
                  }
                ]
              }
            }
          }
        ]
      },
      // Will result in an event-level report but be replaced later.
      {
        "timestamp": "2000",
        "registration_request": {
          "context_origin": "https://destination.test"
        },
        "responses": [
          {
            "url": "https://reporter.test/register-trigger",
            "response": {
              "Attribution-Reporting-Register-Trigger": {
                "event_trigger_data": [
                  {
                    "trigger_data": "2",
                    "priority": "1"
                  }
                ]
              }
            }
          }
        ]
      },
      // Will result in an event-level report but be replaced later.
      {
        "timestamp": "3000",
        "registration_request": {
          "context_origin": "https://destination.test"
        },
        "responses": [
          {
            "url": "https://reporter.test/register-trigger",
            "response": {
              "Attribution-Reporting-Register-Trigger": {
                "event_trigger_data": [
                  {
                    "trigger_data": "3",
                    "priority": "1"
                  }
                ]
              }
            }
          }
        ]
      },
      // Will not result in an event-level report as the priority is not higher.
      {
        "timestamp": "4000",
        "registration_request": {
          "context_origin": "https://destination.test"
        },
        "responses": [
          {
            "url": "https://reporter.test/register-trigger",
            "debug_permission": true,
            "response": {
              "Attribution-Reporting-Register-Trigger": {
                "debug_reporting": true,
                "event_trigger_data": [
                  {
                    "trigger_data": "4",
                    "priority": "1"
                  }
                ]
              }
            }
          }
        ]
      },
      // Will replace the third event-level report as its trigger time is latest.
      {
        "timestamp": "5000",
        "registration_request": {
          "context_origin": "https://destination.test"
        },
        "responses": [
          {
            "url": "https://reporter.test/register-trigger",
            "response": {
              "Attribution-Reporting-Register-Trigger": {
                "event_trigger_data": [
                  {
                    "trigger_data": "5",
                    "priority": "2"
                  }
                ]
              }
            }
          }
        ]
      },
      // Will replace the second event-level report as its trigger time is latest
      // among the lowest priority reports.
      {
        "timestamp": "169201000",
        "registration_request": {
          "context_origin": "https://destination.test"
        },
        "responses": [
          {
            "url": "https://reporter.test/register-trigger",
            "response": {
              "Attribution-Reporting-Register-Trigger": {
                "event_trigger_data": [
                  {
                    "trigger_data": "6",
                    "priority": "3"
                  }
                ]
              }
            }
          }
        ]
      },
      // Will not result in an event-level report as it's in a different report
      // window.
      {
        "timestamp": "172801000",
        "registration_request": {
          "context_origin": "https://destination.test"
        },
        "responses": [
          {
            "url": "https://reporter.test/register-trigger",
            "debug_permission": true,
            "response": {
              "Attribution-Reporting-Register-Trigger": {
                "debug_reporting": true,
                "event_trigger_data": [
                  {
                    "trigger_data": "7",
                    "priority": "3"
                  }
                ]
              }
            }
          }
        ]
      }
    ]
  },
  "output": {
    "reports": [
      {
        "payload": [
          {
            "body": {
              "attribution_destination": "https://destination.test",
              "randomized_trigger_rate": 0.0024263,
              "scheduled_report_time": "172800",
              "source_event_id": "123",
              "source_type": "navigation",
              "trigger_data": "4"
            },
            "type": "trigger-event-low-priority"
          }
        ],
        "report_time": "4000",
        "report_url": "https://reporter.test/.well-known/attribution-reporting/debug/verbose"
      },
      {
        "payload": {
          "attribution_destination": "https://destination.test",
          "randomized_trigger_rate": 0.0024263,
          "scheduled_report_time": "172800",
          "source_event_id": "123",
          "source_type": "navigation",
          "trigger_data": "1"
        },
        "report_url": "https://reporter.test/.well-known/attribution-reporting/report-event-attribution",
        "report_time": "172800000"
      },
      {
        "payload": {
          "attribution_destination": "https://destination.test",
          "randomized_trigger_rate": 0.0024263,
          "scheduled_report_time": "172800",
          "source_event_id": "123",
          "source_type": "navigation",
          "trigger_data": "5"
        },
        "report_url": "https://reporter.test/.well-known/attribution-reporting/report-event-attribution",
        "report_time": "172800000"
      },
      {
        "payload": {
          "attribution_destination": "https://destination.test",
          "randomized_trigger_rate": 0.0024263,
          "scheduled_report_time": "172800",
          "source_event_id": "123",
          "source_type": "navigation",
          "trigger_data": "6"
        },
        "report_url": "https://reporter.test/.well-known/attribution-reporting/report-event-attribution",
        "report_time": "172800000"
      },
      {
        "payload": [
          {
            "body": {
              "attribution_destination": "https://destination.test",
              "randomized_trigger_rate": 0.0024263,
              "scheduled_report_time": "604800",
              "source_event_id": "123",
              "source_type": "navigation",
              "trigger_data": "7"
            },
            "type": "trigger-event-excessive-reports"
          }
        ],
        "report_time": "172801000",
        "report_url": "https://reporter.test/.well-known/attribution-reporting/debug/verbose"
      }
    ]
  }
}