Skip to content

Commit

Permalink
pen πŸ› [No signing] fix broken analytics (#32649)
Browse files Browse the repository at this point in the history
  • Loading branch information
calebcordry committed Feb 22, 2021
1 parent a324a18 commit 513e6b3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions extensions/amp-a4a/0.1/amp-a4a.js
Expand Up @@ -936,17 +936,18 @@ export class AmpA4A extends AMP.BaseElement {
return Promise.reject(NO_CONTENT_RESPONSE);
}

// Extract size will also parse x-ampanalytics header for some subclasses.
const size = this.extractSize(httpResponse.headers);
this.creativeSize_ = size || this.creativeSize_;

if (this.skipClientSideValidation(httpResponse.headers)) {
return this.handleFallback_(httpResponse, checkStillCurrent);
}

// Duplicating httpResponse stream as safeframe/nameframe rending will need the
// Duplicating httpResponse stream as safeframe/nameframe rendering will need the
// unaltered httpResponse content.
const fallbackHttpResponse = httpResponse.clone();

const size = this.extractSize(httpResponse.headers);
this.creativeSize_ = size || this.creativeSize_;

// This transformation consumes the detached DOM chunks and
// exposes our waitForHead and transferBody methods.
const transformStream = new DomTransformStream(this.win);
Expand Down

0 comments on commit 513e6b3

Please sign in to comment.