HTTP Headers
Attribution-Reporting-Register-Trigger header
The HTTP Attribution-Reporting-Register-Trigger response header registers a page feature as an attribution trigger. This header is included in a response to a request that contains the Attribution-Reporting-Eligible header.
See the Attribution Reporting API for more details.
| Header type | Response header |
|---|---|
| CORS-safelisted response header | No |
Syntax
Attribution-Reporting-Register-Trigger: <json-string>Directives
This header contains a JSON object, which is an array of up to three objects. Each object represents the current user’s selected topics for the last three epochs and includes the following properties:
<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_keyis present, set this totrueto 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. "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
2will override the default value of1. 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 thefilter_datadefined in a corresponding Attribution-Reporting-Register-Source header. See Filters for more information.
Example
Registering a trigger for an event-level report
A Node.js server might set the Attribution-Reporting-Register-Trigger response header as follows to register a trigger intended to match an event-level report attribution source:
res.set(
"Attribution-Reporting-Register-Trigger",
JSON.stringify({
event_trigger_data: [
{
trigger_data: "4",
priority: "1000000000000",
deduplication_key: "2345698765",
},
],
debug_key: "1115698977",
}),
);
Registering a trigger for a summary report
When registering a trigger intended to match with a summary report attribution source, you need to include the following fields:
res.set(
"Attribution-Reporting-Register-Trigger",
JSON.stringify({
aggregatable_trigger_data: [
{
key_piece: "0x400",
source_keys: ["campaignCounts"],
},
{
key_piece: "0xA80",
source_keys: ["geoValue", "nonMatchingKeyIdsAreIgnored"],
},
],
aggregatable_values: {
campaignCounts: 32768,
geoValue: 1664,
},
debug_key: "1115698977",
}),
);
How to Modify Header using Requestly
Requestly is a powerful Chrome extension that allows you to modify HTTP headers, including the Attribution-Reporting-Register-Trigger header. This is useful when you want to test conversion measurement flows and validate how your site handles attribution triggers during development or debugging. Steps to Modify the Attribution-Reporting-Register-Trigger Header:
- Install and open the Requestly Chrome extension. You can find it on the Chrome Web Store.
- Create a new rule: Click on “Create Rule” and choose “Modify Headers” from the list of available rule types.
- Add a new header modification:
- Under “Action”, select “Add” or “Override”.
- In the “Header Name” field, enter Attribution-Reporting-Register-Trigger.
- In the “Header Value” field, enter your trigger configuration as a JSON string (for example, { “event_trigger_data”: […] }).
- Set the URL condition: Specify the URL or pattern where this header should apply (for example, https://your-website.com/*).
- Save the rule.
Once configured, Requestly will inject the Attribution-Reporting-Register-Trigger header into all matching responses. This allows you to simulate conversion triggers and verify that attribution reporting works correctly.
You might need to modify the Attribution-Reporting-Register-Trigger header to test ad campaign conversions, validate reporting logic, or debug Privacy Sandbox attribution flows without changing your production server configuration. This helps ensure your measurement setup works correctly before goin
Table of Contents
- No headings found.





