🚮 Remove attribution reporting API from ads#40474
🚮 Remove attribution reporting API from ads#40474powerivq wants to merge 1 commit intoampproject:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request removes the Attribution Reporting API (ARA) functionality from the ads implementation across the codebase. The Attribution Reporting API was a Privacy Sandbox feature for conversion tracking in ads, but is being completely removed from the AMP implementation.
Changes:
- Deleted utility files for Privacy Sandbox attribution reporting checks
- Removed attribution reporting experiments and feature flags from ad networks (DoubleClick, AdSense)
- Removed attribution reporting feature policy from A4A ad frames
- Deleted attribution reporting tests and related test infrastructure
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/privacy-sandbox-utils.js | Deleted entire utility file containing attribution reporting availability checks and status enum |
| src/experiments/attribution-reporting.js | Deleted experiment configuration file for attribution reporting feature flags |
| src/pixel.js | Removed attribution reporting logic from pixel creation, simplified URL variable substitution |
| extensions/amp-ad-network-doubleclick-impl/0.1/amp-ad-network-doubleclick-impl.js | Removed attribution reporting experiment from experiment selection list |
| extensions/amp-ad-network-adsense-impl/0.1/amp-ad-network-adsense-impl.js | Removed attribution reporting experiment, left empty experiment list |
| extensions/amp-ad-exit/0.1/amp-ad-exit.js | Removed attribution reporting support detection and browserAdConversion processing, simplified to always use trackingUrls |
| extensions/amp-ad-exit/0.1/test/test-amp-ad-exit.js | Removed tests for attribution reporting features, but left two tests that still expect attribution to work |
| extensions/amp-a4a/0.1/amp-a4a.js | Removed conditional attribution-reporting feature policy from iframe allow attribute |
| extensions/amp-a4a/0.1/secure-frame.js | Removed attribution-reporting feature policy from secure frame creation |
| extensions/amp-a4a/0.1/test/test-amp-a4a.js | Removed tests for attribution-reporting feature policy |
| test/unit/builtins/test-amp-pixel.js | Removed attribution reporting tests and import |
| extensions/amp-analytics/0.1/test/test-transport.js | Removed attribution reporting tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| env.sandbox; | ||
|
|
There was a problem hiding this comment.
This line contains only env.sandbox; which is a no-op statement with no effect. This appears to be leftover code from when the sandbox stub was removed. This line should be deleted.
| env.sandbox; |
| env.sandbox; | ||
|
|
There was a problem hiding this comment.
This line contains only env.sandbox; which is a no-op statement with no effect. This appears to be leftover code from when the sandbox stub was removed. This line should be deleted.
| @@ -384,9 +383,8 @@ describes.realWin( | |||
| }); | |||
There was a problem hiding this comment.
This test expects attribution tracking with browserAdConversion to work and expects window.open to be called with specific attributionsrc parameters. However, since the Attribution Reporting API has been removed from the implementation (the getAttributionReportingValues_ method and related logic in amp-ad-exit.js), this test will fail. The implementation now always uses trackingUrls and no longer processes browserAdConversion configurations. This test should either be removed or updated to reflect the new behavior.
| @@ -417,148 +415,6 @@ describes.realWin( | |||
| ); | |||
| }); | |||
There was a problem hiding this comment.
This test expects attribution tracking with empty attributionsrc to work and expects window.open to be called with 'noopener,attributionsrc=' as the third parameter. However, since the Attribution Reporting API has been removed from the implementation, this test will fail. The implementation now always uses trackingUrls and no longer processes browserAdConversion configurations. This test should either be removed or updated to reflect the new behavior.
| // ARA removed | ||
| this.isAttributionReportingSupported_, |
There was a problem hiding this comment.
The ATTRIBUTION_REPORTING_STATUS macro now returns a boolean value (false), which will be stringified to "false" when used in URLs. Previously, it returned numeric status codes (0, 4, 5, or 6) from the AttributionReportingStatus enum. Since ARA is being removed, this should return a constant numeric value to maintain backward compatibility with any URLs using this macro. Based on the previous implementation, it should return either 0 (ATTRIBUTION_DATA_UNSPECIFIED) or 4 (ATTRIBUTION_MACRO_PRESENT) to indicate the macro exists but the feature is disabled.
| // ARA removed | |
| this.isAttributionReportingSupported_, | |
| // ARA removed; return constant numeric status for backward compatibility | |
| 4, |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -40,13 +38,10 @@ describes.realWin('amp-pixel', {amp: true}, (env) => { | |||
| * @param {string=} opt_attributionsrc | |||
There was a problem hiding this comment.
The JSDoc comment for the trigger function still references the opt_attributionsrc parameter on line 38, but this parameter has been removed from the function signature on line 41.
| * @param {string=} opt_attributionsrc |
| * @param {!Window} win | ||
| * @param {string} src | ||
| * @param {string=} attributionSrc | ||
|
|
There was a problem hiding this comment.
There is an extra blank line in the JSDoc comment. Line 33 should be removed to maintain consistent formatting with the rest of the codebase.
| * @param {string} src | ||
| * @param {boolean=} noReferrer | ||
| * @param {string=} attributionSrc | ||
|
|
There was a problem hiding this comment.
There is an extra blank line in the JSDoc comment. Line 69 should be removed to maintain consistent formatting with the rest of the codebase.
Completely took out ARA APIs from ads.