This repository has been archived by the owner on Sep 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
platinum-sw-offline-analytics.d.ts
52 lines (49 loc) · 2.08 KB
/
platinum-sw-offline-analytics.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* platinum-sw-offline-analytics.html
*/
/// <reference path="../polymer/types/polymer.d.ts" />
/**
* The `<platinum-sw-offline-analytics>` element registers a service worker
* handler to intercept requests for Google Analytics pings.
*
* If the HTTP GET for the ping is successful (because the browser is online),
* then everything proceeds as it normally would. If the HTTP GET fails, the
* ping request is saved to IndexedDB, and each time the service worker script
* starts up it will attempt to "replay" those saved ping requests, giving up
* after one day has passed.
*
* The
* [`qt`](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#qt)
* URL parameter is automatically added to the replayed HTTP GET and set to the
* number of milliseconds that has passed since the initial ping request was
* attempted, to ensure that the original time attribution is correct.
*
* `<platinum-sw-offline-analytics>` does not take care of setting up Google
* Analytics on your page, and assumes that you have [properly
* configured](https://support.google.com/analytics/answer/1008080) the Google
* Analytics tracking code registered elsewhere on your page.
*
* Since `<platinum-sw-offline-analytics>` is only useful if the page that is
* being tracked with Google Analytics works offline, it's best used in
* conjunction with the `<platinum-sw-cache>` element, which takes care of
* caching your site's resources and serving them while offline.
*
* A basic configuration is
*
* <platinum-sw-register auto-register>
* <platinum-sw-offline-analytics></platinum-sw-offline-analytics>
* <platinum-sw-cache></platinum-sw-cache>
* </platinum-sw-register>
*/
interface PlatinumSwOfflineAnalyticsElement extends Polymer.Element {
_getParameters(baseURI: any): any;
}
interface HTMLElementTagNameMap {
"platinum-sw-offline-analytics": PlatinumSwOfflineAnalyticsElement;
}