MCPcopy Create free account
hub / github.com/ampproject/amphtml / sendBeacon_

Method sendBeacon_

third_party/subscriptions-project/swg.js:8161–8167  ·  view source on GitHub ↗

* A beacon is a rapid fire browser request that does not wait for a response * from the server. It is guaranteed to go out before the page redirects. * @param {!AnalyticsRequest} analyticsRequest

(analyticsRequest)

Source from the content-addressed store, hash-verified

8159 * @param {!AnalyticsRequest} analyticsRequest
8160 */
8161 sendBeacon_(analyticsRequest) {
8162 const pubId = encodeURIComponent(
8163 this.deps_.pageConfig().getPublicationId()
8164 );
8165 const url = serviceUrl('/publication/' + pubId + '/clientlogs');
8166 this.fetcher_.sendBeacon(url, analyticsRequest);
8167 }
8168}
8169
8170/**

Callers 1

handleClientEvent_Method · 0.95

Calls 4

serviceUrlFunction · 0.85
getPublicationIdMethod · 0.80
pageConfigMethod · 0.80
sendBeaconMethod · 0.45

Tested by

no test coverage detected