Skip to content

Implement anchor href expand on document click with X/Y support#4773

Merged
jridgewell merged 54 commits intoampproject:masterfrom
google:a4a_clickUrlExpand
Sep 15, 2016
Merged

Implement anchor href expand on document click with X/Y support#4773
jridgewell merged 54 commits intoampproject:masterfrom
google:a4a_clickUrlExpand

Conversation

@keithwrightbos
Copy link
Copy Markdown
Contributor

Implementation of document click listener expanding anchor target href including new X/Y click location. See I2I #3665 Enforces sync/async via type check though source wide check is not currently enabled.

Refer to original PR #4153 which was abandoned due to long period between action (cleaner to start new PR).

…nt target rewrite for shadowDom elements; was not binding whether capture to click handler properly. Test coverage for fixes to be added shortly
…y offset, look for existence of event.path and use event.target which should match host element
@cramforce
Copy link
Copy Markdown
Member

Will let @jridgewell do another round of review, but LGTM from me.

* @visibleForTesting
*/
export function getElementByTagNameFromEventShadowDomPath(e, tagName) {
for (let i = 0; i < (e.path ? e.path.length : 0); i++) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can check outside for e.path the for loop, so that we don't deopitmize it.

The previous change was made in error (wrong branch).
@tdrl
Copy link
Copy Markdown

tdrl commented Sep 1, 2016

Randomly, I just noticed that this PR doesn't extend the variable substitution docs. Probably worth adding docs on your new click X/Y support (and its specialized behavior for shadow DOM and iframes and so on) to that.

if (opt_sync) {
user().error('ignoring promise value for key: ' + name);
return '';
} else {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This else is unnecessary since the if before it returns.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@keithwrightbos
Copy link
Copy Markdown
Contributor Author

Updated variable substitution docs. Please give it a read - @tdrl @cramforce

@jridgewell - back to you for review. Thanks

@keithwrightbos
Copy link
Copy Markdown
Contributor Author

@jridgewell I have rebased from master. Please let me know if you require anything else otherwise I will assume you will merge? Thanks!

}

/**
<<<<<<< 848be7f9dffbffe8922cb19af504dc939caf6a17
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge conflict

@jridgewell
Copy link
Copy Markdown
Contributor

You've got some linting errors:

src/document-click.js
   27:9   error  "closestNode" is defined but never used           no-unused-vars
   64:10  error  "captureClickHandlerFor" is already defined       no-redeclare
  331:64  error  Missing trailing comma                            comma-dangle
  348:73  error  Strings must use singlequote                      quotes
  360:7   error  `newHref` is never modified, use `const` instead  prefer-const
✖ 5 problems (5 errors, 0 warnings)
[15:19:00] 
src/service/url-replacements-impl.js
  496:9  error  `metric` is never modified, use `const` instead  prefer-const
✖ 1 problem (1 error, 0 warnings)
[15:19:02] 
test/functional/test-document-click.js
   21:38  error  Missing trailing comma                            comma-dangle
  341:5   error  Unexpected space between function name and paren  no-spaced-func
  346:13  error  `evt` is never modified, use `const` instead      prefer-const
  349:57  error  Missing trailing comma                            comma-dangle
  363:5   error  Unexpected space between function name and paren  no-spaced-func
  368:13  error  `evt` is never modified, use `const` instead      prefer-const
  370:23  error  Missing trailing comma                            comma-dangle
✖ 7 problems (7 errors, 0 warnings)
[15:19:06] 
test/functional/test-url-replacements.js
  324:1   error  Line 324 exceeds the maximum line length of 80        max-len
  482:1   error  Line 482 exceeds the maximum line length of 80        max-len
  505:1   error  Line 505 exceeds the maximum line length of 80        max-len
  583:1   error  Line 583 exceeds the maximum line length of 80        max-len
  629:1   error  Line 629 exceeds the maximum line length of 80        max-len
  698:9   error  `collectVars` is never modified, use `const` instead  prefer-const
  712:28  error  Missing trailing comma                                comma-dangle
  776:1   error  Line 776 exceeds the maximum line length of 80        max-len

@keithwrightbos
Copy link
Copy Markdown
Contributor Author

@jridgewell lint and conflict errors fixed. Sorry about that.

@jridgewell
Copy link
Copy Markdown
Contributor

Not a problem, merge conflicts always suck to get right.

Typehints and test errors now:

src/document-click.js:210: WARNING - parameter isIframed does not appear in onDocumentElementClick_$$module$src$document_click's parameter list
export function onDocumentElementClick_(e, viewport, history, isIosSafari) {
       ^
src/document-click.js:90: ERROR - assignment to property boundHandler_ of ClickHandler$$module$src$document_click
found   : function (boolean, Event): undefined
required: (function (Event): ?|undefined)
      this.boundHandler_ = this.handle_.bind(this);
      ^
src/document-click.js:92: ERROR - actual parameter 2 of Node.prototype.addEventListener does not match formal parameter
found   : undefined
required: (EventListener|function (Event): (boolean|undefined)|null)
          'click', this.boundHandler_);
                   ^
src/document-click.js:115: ERROR - Function onDocumentElementClick_$$module$src$document_click: called with 6 argument(s). Function requires at least 4 argument(s) and no more than 4 argument(s).
    onDocumentElementClick_(e, this.viewport_, this.history_,
    ^
src/document-click.js:116: ERROR - Property urlReplacements_ never defined on ClickHandler$$module$src$document_click
        this.urlReplacements_, this.isIosSafari_, isCapture);
             ^
src/document-click.js:189: ERROR - actual parameter 1 of module$src$dom.closestByTag does not match formal parameter
found   : (EventTarget|null)
required: Element
      closestByTag(e.target, 'A');
                   ^
src/service/url-replacements-impl.js:91: ERROR - inconsistent return type
found   : number
required: (string|undefined)
      return Math.random();
             ^
src/service/url-replacements-impl.js:119: ERROR - inconsistent return type
found   : Promise<string>
required: Promise<(string|undefined)>
      return viewerFor(this.win_).getReferrerUrl();
             ^
src/service/url-replacements-impl.js:206: ERROR - inconsistent return type
found   : Promise<?>
required: (string|undefined)
      return this.variants_.then(variants => {
             ^
src/service/url-replacements-impl.js:220: ERROR - inconsistent return type
found   : Promise<?>
required: (string|undefined)
      return this.variants_.then(variants => {
             ^
src/service/url-replacements-impl.js:237: ERROR - inconsistent return type
found   : Promise<?>
required: (string|undefined)
      return this.shareTrackingFragments_.then(fragments => {
             ^
src/service/url-replacements-impl.js:246: ERROR - inconsistent return type
found   : Promise<?>
required: (string|undefined)
      return this.shareTrackingFragments_.then(fragments => {
             ^
src/service/url-replacements-impl.js:255: ERROR - inconsistent return type
found   : number
required: (string|undefined)
      return Date.now();
             ^
src/service/url-replacements-impl.js:260: ERROR - inconsistent return type
found   : number
required: (string|undefined)
      return new Date().getTimezoneOffset();
             ^
src/service/url-replacements-impl.js:289: ERROR - inconsistent return type
found   : number
required: (string|undefined)
      return this.win_.screen.width;
             ^
src/service/url-replacements-impl.js:294: ERROR - inconsistent return type
found   : number
required: (string|undefined)
      return this.win_.screen.height;
             ^
src/service/url-replacements-impl.js:299: ERROR - inconsistent return type
found   : number
required: (string|undefined)
      return this.win_.screen.availHeight;
             ^
src/service/url-replacements-impl.js:304: ERROR - inconsistent return type
found   : number
required: (string|undefined)
      return this.win_.screen.availWidth;
             ^
src/service/url-replacements-impl.js:309: ERROR - inconsistent return type
found   : number
required: (string|undefined)
      return this.win_.screen.colorDepth;
             ^
src/service/url-replacements-impl.js:373: ERROR - inconsistent return type
found   : (Promise<(AccessService|null)>|null)
required: (string|undefined)
      return this.getAccessValue_(accessService => {
             ^
src/service/url-replacements-impl.js:382: ERROR - inconsistent return type
found   : (Promise<(AccessService|null)>|null)
required: Promise<(string|undefined)>
      return this.getAccessValue_(accessService => {
             ^
src/service/url-replacements-impl.js:389: ERROR - inconsistent return type
found   : Promise<string>
required: Promise<(string|undefined)>
      return viewerFor(this.win_).getViewerOrigin();
             ^
src/service/url-replacements-impl.js:466: ERROR - actual parameter 1 of UrlReplacements$$module$src$service$url_replacements_impl.prototype.getTimingDataSync_ does not match formal parameter
found   : *
required: string
    let metric = this.getTimingDataSync_(startEvent, endEvent);
                                         ^
src/service/url-replacements-impl.js:466: ERROR - actual parameter 2 of UrlReplacements$$module$src$service$url_replacements_impl.prototype.getTimingDataSync_ does not match formal parameter
found   : *
required: (string|undefined)
    let metric = this.getTimingDataSync_(startEvent, endEvent);
                                                     ^
src/service/url-replacements-impl.js:470: ERROR - actual parameter 1 of UrlReplacements$$module$src$service$url_replacements_impl.prototype.getTimingDataSync_ does not match formal parameter
found   : *
required: string
        metric = this.getTimingDataSync_(startEvent, endEvent);
                                         ^
src/service/url-replacements-impl.js:470: ERROR - actual parameter 2 of UrlReplacements$$module$src$service$url_replacements_impl.prototype.getTimingDataSync_ does not match formal parameter
found   : *
required: (string|undefined)
        metric = this.getTimingDataSync_(startEvent, endEvent);
                                                     ^
src/service/url-replacements-impl.js:595: ERROR - inconsistent return type
found   : (Promise<string>|string)
required: string
    return this.expand_(url, opt_bindings, opt_collectVars, true);
           ^
src/service/url-replacements-impl.js:607: ERROR - inconsistent return type
found   : (Promise<string>|string)
required: Promise<string>
    return this.expand_(url, opt_bindings);
           ^
src/service/url-replacements-impl.js:640: ERROR - Property sync never defined on binding
          binding = binding.sync;
                            ^
src/service/url-replacements-impl.js:719: ERROR - inconsistent return type
found   : {async: function (...*): Promise<(string|undefined)>, sync: function (...*): (string|undefined)}
required: function (*, *): *
    return this.replacements_[name];
           ^
29 error(s), 1 warning(s), 95.29530582616196% typed
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: afsanalytics should produce request: pageview. If this test fails update vendor-requests.json FAILED
    AssertionError: expected '//www.afsanalytics.com/cgi_bin/connect.cgi?usr=xxxxxxxxPauto&js=1&amp=1&title=&url=&refer=&resolution=x&color=&Tips=' to equal '//www.afsanalytics.com/cgi_bin/connect.cgi?usr=xxxxxxxxPauto&js=1&amp=1&title=_title_&url=_canonical_url_&refer=_document_referrer_&resolution=_screen_width_x_screen_height_&color=_screen_color_depth_&Tips=_random_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2231 of 2950 (25 FAILED) (skipped 25) (0 secs / 23.36 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2232 of 2950 (25 FAILED) (skipped 25) (0 secs / 23.372 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: atinternet should produce request: base. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://$log$domain/hit.xiti?s=$site&ts=&r=xx&re=x' to equal 'https://$log$domain/hit.xiti?s=$site&ts=_timestamp_&r=_screen_width_x_screen_height_x_screen_color_depth_&re=_available_screen_width_x_available_screen_height_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2233 of 2950 (26 FAILED) (skipped 25) (0 secs / 23.385 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: atinternet should produce request: suffix. If this test fails update vendor-requests.json FAILED
    AssertionError: expected '&medium=amp&$extraUrlParams&ref=' to equal '&medium=amp&$extraUrlParams&ref=_document_referrer_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2234 of 2950 (27 FAILED) (skipped 25) (0 secs / 23.392 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: atinternet should produce request: pageview. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://$log$domain/hit.xiti?s=$site&ts=&r=xx&re=x&p=&s2=$level2&medium=amp&$extraUrlParams&ref=' to equal 'https://$log$domain/hit.xiti?s=$site&ts=_timestamp_&r=_screen_width_x_screen_height_x_screen_color_depth_&re=_available_screen_width_x_available_screen_height_&p=_title_&s2=$level2&medium=amp&$extraUrlParams&ref=_document_referrer_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2235 of 2950 (28 FAILED) (skipped 25) (0 secs / 23.406 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: atinternet should produce request: click. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://$log$domain/hit.xiti?s=$site&ts=&r=xx&re=x&pclick=&s2click=$level2&p=$label&s2=$level2Click&type=click&click=$type&medium=amp&$extraUrlParams&ref=' to equal 'https://$log$domain/hit.xiti?s=$site&ts=_timestamp_&r=_screen_width_x_screen_height_x_screen_color_depth_&re=_available_screen_width_x_available_screen_height_&pclick=_title_&s2click=$level2&p=$label&s2=$level2Click&type=click&click=$type&medium=amp&$extraUrlParams&ref=_document_referrer_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2236 of 2950 (29 FAILED) (skipped 25) (0 secs / 23.42 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2237 of 2950 (29 FAILED) (skipped 25) (0 secs / 23.449 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: burt should produce request: base. If this test fails update vendor-requests.json FAILED
    AssertionError: expected '//ignore.c.richmetrics.com/imglog?e=ignore&pi=ignore|||&ui=&v=amp&ts=&sn=3&' to equal '//ignore.c.richmetrics.com/imglog?e=ignore&pi=ignore|_page_view_id_|_canonical_path_|_client_id_&ui=_client_id_&v=amp&ts=_timestamp_&sn=3&'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2238 of 2950 (30 FAILED) (skipped 25) (0 secs / 23.481 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: burt should produce request: pageview. If this test fails update vendor-requests.json FAILED
    AssertionError: expected '//ignore.c.richmetrics.com/imglog?e=ignore&pi=ignore|||&ui=&v=amp&ts=&sn=3&type=page&ca=$category&sc=$subCategory&ln=&lr=&eu=&tz=&pd=x&sd=x&wd=x&ws=x' to equal '//ignore.c.richmetrics.com/imglog?e=ignore&pi=ignore|_page_view_id_|_canonical_path_|_client_id_&ui=_client_id_&v=amp&ts=_timestamp_&sn=3&type=page&ca=$category&sc=$subCategory&ln=_browser_language_&lr=_document_referrer_&eu=_source_url_&tz=_timezone_&pd=_scroll_width_x_scroll_height_&sd=_screen_width_x_screen_height_&wd=_available_screen_width_x_available_screen_height_&ws=_scroll_left_x_scroll_top_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2239 of 2950 (31 FAILED) (skipped 25) (0 secs / 23.523 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: burt should produce request: pageping. If this test fails update vendor-requests.json FAILED
    AssertionError: expected '//ignore.c.richmetrics.com/imglog?e=ignore&pi=ignore|||&ui=&v=amp&ts=&sn=3&type=pageping' to equal '//ignore.c.richmetrics.com/imglog?e=ignore&pi=ignore|_page_view_id_|_canonical_path_|_client_id_&ui=_client_id_&v=amp&ts=_timestamp_&sn=3&type=pageping'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2240 of 2950 (32 FAILED) (skipped 25) (0 secs / 23.555 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2241 of 2950 (32 FAILED) (skipped 25) (0 secs / 23.572 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: chartbeat should produce request: basePrefix. If this test fails update vendor-requests.json FAILED
    AssertionError: expected '/ping?h=$domain&p=&u=&d=&g=$uid&g0=$sections&g1=$authors&g2=$zone&g3=$sponsorName&g4=$contentType&c=120&x=&y=&j=$decayTime&R=1&W=0&I=0&E=&r=&t=&b=&i=&T=&tz=&C=2' to equal '/ping?h=$domain&p=_canonical_path_&u=_client_id_&d=_canonical_host_&g=$uid&g0=$sections&g1=$authors&g2=$zone&g3=$sponsorName&g4=$contentType&c=120&x=_scroll_top_&y=_scroll_height_&j=$decayTime&R=1&W=0&I=0&E=_total_engaged_time_&r=_document_referrer_&t=_page_view_id__client_id_&b=_page_load_time_&i=_title_&T=_timestamp_&tz=_timezone_&C=2'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2242 of 2950 (33 FAILED) (skipped 25) (0 secs / 23.608 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2243 of 2950 (33 FAILED) (skipped 25) (0 secs / 23.64 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: chartbeat should produce request: interval. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://ping.chartbeat.net/ping?h=$domain&p=&u=&d=&g=$uid&g0=$sections&g1=$authors&g2=$zone&g3=$sponsorName&g4=$contentType&c=120&x=&y=&j=$decayTime&R=1&W=0&I=0&E=&r=&t=&b=&i=&T=&tz=&C=2&_' to equal 'https://ping.chartbeat.net/ping?h=$domain&p=_canonical_path_&u=_client_id_&d=_canonical_host_&g=$uid&g0=$sections&g1=$authors&g2=$zone&g3=$sponsorName&g4=$contentType&c=120&x=_scroll_top_&y=_scroll_height_&j=$decayTime&R=1&W=0&I=0&E=_total_engaged_time_&r=_document_referrer_&t=_page_view_id__client_id_&b=_page_load_time_&i=_title_&T=_timestamp_&tz=_timezone_&C=2&_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2244 of 2950 (34 FAILED) (skipped 25) (0 secs / 23.672 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: chartbeat should produce request: anchorClick. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://ping.chartbeat.net/ping?h=$domain&p=&u=&d=&g=$uid&g0=$sections&g1=$authors&g2=$zone&g3=$sponsorName&g4=$contentType&c=120&x=&y=&j=$decayTime&R=1&W=0&I=0&E=&r=&t=&b=&i=&T=&tz=&C=2&_' to equal 'https://ping.chartbeat.net/ping?h=$domain&p=_canonical_path_&u=_client_id_&d=_canonical_host_&g=$uid&g0=$sections&g1=$authors&g2=$zone&g3=$sponsorName&g4=$contentType&c=120&x=_scroll_top_&y=_scroll_height_&j=$decayTime&R=1&W=0&I=0&E=_total_engaged_time_&r=_document_referrer_&t=_page_view_id__client_id_&b=_page_load_time_&i=_title_&T=_timestamp_&tz=_timezone_&C=2&_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2245 of 2950 (35 FAILED) (skipped 25) (0 secs / 23.703 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2246 of 2950 (35 FAILED) (skipped 25) (0 secs / 23.714 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: clicky should produce request: baseSuffix. If this test fails update vendor-requests.json FAILED
    AssertionError: expected '&mime=$contentType&x=' to equal '&mime=$contentType&x=_random_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2247 of 2950 (36 FAILED) (skipped 25) (0 secs / 23.728 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: clicky should produce request: pageview. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://in.getclicky.com/in.php?site_id=$site_id&res=x&lang=&secure=1&type=pageview&href=&title=&mime=$contentType&x=' to equal 'https://in.getclicky.com/in.php?site_id=$site_id&res=_screen_width_x_screen_height_&lang=_browser_language_&secure=1&type=pageview&href=_canonical_path_&title=_title_&mime=$contentType&x=_random_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2248 of 2950 (37 FAILED) (skipped 25) (0 secs / 23.746 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: clicky should produce request: interval. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://in.getclicky.com/in.php?site_id=$site_id&type=ping&mime=$contentType&x=' to equal 'https://in.getclicky.com/in.php?site_id=$site_id&type=ping&mime=$contentType&x=_random_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2249 of 2950 (38 FAILED) (skipped 25) (0 secs / 23.762 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2250 of 2950 (38 FAILED) (skipped 25) (0 secs / 23.777 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2251 of 2950 (38 FAILED) (skipped 25) (0 secs / 23.792 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: colanalytics should produce request: pageview. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://ase.clmbtech.com/message?cid=$id&val_101=$id&val_101=&ch=&uuid=$uid&au=$authors&zo=$zone&sn=$sponsorName&ct=$contentType&st=&sh=&dct=$decayTime&tet=&dr=&plt=&val_108=&val_120=3' to equal 'https://ase.clmbtech.com/message?cid=$id&val_101=$id&val_101=_canonical_path_&ch=_canonical_host_&uuid=$uid&au=$authors&zo=$zone&sn=$sponsorName&ct=$contentType&st=_scroll_top_&sh=_scroll_height_&dct=$decayTime&tet=_total_engaged_time_&dr=_document_referrer_&plt=_page_load_time_&val_108=_title_&val_120=3'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2252 of 2950 (39 FAILED) (skipped 25) (0 secs / 23.816 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2253 of 2950 (39 FAILED) (skipped 25) (0 secs / 23.826 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2254 of 2950 (39 FAILED) (skipped 25) (0 secs / 23.833 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: comscore should produce request: pageview. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://sb.scorecardresearch.com/b?c1=2&c2=1000001&rn=&c8=&c7=&c9=&cs_c7amp=' to equal 'https://sb.scorecardresearch.com/b?c1=2&c2=1000001&rn=_random_&c8=_title_&c7=_canonical_url_&c9=_document_referrer_&cs_c7amp=_ampdoc_url_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2255 of 2950 (40 FAILED) (skipped 25) (0 secs / 23.847 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2256 of 2950 (40 FAILED) (skipped 25) (0 secs / 23.862 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2257 of 2950 (40 FAILED) (skipped 25) (0 secs / 23.878 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: cxense should produce request: pageview. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://scomcluster.cxense.com/Repo/rep.gif?ver=1&typ=pgv&sid=$siteId&ckp=&loc=&rnd=&ref=&ltm=&wsz=x&bln=&chs=&col=&tzo=' to equal 'https://scomcluster.cxense.com/Repo/rep.gif?ver=1&typ=pgv&sid=$siteId&ckp=_client_id_&loc=_source_url_&rnd=_random_&ref=_document_referrer_&ltm=_timestamp_&wsz=_screen_width_x_screen_height_&bln=_browser_language_&chs=_document_charset_&col=_screen_color_depth_&tzo=_timezone_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2258 of 2950 (41 FAILED) (skipped 25) (0 secs / 23.902 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2259 of 2950 (41 FAILED) (skipped 25) (0 secs / 23.911 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: googleanalytics should produce request: basePrefix. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'v=1&_v=a1&ds=AMP&aip=true&_s=1&dt=&sr=x&_utmht=&jid=&cid=&tid=$account&dl=&dr=&sd=&ul=&de=' to equal 'v=1&_v=a1&ds=AMP&aip=true&_s=1&dt=_title_&sr=_screen_width_x_screen_height_&_utmht=_timestamp_&jid=&cid=_client_id_&tid=$account&dl=_source_url_&dr=_document_referrer_&sd=_screen_color_depth_&ul=_browser_language_&de=_document_charset_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2260 of 2950 (42 FAILED) (skipped 25) (0 secs / 23.929 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: googleanalytics should produce request: baseSuffix. If this test fails update vendor-requests.json FAILED
    AssertionError: expected '&a=&z=' to equal '&a=_page_view_id_&z=_random_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2261 of 2950 (43 FAILED) (skipped 25) (0 secs / 23.94 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: googleanalytics should produce request: pageview. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://www.google-analytics.com/r/collect?v=1&_v=a1&ds=AMP&aip=true&_s=1&dt=&sr=x&_utmht=&jid=&cid=&tid=$account&dl=&dr=&sd=&ul=&de=&t=pageview&_r=1&a=&z=' to equal 'https://www.google-analytics.com/r/collect?v=1&_v=a1&ds=AMP&aip=true&_s=1&dt=_title_&sr=_screen_width_x_screen_height_&_utmht=_timestamp_&jid=&cid=_client_id_&tid=$account&dl=_source_url_&dr=_document_referrer_&sd=_screen_color_depth_&ul=_browser_language_&de=_document_charset_&t=pageview&_r=1&a=_page_view_id_&z=_random_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2262 of 2950 (44 FAILED) (skipped 25) (0 secs / 23.958 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: googleanalytics should produce request: event. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://www.google-analytics.com/collect?v=1&_v=a1&ds=AMP&aip=true&_s=1&dt=&sr=x&_utmht=&jid=&cid=&tid=$account&dl=&dr=&sd=&ul=&de=&t=event&ec=$eventCategory&ea=$eventAction&el=$eventLabel&ev=0&a=&z=' to equal 'https://www.google-analytics.com/collect?v=1&_v=a1&ds=AMP&aip=true&_s=1&dt=_title_&sr=_screen_width_x_screen_height_&_utmht=_timestamp_&jid=&cid=_client_id_&tid=$account&dl=_source_url_&dr=_document_referrer_&sd=_screen_color_depth_&ul=_browser_language_&de=_document_charset_&t=event&ec=$eventCategory&ea=$eventAction&el=$eventLabel&ev=0&a=_page_view_id_&z=_random_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2263 of 2950 (45 FAILED) (skipped 25) (0 secs / 23.977 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: googleanalytics should produce request: social. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://www.google-analytics.com/collect?v=1&_v=a1&ds=AMP&aip=true&_s=1&dt=&sr=x&_utmht=&jid=&cid=&tid=$account&dl=&dr=&sd=&ul=&de=&t=social&sa=$socialAction&sn=$socialNetwork&st=$socialTarget&a=&z=' to equal 'https://www.google-analytics.com/collect?v=1&_v=a1&ds=AMP&aip=true&_s=1&dt=_title_&sr=_screen_width_x_screen_height_&_utmht=_timestamp_&jid=&cid=_client_id_&tid=$account&dl=_source_url_&dr=_document_referrer_&sd=_screen_color_depth_&ul=_browser_language_&de=_document_charset_&t=social&sa=$socialAction&sn=$socialNetwork&st=$socialTarget&a=_page_view_id_&z=_random_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2264 of 2950 (46 FAILED) (skipped 25) (0 secs / 24 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: googleanalytics should produce request: timing. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://www.google-analytics.com/collect?v=1&_v=a1&ds=AMP&aip=true&_s=1&dt=&sr=x&_utmht=&jid=&cid=&tid=$account&dl=&dr=&sd=&ul=&de=&t=timing&plt=&dns=&tcp=&rrt=&srt=&pdt=&clt=&dit=&a=&z=' to equal 'https://www.google-analytics.com/collect?v=1&_v=a1&ds=AMP&aip=true&_s=1&dt=_title_&sr=_screen_width_x_screen_height_&_utmht=_timestamp_&jid=&cid=_client_id_&tid=$account&dl=_source_url_&dr=_document_referrer_&sd=_screen_color_depth_&ul=_browser_language_&de=_document_charset_&t=timing&plt=_page_load_time_&dns=_domain_lookup_time_&tcp=_tcp_connect_time_&rrt=_redirect_time_&srt=_server_response_time_&pdt=_page_download_time_&clt=_content_load_time_&dit=_dom_interactive_time_&a=_page_view_id_&z=_random_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2265 of 2950 (47 FAILED) (skipped 25) (0 secs / 24.022 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2266 of 2950 (47 FAILED) (skipped 25) (0 secs / 24.028 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: krux should produce request: timing. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 't_navigation_type=0&t_dns=&t_tcp=&t_http_request=&t_http_response=&t_content_ready=&t_window_load=&t_redirect=' to equal 't_navigation_type=0&t_dns=_domain_lookup_time_&t_tcp=_tcp_connect_time_&t_http_request=_server_response_time_&t_http_response=_page_download_time_&t_content_ready=_content_load_time_&t_window_load=_page_load_time_&t_redirect=_redirect_time_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2267 of 2950 (48 FAILED) (skipped 25) (0 secs / 24.04 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: krux should produce request: common. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'source=amp&confid=$confid&_kpid=$pubid&_kcp_s=$site&_kcp_sc=$section&_kcp_ssc=$subsection&_kcp_d=&_kpref_=&_kua_kx_amp_client_id=&_kua_kx_lang=&_kua_kx_tech_browser_language=&_kua_kx_tz=' to equal 'source=amp&confid=$confid&_kpid=$pubid&_kcp_s=$site&_kcp_sc=$section&_kcp_ssc=$subsection&_kcp_d=_canonical_host_&_kpref_=_document_referrer_&_kua_kx_amp_client_id=_client_id_&_kua_kx_lang=_browser_language_&_kua_kx_tech_browser_language=_browser_language_&_kua_kx_tz=_timezone_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2268 of 2950 (49 FAILED) (skipped 25) (0 secs / 24.051 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: krux should produce request: pageview. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://beacon.krxd.net/pixel.gif?source=amp&confid=$confid&_kpid=$pubid&_kcp_s=$site&_kcp_sc=$section&_kcp_ssc=$subsection&_kcp_d=&_kpref_=&_kua_kx_amp_client_id=&_kua_kx_lang=&_kua_kx_tech_browser_language=&_kua_kx_tz=&t_navigation_type=0&t_dns=&t_tcp=&t_http_request=&t_http_response=&t_content_ready=&t_window_load=&t_redirect=' to equal 'https://beacon.krxd.net/pixel.gif?source=amp&confid=$confid&_kpid=$pubid&_kcp_s=$site&_kcp_sc=$section&_kcp_ssc=$subsection&_kcp_d=_canonical_host_&_kpref_=_document_referrer_&_kua_kx_amp_client_id=_client_id_&_kua_kx_lang=_browser_language_&_kua_kx_tech_browser_language=_browser_language_&_kua_kx_tz=_timezone_&t_navigation_type=0&t_dns=_domain_lookup_time_&t_tcp=_tcp_connect_time_&t_http_request=_server_response_time_&t_http_response=_page_download_time_&t_content_ready=_content_load_time_&t_window_load=_page_load_time_&t_redirect=_redirect_time_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2269 of 2950 (50 FAILED) (skipped 25) (0 secs / 24.07 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: krux should produce request: event. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://beacon.krxd.net/event.gif?source=amp&confid=$confid&_kpid=$pubid&_kcp_s=$site&_kcp_sc=$section&_kcp_ssc=$subsection&_kcp_d=&_kpref_=&_kua_kx_amp_client_id=&_kua_kx_lang=&_kua_kx_tech_browser_language=&_kua_kx_tz=&t_navigation_type=0&t_dns=&t_tcp=&t_http_request=&t_http_response=&t_content_ready=&t_window_load=&t_redirect=&pageview=false' to equal 'https://beacon.krxd.net/event.gif?source=amp&confid=$confid&_kpid=$pubid&_kcp_s=$site&_kcp_sc=$section&_kcp_ssc=$subsection&_kcp_d=_canonical_host_&_kpref_=_document_referrer_&_kua_kx_amp_client_id=_client_id_&_kua_kx_lang=_browser_language_&_kua_kx_tech_browser_language=_browser_language_&_kua_kx_tz=_timezone_&t_navigation_type=0&t_dns=_domain_lookup_time_&t_tcp=_tcp_connect_time_&t_http_request=_server_response_time_&t_http_response=_page_download_time_&t_content_ready=_content_load_time_&t_window_load=_page_load_time_&t_redirect=_redirect_time_&pageview=false'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2270 of 2950 (51 FAILED) (skipped 25) (0 secs / 24.103 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2271 of 2950 (51 FAILED) (skipped 25) (0 secs / 24.111 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2272 of 2950 (51 FAILED) (skipped 25) (0 secs / 24.125 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: mediametrie should produce request: pageview. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://prof.estat.com/m/web/$serial?c=$level1&dom=&enc=&l3=$level3&l4=$level4&n=&p=$level2&r=&sch=&scw=&tn=amp&v=1&vh=&vw=' to equal 'https://prof.estat.com/m/web/$serial?c=$level1&dom=_ampdoc_url_&enc=_document_charset_&l3=$level3&l4=$level4&n=_random_&p=$level2&r=_document_referrer_&sch=_screen_height_&scw=_screen_width_&tn=amp&v=1&vh=_available_screen_height_&vw=_available_screen_width_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2273 of 2950 (52 FAILED) (skipped 25) (0 secs / 24.151 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2274 of 2950 (52 FAILED) (skipped 25) (0 secs / 24.157 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2275 of 2950 (52 FAILED) (skipped 25) (0 secs / 24.163 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: mparticle should produce request: baseParams. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'et=Unknown&amp_id=&attrs_k=$eventAttributes_Keys&attrs_v=$eventAttributes_Values&ua_k=$userAttributes_Keys&ua_v=$userAttributes_Values&ui_t=$userIdentities_Types&ui_v=$userIdentities_Values&flags_k=$customFlags_Keys&flags_v=$customFlags_Values&ct=&dbg=$debug&lc=$location&av=$appVersion' to equal 'et=Unknown&amp_id=_client_id_&attrs_k=$eventAttributes_Keys&attrs_v=$eventAttributes_Values&ua_k=$userAttributes_Keys&ua_v=$userAttributes_Values&ui_t=$userIdentities_Types&ui_v=$userIdentities_Values&flags_k=$customFlags_Keys&flags_v=$customFlags_Values&ct=_timestamp_&dbg=$debug&lc=$location&av=$appVersion'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2276 of 2950 (53 FAILED) (skipped 25) (0 secs / 24.173 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: mparticle should produce request: pageview. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://pixels.mparticle.com/v1/$apiKey/Pixel?dt=ScreenView&n=&hn=&ttl=&et=Unknown&amp_id=&attrs_k=$eventAttributes_Keys&attrs_v=$eventAttributes_Values&ua_k=$userAttributes_Keys&ua_v=$userAttributes_Values&ui_t=$userIdentities_Types&ui_v=$userIdentities_Values&flags_k=$customFlags_Keys&flags_v=$customFlags_Values&ct=&dbg=$debug&lc=$location&av=$appVersion' to equal 'https://pixels.mparticle.com/v1/$apiKey/Pixel?dt=ScreenView&n=_canonical_path_&hn=_ampdoc_url_&ttl=_title_&et=Unknown&amp_id=_client_id_&attrs_k=$eventAttributes_Keys&attrs_v=$eventAttributes_Values&ua_k=$userAttributes_Keys&ua_v=$userAttributes_Values&ui_t=$userIdentities_Types&ui_v=$userIdentities_Values&flags_k=$customFlags_Keys&flags_v=$customFlags_Values&ct=_timestamp_&dbg=$debug&lc=$location&av=$appVersion'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2277 of 2950 (54 FAILED) (skipped 25) (0 secs / 24.186 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: mparticle should produce request: event. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://pixels.mparticle.com/v1/$apiKey/Pixel?dt=AppEvent&n=$eventName&et=Unknown&amp_id=&attrs_k=$eventAttributes_Keys&attrs_v=$eventAttributes_Values&ua_k=$userAttributes_Keys&ua_v=$userAttributes_Values&ui_t=$userIdentities_Types&ui_v=$userIdentities_Values&flags_k=$customFlags_Keys&flags_v=$customFlags_Values&ct=&dbg=$debug&lc=$location&av=$appVersion' to equal 'https://pixels.mparticle.com/v1/$apiKey/Pixel?dt=AppEvent&n=$eventName&et=Unknown&amp_id=_client_id_&attrs_k=$eventAttributes_Keys&attrs_v=$eventAttributes_Values&ua_k=$userAttributes_Keys&ua_v=$userAttributes_Values&ui_t=$userIdentities_Types&ui_v=$userIdentities_Values&flags_k=$customFlags_Keys&flags_v=$customFlags_Values&ct=_timestamp_&dbg=$debug&lc=$location&av=$appVersion'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2278 of 2950 (55 FAILED) (skipped 25) (0 secs / 24.2 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: oewadirect should produce request: pageview. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://$s.oewabox.at/j0=,,,r=;+,amp=1+cp=$cp+ssl=1+hn=;;;?lt=&x=xx24&c=' to equal 'https://$s.oewabox.at/j0=,,,r=_canonical_url_;+,amp=1+cp=$cp+ssl=1+hn=_canonical_host_;;;?lt=_page_view_id_&x=_screen_width_x_screen_height_x24&c=_client_id_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2279 of 2950 (56 FAILED) (skipped 25) (0 secs / 24.217 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: oewa should produce request: pageview. If this test fails update vendor-requests.json FAILED
    AssertionError: expected '$url?s=$s&amp=1&cp=$cp&host=&path=' to equal '$url?s=$s&amp=1&cp=$cp&host=_canonical_host_&path=_canonical_path_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2280 of 2950 (57 FAILED) (skipped 25) (0 secs / 24.229 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2281 of 2950 (57 FAILED) (skipped 25) (0 secs / 24.243 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: parsely should produce request: basePrefix. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://srv.pixel.parsely.com/plogger/?rand=&idsite=$apikey&url=&urlref=&screen=x%7Cx%7C&title=&date=&ampid=' to equal 'https://srv.pixel.parsely.com/plogger/?rand=_timestamp_&idsite=$apikey&url=_ampdoc_url_&urlref=_document_referrer_&screen=_screen_width_x_screen_height_%7C_available_screen_width_x_available_screen_height_%7C_screen_color_depth_&title=_title_&date=_timestamp_&ampid=_client_id_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2282 of 2950 (58 FAILED) (skipped 25) (0 secs / 24.267 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: parsely should produce request: pageview. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://srv.pixel.parsely.com/plogger/?rand=&idsite=$apikey&url=&urlref=&screen=x%7Cx%7C&title=&date=&ampid=&action=pageview' to equal 'https://srv.pixel.parsely.com/plogger/?rand=_timestamp_&idsite=$apikey&url=_ampdoc_url_&urlref=_document_referrer_&screen=_screen_width_x_screen_height_%7C_available_screen_width_x_available_screen_height_%7C_screen_color_depth_&title=_title_&date=_timestamp_&ampid=_client_id_&action=pageview'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2283 of 2950 (59 FAILED) (skipped 25) (0 secs / 24.293 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2284 of 2950 (59 FAILED) (skipped 25) (0 secs / 24.298 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2285 of 2950 (59 FAILED) (skipped 25) (0 secs / 24.302 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: piano should produce request: baseSuffix. If this test fails update vendor-requests.json FAILED
    AssertionError: expected '&pageview_id=&rand=&amp_client_id=&aid=$aid' to equal '&pageview_id=_page_view_id_&rand=_random_&amp_client_id=_client_id_&aid=$aid'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2286 of 2950 (60 FAILED) (skipped 25) (0 secs / 24.31 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: piano should produce request: pageview. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://api-v3.tinypass.com/api/v3/page/track?url=&referer=&content_created=$contentCreated&content_author=$contentAuthor&content_section=$contentSection&timezone_offset=&tags=$tags&amp_url=&screen=x&pageview_id=&rand=&amp_client_id=&aid=$aid' to equal 'https://api-v3.tinypass.com/api/v3/page/track?url=_canonical_url_&referer=_document_referrer_&content_created=$contentCreated&content_author=$contentAuthor&content_section=$contentSection&timezone_offset=_timezone_&tags=$tags&amp_url=_ampdoc_url_&screen=_screen_width_x_screen_height_&pageview_id=_page_view_id_&rand=_random_&amp_client_id=_client_id_&aid=$aid'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2287 of 2950 (61 FAILED) (skipped 25) (0 secs / 24.324 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2288 of 2950 (61 FAILED) (skipped 25) (0 secs / 24.338 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: quantcast should produce request: pageview. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://pixel.quantserve.com/pixel;r=;a=$pcode;labels=$labels;fpan=;fpa=;ns=0;ce=1;cm=;je=0;sr=xx;enc=n;et=;ref=;url=' to equal 'https://pixel.quantserve.com/pixel;r=_random_;a=$pcode;labels=$labels;fpan=;fpa=_client_id_;ns=0;ce=1;cm=;je=0;sr=_screen_width_x_screen_height_x_screen_color_depth_;enc=n;et=_timestamp_;ref=_document_referrer_;url=_canonical_url_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2289 of 2950 (62 FAILED) (skipped 25) (0 secs / 24.36 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: adobeanalytics should produce request: requestPath. If this test fails update vendor-requests.json FAILED
    AssertionError: expected '/b/ss/$reportSuites/0/amp-1.0/s' to equal '/b/ss/$reportSuites/0/amp-1.0/s_random_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2290 of 2950 (63 FAILED) (skipped 25) (0 secs / 24.368 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: adobeanalytics should produce request: basePrefix. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'vid=z&ndh=0&ce=&pageName=&g=&r=&bh=&bw=&c=&j=amp&s=x' to equal 'vid=z_client_id_&ndh=0&ce=_document_charset_&pageName=_title_&g=_ampdoc_url_&r=_document_referrer_&bh=_available_screen_height_&bw=_available_screen_width_&c=_screen_color_depth_&j=amp&s=_screen_width_x_screen_height_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2291 of 2950 (64 FAILED) (skipped 25) (0 secs / 24.386 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: adobeanalytics should produce request: pageview. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://$host/b/ss/$reportSuites/0/amp-1.0/s?vid=z&ndh=0&ce=&pageName=&g=&r=&bh=&bw=&c=&j=amp&s=x' to equal 'https://$host/b/ss/$reportSuites/0/amp-1.0/s_random_?vid=z_client_id_&ndh=0&ce=_document_charset_&pageName=_title_&g=_ampdoc_url_&r=_document_referrer_&bh=_available_screen_height_&bw=_available_screen_width_&c=_screen_color_depth_&j=amp&s=_screen_width_x_screen_height_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2292 of 2950 (65 FAILED) (skipped 25) (0 secs / 24.403 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: adobeanalytics should produce request: click. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://$host/b/ss/$reportSuites/0/amp-1.0/s?vid=z&ndh=0&ce=&pageName=&g=&r=&bh=&bw=&c=&j=amp&s=x&pe=lnk_o&pev1=$linkUrl&pev2=$linkName' to equal 'https://$host/b/ss/$reportSuites/0/amp-1.0/s_random_?vid=z_client_id_&ndh=0&ce=_document_charset_&pageName=_title_&g=_ampdoc_url_&r=_document_referrer_&bh=_available_screen_height_&bw=_available_screen_width_&c=_screen_color_depth_&j=amp&s=_screen_width_x_screen_height_&pe=lnk_o&pev1=$linkUrl&pev2=$linkName'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2293 of 2950 (66 FAILED) (skipped 25) (0 secs / 24.421 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: infonline should produce request: pageview. If this test fails update vendor-requests.json FAILED
    AssertionError: expected '$url?st=$st&sv=ke&ap=1&co=$co&cp=$cp&host=&path=' to equal '$url?st=$st&sv=ke&ap=1&co=$co&cp=$cp&host=_canonical_host_&path=_canonical_path_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2294 of 2950 (67 FAILED) (skipped 25) (0 secs / 24.436 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2295 of 2950 (67 FAILED) (skipped 25) (0 secs / 24.454 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: simplereach should produce request: baseParams. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'amp=true&pid=$pid&title=&url=&date=$published_at&authors=$authors&channels=$categories&tags=$tags&referrer=&page_url=&user_id=&domain=' to equal 'amp=true&pid=$pid&title=_title_&url=_canonical_url_&date=$published_at&authors=$authors&channels=$categories&tags=$tags&referrer=_document_referrer_&page_url=_source_url_&user_id=_client_id_&domain=_canonical_host_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2296 of 2950 (68 FAILED) (skipped 25) (0 secs / 24.479 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: simplereach should produce request: visible. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://edge.simplereach.com/n?amp=true&pid=$pid&title=&url=&date=$published_at&authors=$authors&channels=$categories&tags=$tags&referrer=&page_url=&user_id=&domain=' to equal 'https://edge.simplereach.com/n?amp=true&pid=$pid&title=_title_&url=_canonical_url_&date=$published_at&authors=$authors&channels=$categories&tags=$tags&referrer=_document_referrer_&page_url=_source_url_&user_id=_client_id_&domain=_canonical_host_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2297 of 2950 (69 FAILED) (skipped 25) (0 secs / 24.505 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: simplereach should produce request: timer. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://edge.simplereach.com/t?amp=true&pid=$pid&title=&url=&date=$published_at&authors=$authors&channels=$categories&tags=$tags&referrer=&page_url=&user_id=&domain=&t=5000&e=5000' to equal 'https://edge.simplereach.com/t?amp=true&pid=$pid&title=_title_&url=_canonical_url_&date=$published_at&authors=$authors&channels=$categories&tags=$tags&referrer=_document_referrer_&page_url=_source_url_&user_id=_client_id_&domain=_canonical_host_&t=5000&e=5000'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2298 of 2950 (70 FAILED) (skipped 25) (0 secs / 24.53 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2299 of 2950 (70 FAILED) (skipped 25) (0 secs / 24.545 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: segment should produce request: base. If this test fails update vendor-requests.json FAILED
    AssertionError: expected '?writeKey=$writeKey&anonymousId=&context.locale=&context.page.path=&context.page.url=&context.page.referrer=&context.page.title=&context.screen.width=&context.screen.height=' to equal '?writeKey=$writeKey&anonymousId=_client_id_&context.locale=_browser_language_&context.page.path=_canonical_path_&context.page.url=_canonical_url_&context.page.referrer=_document_referrer_&context.page.title=_title_&context.screen.width=_screen_width_&context.screen.height=_screen_height_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2300 of 2950 (71 FAILED) (skipped 25) (0 secs / 24.565 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: segment should produce request: page. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://api.segment.io/v1/pixel/page?writeKey=$writeKey&anonymousId=&context.locale=&context.page.path=&context.page.url=&context.page.referrer=&context.page.title=&context.screen.width=&context.screen.height=&name=$name' to equal 'https://api.segment.io/v1/pixel/page?writeKey=$writeKey&anonymousId=_client_id_&context.locale=_browser_language_&context.page.path=_canonical_path_&context.page.url=_canonical_url_&context.page.referrer=_document_referrer_&context.page.title=_title_&context.screen.width=_screen_width_&context.screen.height=_screen_height_&name=$name'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2301 of 2950 (72 FAILED) (skipped 25) (0 secs / 24.587 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: segment should produce request: track. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://api.segment.io/v1/pixel/track?writeKey=$writeKey&anonymousId=&context.locale=&context.page.path=&context.page.url=&context.page.referrer=&context.page.title=&context.screen.width=&context.screen.height=&event=$event' to equal 'https://api.segment.io/v1/pixel/track?writeKey=$writeKey&anonymousId=_client_id_&context.locale=_browser_language_&context.page.path=_canonical_path_&context.page.url=_canonical_url_&context.page.referrer=_document_referrer_&context.page.title=_title_&context.screen.width=_screen_width_&context.screen.height=_screen_height_&event=$event'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2302 of 2950 (73 FAILED) (skipped 25) (0 secs / 24.605 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2303 of 2950 (73 FAILED) (skipped 25) (0 secs / 24.613 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: snowplow should produce request: basePrefix. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://$collectorHost/i?url=&page=&res=x&stm=&tz=&aid=$appId&p=web&tv=amp-0.1' to equal 'https://$collectorHost/i?url=_canonical_url_&page=_title_&res=_screen_width_x_screen_height_&stm=_timestamp_&tz=_timezone_&aid=$appId&p=web&tv=amp-0.1'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2304 of 2950 (74 FAILED) (skipped 25) (0 secs / 24.625 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: snowplow should produce request: pageView. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://$collectorHost/i?url=&page=&res=x&stm=&tz=&aid=$appId&p=web&tv=amp-0.1&e=pv' to equal 'https://$collectorHost/i?url=_canonical_url_&page=_title_&res=_screen_width_x_screen_height_&stm=_timestamp_&tz=_timezone_&aid=$appId&p=web&tv=amp-0.1&e=pv'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2305 of 2950 (75 FAILED) (skipped 25) (0 secs / 24.637 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: snowplow should produce request: structEvent. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://$collectorHost/i?url=&page=&res=x&stm=&tz=&aid=$appId&p=web&tv=amp-0.1&e=se&se_ca=$structEventCategory&se_ac=$structEventAction&se_la=$structEventLabel&se_pr=$structEventProperty&se_va=$structEventValue' to equal 'https://$collectorHost/i?url=_canonical_url_&page=_title_&res=_screen_width_x_screen_height_&stm=_timestamp_&tz=_timezone_&aid=$appId&p=web&tv=amp-0.1&e=se&se_ca=$structEventCategory&se_ac=$structEventAction&se_la=$structEventLabel&se_pr=$structEventProperty&se_va=$structEventValue'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2306 of 2950 (76 FAILED) (skipped 25) (0 secs / 24.648 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2307 of 2950 (76 FAILED) (skipped 25) (0 secs / 24.655 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: webtrekk should produce request: parameterPrefix. If this test fails update vendor-requests.json FAILED
    AssertionError: expected '?p=432,$contentId,1,x,,1,,,x,0&tz=&eid=&la=' to equal '?p=432,$contentId,1,_screen_width_x_screen_height_,_screen_color_depth_,1,_timestamp_,_document_referrer_,_viewport_width_x_viewport_height_,0&tz=_timezone_&eid=_client_id_&la=_browser_language_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2308 of 2950 (77 FAILED) (skipped 25) (0 secs / 24.67 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: webtrekk should produce request: parameterSuffix. If this test fails update vendor-requests.json FAILED
    AssertionError: expected '&pu=' to equal '&pu=_canonical_url_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2309 of 2950 (78 FAILED) (skipped 25) (0 secs / 24.677 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2310 of 2950 (78 FAILED) (skipped 25) (0 secs / 24.688 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2311 of 2950 (78 FAILED) (skipped 25) (0 secs / 24.699 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: webtrekk should produce request: pageview. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://$trackDomain/$trackId/wt?p=432,$contentId,1,x,,1,,,x,0&tz=&eid=&la=&cp1=$pageParameter1&cp2=$pageParameter2&cp3=$pageParameter3&cp4=$pageParameter4&cp5=$pageParameter5&cp6=$pageParameter6&cp7=$pageParameter7&cp8=$pageParameter8&cp9=$pageParameter9&cp10=$pageParameter10&cg1=$pageCategory1&cg2=$pageCategory2&cg3=$pageCategory3&cg4=$pageCategory4&cg5=$pageCategory5&cg6=$pageCategory6&cg7=$pageCategory7&cg8=$pageCategory8&cg9=$pageCategory9&cg10=$pageCategory10&pu=' to equal 'https://$trackDomain/$trackId/wt?p=432,$contentId,1,_screen_width_x_screen_height_,_screen_color_depth_,1,_timestamp_,_document_referrer_,_viewport_width_x_viewport_height_,0&tz=_timezone_&eid=_client_id_&la=_browser_language_&cp1=$pageParameter1&cp2=$pageParameter2&cp3=$pageParameter3&cp4=$pageParameter4&cp5=$pageParameter5&cp6=$pageParameter6&cp7=$pageParameter7&cp8=$pageParameter8&cp9=$pageParameter9&cp10=$pageParameter10&cg1=$pageCategory1&cg2=$pageCategory2&cg3=$pageCategory3&cg4=$pageCategory4&cg5=$pageCategory5&cg6=$pageCategory6&cg7=$pageCategory7&cg8=$pageCategory8&cg9=$pageCategory9&cg10=$pageCategory10&pu=_canonical_url_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2312 of 2950 (79 FAILED) (skipped 25) (0 secs / 24.723 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2313 of 2950 (79 FAILED) (skipped 25) (0 secs / 24.731 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: webtrekk should produce request: event. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://$trackDomain/$trackId/wt?p=432,$contentId,1,x,,1,,,x,0&tz=&eid=&la=&ct=$actionName&ck1=$actionParameter1&ck2=$actionParameter2&ck3=$actionParameter3&ck4=$actionParameter4&ck5=$actionParameter5&pu=' to equal 'https://$trackDomain/$trackId/wt?p=432,$contentId,1,_screen_width_x_screen_height_,_screen_color_depth_,1,_timestamp_,_document_referrer_,_viewport_width_x_viewport_height_,0&tz=_timezone_&eid=_client_id_&la=_browser_language_&ct=$actionName&ck1=$actionParameter1&ck2=$actionParameter2&ck3=$actionParameter3&ck4=$actionParameter4&ck5=$actionParameter5&pu=_canonical_url_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2314 of 2950 (80 FAILED) (skipped 25) (0 secs / 24.75 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: mpulse should produce request: onvisible. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://$beacon_url?h.d=$h.d&h.key=$h.key&h.t=$h.t&h.cr=$h.cr&rt.start=navigation&rt.si=&rt.ss=&rt.end=&t_resp=&t_page=&t_done=&nt_nav_type=&nt_red_cnt=&nt_nav_st=&nt_red_st=&nt_red_end=&nt_fet_st=&nt_dns_st=&nt_dns_end=&nt_con_st=&nt_ssl_st=&nt_con_end=&nt_req_st=&nt_res_st=&nt_unload_st=&nt_unload_end=&nt_domloading=&nt_res_end=&nt_domint=&nt_domcontloaded_st=&nt_domcontloaded_end=&nt_domcomp=&nt_load_st=&nt_load_end=&v=1&http.initiator=amp&u=&amp.u=&r2=&scr.xy=x' to equal '/tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2315 of 2950 (81 FAILED) (skipped 25) (0 secs / 24.81 secs)
ium 51.0.2704 (Ubuntu 0.0.0): Executed 2316 of 2950 (81 FAILED) (skipped 25) (0 secs / 24.831 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: linkpulse should produce request: pageview. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://pp.lp4.io/p?i=$id&r=&p=&s=$section&t=$type&c=amp&mt=&_t=amp&_r=' to equal 'https://pp.lp4.io/p?i=$id&r=_document_referrer_&p=_canonical_url_&s=$section&t=$type&c=amp&mt=_title_&_t=amp&_r=_random_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2317 of 2950 (82 FAILED) (skipped 25) (0 secs / 24.86 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: linkpulse should produce request: pageload. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://pp.lp4.io/pl?i=$id&ct=&rt=&pt=&p=&c=amp&t=$type&s=$section&_t=amp&_r=' to equal 'https://pp.lp4.io/pl?i=$id&ct=_dom_interactive_time_&rt=_page_download_time_&pt=_page_load_time_&p=_canonical_url_&c=amp&t=$type&s=$section&_t=amp&_r=_random_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31
Chromium 51.0.2704 (Ubuntu 0.0.0): Executed 2318 of 2950 (83 FAILED) (skipped 25) (0 secs / 24.887 secs)
Chromium 51.0.2704 (Ubuntu 0.0.0) amp-analytics vendor request tests analytics vendor: linkpulse should produce request: ping. If this test fails update vendor-requests.json FAILED
    AssertionError: expected 'https://pp.lp4.io/u?i=$id&u=&p=&uActive=true&isPing=yes&c=amp&t=$type&s=$section&_t=amp&_r=' to equal 'https://pp.lp4.io/u?i=$id&u=_client_id_&p=_canonical_url_&uActive=true&isPing=yes&c=amp&t=$type&s=$section&_t=amp&_r=_random_'
        at /tmp/05a332319e7503bce209abbf19ba8066.browserify:22839:32 <- /home/travis/build/ampproject/amphtml/extensions/amp-analytics/0.1/test/test-amp-analytics.js:219:31

@keithwrightbos
Copy link
Copy Markdown
Contributor Author

PTAL - lint, type check, and test errors fixed. @jridgewell let me know if you require anything else.

@jridgewell jridgewell merged commit fa58235 into ampproject:master Sep 15, 2016
@jridgewell jridgewell deleted the a4a_clickUrlExpand branch September 15, 2016 19:49
@mkhatib mkhatib mentioned this pull request Sep 15, 2016
return viewerFor(this.win_).getReferrerUrl();
this.setAsync_('DOCUMENT_REFERRER', () => {
return viewerFor(this.win_).getReferrerUrl().then(referrer => {
return referrer === undefined ? '' : referrer;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please clarify, what's the purpose of this? Did we disallow undefined values downstream?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, in retrospect this should not have been necessary. I was debating making the result explicitly string given we need to replace the macro but after some thought decided null/undefined was equivalent to empty string. Should you decide to roll this back, I will fix. Otherwise I can address in a subsequent PR.

@dvoytenko
Copy link
Copy Markdown
Contributor

This PR causes significant test failures. I'm planning to roll it back. Let me know if it's in a critical path.

avimehta added a commit to avimehta/amphtml that referenced this pull request Sep 15, 2016
This was broken because of ampproject#4773.

Fixes ampproject#5043
@avimehta avimehta mentioned this pull request Sep 15, 2016
@keithwrightbos
Copy link
Copy Markdown
Contributor Author

Feel free to roll back. Apologies, I will address failures. Not sure how they slipped through given I ran the full test suite locally. Must not have caught the expand to expandAsync name change.

erwinmombay added a commit to erwinmombay/amphtml that referenced this pull request Sep 15, 2016
erwinmombay added a commit that referenced this pull request Sep 16, 2016
dreamofabear pushed a commit to dreamofabear/amphtml that referenced this pull request Sep 16, 2016
…roject#4773)

* Implement anchor href expand on document click with X/Y support

* Fixes after full stack testing: need to look at event path due to event target rewrite for shadowDom elements; was not binding whether capture to click handler properly.  Test coverage for fixes to be added shortly

* update tests; instead of looking for shadowRoot boundary to update x/y offset, look for existence of event.path and use event.target which should match host element

* slight refactor for readability

* fix javadoc error

* Update amp-ad-network-doubleclick-impl.md

* Reverting doc changes

The previous change was made in error (wrong branch).

* changes in response to PR review

* update var substititions documentation

* make capture listener actually use capture!

* remove unnecessary else clause

* fix pull conflicts

* Fixes after full stack testing: need to look at event path due to event target rewrite for shadowDom elements; was not binding whether capture to click handler properly.  Test coverage for fixes to be added shortly

* update tests; instead of looking for shadowRoot boundary to update x/y offset, look for existence of event.path and use event.target which should match host element

* slight refactor for readability

* fix javadoc error

* changes in response to PR review

* update var substititions documentation

* make capture listener actually use capture!

* remove unnecessary else clause

* fix test failure due to issue after merge

* address PR comments

* Implement anchor href expand on document click with X/Y support

* Fixes after full stack testing: need to look at event path due to event target rewrite for shadowDom elements; was not binding whether capture to click handler properly.  Test coverage for fixes to be added shortly

* update tests; instead of looking for shadowRoot boundary to update x/y offset, look for existence of event.path and use event.target which should match host element

* slight refactor for readability

* fix javadoc error

* changes in response to PR review

* update var substititions documentation

* make capture listener actually use capture!

* remove unnecessary else clause

* fix pull conflicts

* Fixes after full stack testing: need to look at event path due to event target rewrite for shadowDom elements; was not binding whether capture to click handler properly.  Test coverage for fixes to be added shortly

* update tests; instead of looking for shadowRoot boundary to update x/y offset, look for existence of event.path and use event.target which should match host element

* slight refactor for readability

* changes in response to PR review

* fix test failure due to issue after merge

* Revert "reenable history tests (ampproject#4758)"

This reverts commit 1375883.

* Revert "Reverting doc changes"

This reverts commit 8d8c6dd.

* Revert "Small Validator Updates, including blacklisting __amp_source_origin for URLs. (ampproject#4781)"

This reverts commit bffeb2d.

* Revert "Remove video-id from the amp-youtube extension runtime. This attr had (ampproject#4507)"

This reverts commit 8d1799d.

* Revert unintentionally added files.

* Revert unintentionally added file.

* Fix test failure from latest merge

* Fix conflict and lint errors

* Fix lint errors, type check failures, and test failures
dreamofabear pushed a commit to dreamofabear/amphtml that referenced this pull request Sep 16, 2016
@dvoytenko
Copy link
Copy Markdown
Contributor

@keithwrightbos I'll make couple of notes now and please make sure I get a chance to glance over the review for the updated PR. For information, here's the fix Avi put together for the failing tests https://github.com/ampproject/amphtml/pull/5046/files.

return createIframePromise().then(iframe => {
installUrlReplacementsService(iframe.win);
const replacements = urlReplacementsFor(iframe.win);
Math.random = function() { return 135; };
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use sandbox.stub() for this. Otherwise, Math.random() will be replaced for all subsequent tests.

mityaha pushed a commit to brightcove-archive/ooyala_amphtml that referenced this pull request Nov 30, 2016
…roject#4773)

* Implement anchor href expand on document click with X/Y support

* Fixes after full stack testing: need to look at event path due to event target rewrite for shadowDom elements; was not binding whether capture to click handler properly.  Test coverage for fixes to be added shortly

* update tests; instead of looking for shadowRoot boundary to update x/y offset, look for existence of event.path and use event.target which should match host element

* slight refactor for readability

* fix javadoc error

* Update amp-ad-network-doubleclick-impl.md

* Reverting doc changes

The previous change was made in error (wrong branch).

* changes in response to PR review

* update var substititions documentation

* make capture listener actually use capture!

* remove unnecessary else clause

* fix pull conflicts

* Fixes after full stack testing: need to look at event path due to event target rewrite for shadowDom elements; was not binding whether capture to click handler properly.  Test coverage for fixes to be added shortly

* update tests; instead of looking for shadowRoot boundary to update x/y offset, look for existence of event.path and use event.target which should match host element

* slight refactor for readability

* fix javadoc error

* changes in response to PR review

* update var substititions documentation

* make capture listener actually use capture!

* remove unnecessary else clause

* fix test failure due to issue after merge

* address PR comments

* Implement anchor href expand on document click with X/Y support

* Fixes after full stack testing: need to look at event path due to event target rewrite for shadowDom elements; was not binding whether capture to click handler properly.  Test coverage for fixes to be added shortly

* update tests; instead of looking for shadowRoot boundary to update x/y offset, look for existence of event.path and use event.target which should match host element

* slight refactor for readability

* fix javadoc error

* changes in response to PR review

* update var substititions documentation

* make capture listener actually use capture!

* remove unnecessary else clause

* fix pull conflicts

* Fixes after full stack testing: need to look at event path due to event target rewrite for shadowDom elements; was not binding whether capture to click handler properly.  Test coverage for fixes to be added shortly

* update tests; instead of looking for shadowRoot boundary to update x/y offset, look for existence of event.path and use event.target which should match host element

* slight refactor for readability

* changes in response to PR review

* fix test failure due to issue after merge

* Revert "reenable history tests (ampproject#4758)"

This reverts commit 1375883.

* Revert "Reverting doc changes"

This reverts commit 8d8c6dd.

* Revert "Small Validator Updates, including blacklisting __amp_source_origin for URLs. (ampproject#4781)"

This reverts commit bffeb2d.

* Revert "Remove video-id from the amp-youtube extension runtime. This attr had (ampproject#4507)"

This reverts commit 8d1799d.

* Revert unintentionally added files.

* Revert unintentionally added file.

* Fix test failure from latest merge

* Fix conflict and lint errors

* Fix lint errors, type check failures, and test failures
mityaha pushed a commit to brightcove-archive/ooyala_amphtml that referenced this pull request Nov 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants