UNPKG

@segment/analytics-next

Version:

Analytics Next (aka Analytics 2.0) is the latest version of Segment’s JavaScript SDK - enabling you to send your data to any tool without having to learn, test, or use a new API every time.

18 lines 611 B
// This variable is used as an optional fallback for when customers // host or proxy their own analytics.js. try { window.analyticsWriteKey = '__WRITE_KEY__'; } catch (_) { // @ eslint-disable-next-line } export function embeddedWriteKey() { if (window.analyticsWriteKey === undefined) { return undefined; } // this is done so that we don't accidentally override every reference to __write_key__ return window.analyticsWriteKey !== ['__', 'WRITE', '_', 'KEY', '__'].join('') ? window.analyticsWriteKey : undefined; } //# sourceMappingURL=embedded-write-key.js.map