posthog-js 1.84.1 → 1.84.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/array.full.js +2 -2
- package/dist/array.full.js.map +1 -1
- package/dist/array.js +2 -2
- package/dist/array.js.map +1 -1
- package/dist/es.js +2 -2
- package/dist/es.js.map +1 -1
- package/dist/module.js +2 -2
- package/dist/module.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/src/posthog-core.js +4 -4
- package/lib/src/posthog-core.js.map +1 -1
- package/lib/src/utils.d.ts +1 -0
- package/lib/src/utils.js +10 -0
- package/lib/src/utils.js.map +1 -1
- package/package.json +1 -1
package/lib/package.json
CHANGED
package/lib/src/posthog-core.js
CHANGED
|
@@ -35,7 +35,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
35
35
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
36
36
|
};
|
|
37
37
|
import Config from './config';
|
|
38
|
-
import { _copyAndTruncateStrings, _each, _eachArray, _extend, _info, _isArray, _isBlockedUA, _isEmptyObject, _isObject, _isUndefined, _register_event, _safewrap_class, document, userAgent, window, logger, } from './utils';
|
|
38
|
+
import { _copyAndTruncateStrings, _each, _eachArray, _extend, _info, _isArray, _isBlockedUA, _isEmptyObject, _isObject, _isUndefined, _register_event, _safewrap_class, document, userAgent, window, logger, isCrossDomainCookie, } from './utils';
|
|
39
39
|
import { autocapture } from './autocapture';
|
|
40
40
|
import { PostHogFeatureFlags } from './posthog-featureflags';
|
|
41
41
|
import { PostHogPersistence } from './posthog-persistence';
|
|
@@ -90,7 +90,7 @@ var USE_XHR = window.XMLHttpRequest && 'withCredentials' in new XMLHttpRequest()
|
|
|
90
90
|
// should only be true for Opera<12
|
|
91
91
|
var ENQUEUE_REQUESTS = !USE_XHR && userAgent.indexOf('MSIE') === -1 && userAgent.indexOf('Mozilla') === -1;
|
|
92
92
|
var defaultConfig = function () {
|
|
93
|
-
var _a
|
|
93
|
+
var _a;
|
|
94
94
|
return ({
|
|
95
95
|
api_host: 'https://app.posthog.com',
|
|
96
96
|
api_method: 'POST',
|
|
@@ -99,7 +99,7 @@ var defaultConfig = function () {
|
|
|
99
99
|
token: '',
|
|
100
100
|
autocapture: true,
|
|
101
101
|
rageclick: true,
|
|
102
|
-
cross_subdomain_cookie: (
|
|
102
|
+
cross_subdomain_cookie: isCrossDomainCookie(document === null || document === void 0 ? void 0 : document.location),
|
|
103
103
|
persistence: 'cookie',
|
|
104
104
|
persistence_name: '',
|
|
105
105
|
cookie_name: '',
|
|
@@ -118,7 +118,7 @@ var defaultConfig = function () {
|
|
|
118
118
|
disable_persistence: false,
|
|
119
119
|
disable_cookie: false,
|
|
120
120
|
enable_recording_console_log: undefined,
|
|
121
|
-
secure_cookie: ((
|
|
121
|
+
secure_cookie: ((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.protocol) === 'https:',
|
|
122
122
|
ip: true,
|
|
123
123
|
opt_out_capturing_by_default: false,
|
|
124
124
|
opt_out_persistence_by_default: false,
|