Requestly
HTTP InterceptorPricingRequestly vs PostmanBlogDocsDownload

Home / HTTP Headers / Attribution-Reporting-Register-Source header

Attribution-Reporting-Register-Source header

Deprecated: This feature is no longer recommended. While some browsers might still support it, it could have been removed from web standards, be in the process of being discontinued, or maintained only for compatibility. Avoid using it and update existing code if possible; see the compatibility table at the bottom of this page for guidance. This feature may stop working at any time.

The HTTP Attribution-Reporting-Register-Source response header identifies a page feature as an attribution source. This header is part of a response to a request that contains the Attribution-Reporting-Eligible header. It supplies data the browser should save when a user engages with the attribution source. The details in this header also dictate the kinds of reports the browser can create. See the Attribution Reporting API for more details.

Note: If the calling site has not successfully completed the privacy sandbox enrollment process to include the Attribution Reporting API, the Attribution-Reporting-Register-Source header is disregarded, and attribution sources are not registered.

Header type Response header
CORS-safelisted response header No

Syntax

Attribution-Reporting-Register-Source: <json-string>

Directives

<json-string>

A JSON string containing data for generated reports, such as the trigger’s ID, priority, and deduplication values. The available fields are:

"aggregatable_trigger_data"

An array of objects, where each object defines an aggregation key to be applied to different source keys. Each object has the following properties:

"key_piece"

A hexadecimal value that represents a key.

"source_keys"

An array that holds one or more key values for the data.

"aggregatable_values"

An object containing properties where each property represents a value for a data point defined in "aggregatable_trigger_data". The property name matches a name defined in "source_keys", and its value can be any arbitrary value you need.

"debug_key" Optional

A numerical debug key. Set this to generate a debug report in addition to the associated attribution report.

"debug_reporting" Optional

A boolean value. If a debug_key is present, set this to true to indicate that the generated debug report should be verbose.

"filters" Optional

An object that contains custom data used to filter which triggers generate reports. See Filters for more details.

"event_trigger_data"

An object containing data about the trigger. The available sub-fields are:

"trigger_data"

A string that describes the trigger, often used to denote events like “user added item to shopping cart” or “user signed up to mailing list”. This value will be included in any generated event-level report, though it may be altered based on the attributed source’s "trigger_data_matching" field.

Note: The values used for each event and the number of elements in the array, are completely arbitrary and set by the developer. The array may include unused values, but values must be present for the browser to attribute them to the source when a trigger is registered.

"priority" Optional

A string representing a priority value for the attribution trigger. By default, triggers are linked to the most recently matched source. For both event-level and summary reports, assigning a higher priority number allows the trigger to match older sources. For example, a value of 2 will override the default value of 1. See Report priorities and limits for more information.

"deduplication_key" Optional

A string representing a unique key to prevent duplicate attributions, such as when a user adds the same item to a shopping cart multiple times. See Prevent duplication in reports for more information.

"filters" Optional

An object containing filters that apply selective filtering to set "trigger_data", "priority", and "deduplication_key". This filtering is based on the filter_data defined in a corresponding Attribution-Reporting-Register-Source header. See Filters for more information.

Examples

Registering a source for an event-level report

A Node.js server might set the Attribution-Reporting-Register-Source response header in the following way to instruct a browser to create an event-level report when a trigger is matched to a source:

res.set(
"Attribution-Reporting-Register-Source",
JSON.stringify({
source_event_id: "412444888111012",
destination: "https://shop.example",
trigger_data:,
trigger_data_matching: "exact",
expiry: "604800",
priority: "100",
debug_key: "122939999",
event_report_window: "86400",
}),
);

Registering a source for a summary report

To have the browser generate a summary report when a trigger corresponds to a source, you must include some additional fields, beyond those needed for event-level report creation.

res.set(
"Attribution-Reporting-Register-Source",
JSON.stringify({
source_event_id: "412444888111012",
destination: "https://shop.example",
trigger_data:,
trigger_data_matching: "exact",
expiry: "604800",
priority: "100",
debug_key: "122939999",
event_report_window: "86400",

code
Code
download
content_copy
expand_less
aggregation_keys: {
  campaignCounts: "0x159",
  geoValue: "0x5",
},
aggregatable_report_window: "86400",

}),
);

How to Modify Header using Requestly

Requestly is a powerful Chrome extension that allows you to modify HTTP headers, including the Attribution-Reporting-Register-Source header. This is useful when you want to test ad click or view attribution flows and verify how your application registers attribution sources during development or debugging. Steps to Modify the Attribution-Reporting-Register-Source Header:

  1. Install and open the Requestly Chrome extension. You can find it on the Chrome Web Store.
  2. Create a new rule: Click on “Create Rule” and choose “Modify Headers” from the list of available rule types.
  3. Add a new header modification:
    • Under “Action”, select “Add” or “Override”.
    • In the “Header Name” field, enter Attribution-Reporting-Register-Source.
    • In the “Header Value” field, enter your source registration configuration as a JSON string (for example, { “source_event_id”: “12345”, “destination”: “https://advertiser.com” }).
  4. Set the URL condition: Specify the URL or pattern where this header should apply (for example, https://your-website.com/\*).
  5. Save the rule.

Once configured, Requestly will inject the Attribution-Reporting-Register-Source header into all matching responses. This allows you to simulate attribution source registration and validate how the browser processes and stores attribution data.

You might need to modify the Attribution-Reporting-Register-Source header to test campaign tracking, validate Privacy Sandbox attribution flows, or debug conversion measurement setups without modifying your live server configuration. This helps ensure accurate reporting before going to production.

Set headers visually: intercept and modify HTTP headers without touching your code using Requestly.

Download Free →