@@ -14,10 +14,6 @@ import {Services} from '#service';
1414
1515import { getData } from '#utils/event-helper' ;
1616import { dev , devAssert , user , userAssert } from '#utils/log' ;
17- import {
18- AttributionReportingStatus ,
19- isAttributionReportingAllowed ,
20- } from '#utils/privacy-sandbox-utils' ;
2117
2218import { TransportMode , assertConfig , assertVendor } from './config' ;
2319import { makeClickDelaySpec } from './filters/click-delay' ;
@@ -93,8 +89,7 @@ export class AmpAdExit extends AMP.BaseElement {
9389 this . expectedOriginToVendor_ = { } ;
9490
9591 /** @private @const {boolean} */
96- this . isAttributionReportingSupported_ =
97- this . detectAttributionReportingSupport ( ) ;
92+ this . isAttributionReportingSupported_ = false ;
9893 }
9994
10095 /**
@@ -191,10 +186,8 @@ export class AmpAdExit extends AMP.BaseElement {
191186 getUrlVariableRewriter_ ( args , event , target ) {
192187 const substitutionFunctions = {
193188 'ATTRIBUTION_REPORTING_STATUS' : ( ) =>
194- getAttributionReportingStatus (
195- this . isAttributionReportingSupported_ ,
196- target
197- ) ,
189+ // ARA removed
190+ this . isAttributionReportingSupported_ ,
198191 'CLICK_X' : ( ) => event . clientX ,
199192 'CLICK_Y' : ( ) => event . clientY ,
200193 } ;
@@ -389,17 +382,7 @@ export class AmpAdExit extends AMP.BaseElement {
389382 . filter ( Boolean ) ,
390383 behaviors : target [ 'behaviors' ] || { } ,
391384 } ;
392- if (
393- this . isAttributionReportingSupported_ &&
394- target ?. behaviors ?. browserAdConversion
395- ) {
396- this . targets_ [ name ] [ 'windowFeatures' ] =
397- this . getAttributionReportingValues_ (
398- target ?. behaviors ?. browserAdConversion
399- ) ;
400- } else {
401- this . targets_ [ name ] [ 'trackingUrls' ] = target [ 'trackingUrls' ] || [ ] ;
402- }
385+ this . targets_ [ name ] [ 'trackingUrls' ] = target [ 'trackingUrls' ] || [ ] ;
403386
404387 // Build a map of {vendor, origin} for 3p custom variables in the config
405388 for ( const customVar in target [ 'vars' ] ) {
@@ -430,37 +413,6 @@ export class AmpAdExit extends AMP.BaseElement {
430413 this . init3pResponseListener_ ( ) ;
431414 }
432415
433- /**
434- * Determine if `attribution-reporting` is supported by user-agent. Should only return
435- * true for Chrome 92+.
436- * @visibleForTesting
437- * @return {boolean }
438- */
439- detectAttributionReportingSupport ( ) {
440- return isAttributionReportingAllowed ( this . win . document ) ;
441- }
442-
443- /**
444- * Extracts the keys from the `browserAdConversion` data creates a
445- * string to be used as the `features` param for the `window.open()` call.
446- * @param {JsonObject } adConversionData
447- * @return {?string }
448- */
449- getAttributionReportingValues_ ( adConversionData ) {
450- if ( ! adConversionData || ! Object . keys ( adConversionData ) ) {
451- return ;
452- }
453-
454- // `noopener` is probably redundant here but left as defense in depth.
455- // https://groups.google.com/a/chromium.org/g/blink-dev/c/FFX6VkvladY/m/QgaWHK6ZBAAJ
456- const parts = [ 'noopener' ] ;
457- for ( const key of Object . keys ( adConversionData ) ) {
458- const encoded = encodeURIComponent ( adConversionData [ key ] ) ;
459- parts . push ( `${ key . toLowerCase ( ) } =${ encoded } ` ) ;
460- }
461- return parts . join ( ',' ) ;
462- }
463-
464416 /**
465417 * Gets the resource ID of the amp-ad element containing this amp-ad-exit tag.
466418 * This is a pass-through for the version in service.js, solely because
@@ -580,26 +532,3 @@ export class AmpAdExit extends AMP.BaseElement {
580532AMP . extension ( TAG , '0.1' , ( AMP ) => {
581533 AMP . registerElement ( TAG , AmpAdExit ) ;
582534} ) ;
583-
584- /**
585- * Resolves the ATTRIBUTION_REPORTING_STATUS macro to the appropriate value
586- * based on the given config and browser support.
587- * @param {boolean } isAttributionReportingSupported
588- * @param {!NavigationTargetDef } target
589- * @return {AttributionReportingStatus }
590- * @visibleForTesting
591- */
592- export function getAttributionReportingStatus (
593- isAttributionReportingSupported ,
594- target
595- ) {
596- if (
597- target ?. behaviors ?. browserAdConversion &&
598- isAttributionReportingSupported
599- ) {
600- return AttributionReportingStatus . ATTRIBUTION_DATA_PRESENT_AND_POLICY_ENABLED ;
601- } else if ( target ?. behaviors ?. browserAdConversion ?. attributionsrc ) {
602- return AttributionReportingStatus . ATTRIBUTION_DATA_PRESENT ;
603- }
604- return AttributionReportingStatus . ATTRIBUTION_MACRO_PRESENT ;
605- }
0 commit comments