Skip to content

Commit

Permalink
🚮 Stop loading pv endpoint from MGID AMP stories (#40192)
Browse files Browse the repository at this point in the history
* Stop to load pv endpoint from AMP stories

* Stop to load pv endpoint from AMP stories
  • Loading branch information
velichkin authored Jan 8, 2025
1 parent 673f9f8 commit ed53619
Showing 1 changed file with 1 addition and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import {
CONSENT_POLICY_STATE,
CONSENT_STRING_TYPE,
} from '#core/constants/consent-state';
import {createElementWithAttributes, removeElement} from '#core/dom';
import {hasOwn} from '#core/types/object';
import {removeElement} from '#core/dom';

import {Services} from '#service';

Expand All @@ -15,7 +14,6 @@ import {AmpA4A} from '../../amp-a4a/0.1/amp-a4a';
const TAG = 'amp-ad-network-mgid-impl';

const BASE_URL_ = 'https://servicer.mgid.com/';
const PV_URL_ = 'https://c.mgid.com/pv/';

export class AmpAdNetworkMgidImpl extends AmpA4A {
/**
Expand Down Expand Up @@ -74,19 +72,6 @@ export class AmpAdNetworkMgidImpl extends AmpA4A {
params.forEach((result) => data.push(result.value));
const joinedParams = '?' + data.join('&');
servicerUrl += joinedParams;

if (!hasOwn(this.win, '_mgAmpStoryPV')) {
this.getAmpDoc()
.getBody()
.appendChild(
createElementWithAttributes(this.win.document, 'amp-pixel', {
'src': PV_URL_ + joinedParams,
})
);

this.win['_mgAmpStoryPV'] = 1;
}

return servicerUrl;
});
}
Expand Down

0 comments on commit ed53619

Please sign in to comment.