constants.js 933 B

123456789101112131415161718192021
  1. /*
  2. Copyright 2018 Google LLC
  3. Use of this source code is governed by an MIT-style
  4. license that can be found in the LICENSE file or at
  5. https://opensource.org/licenses/MIT.
  6. */
  7. import '../_version.js';
  8. export const QUEUE_NAME = 'workbox-google-analytics';
  9. export const MAX_RETENTION_TIME = 60 * 48; // Two days in minutes
  10. export const GOOGLE_ANALYTICS_HOST = 'www.google-analytics.com';
  11. export const GTM_HOST = 'www.googletagmanager.com';
  12. export const ANALYTICS_JS_PATH = '/analytics.js';
  13. export const GTAG_JS_PATH = '/gtag/js';
  14. export const GTM_JS_PATH = '/gtm.js';
  15. export const COLLECT_DEFAULT_PATH = '/collect';
  16. // This RegExp matches all known Measurement Protocol single-hit collect
  17. // endpoints. Most of the time the default path (/collect) is used, but
  18. // occasionally an experimental endpoint is used when testing new features,
  19. // (e.g. /r/collect or /j/collect)
  20. export const COLLECT_PATHS_REGEX = /^\/(\w+\/)?collect/;