@fullstory/browser 1.6.2 → 1.7.0

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/CHANGELOG.md CHANGED
@@ -1,8 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.7.0
4
+
5
+ - Add a `cookieDomain` option to the `init` function to support setting `_fs_cookie_domain`.
6
+
3
7
  ## 1.6.2
4
8
 
5
- - Load `fs-debug.js` capture script when `debug = true` option is used to match updated debug logging practices.
9
+ - Load `fs-debug.js` capture script when `debug = true` option is used to match [updated debug logging practices](https://help.fullstory.com/hc/en-us/articles/360020829233-What-is-fs-debug-).
6
10
 
7
11
  ## 1.6.1
8
12
 
package/README.md CHANGED
@@ -31,6 +31,7 @@ The only required option is `orgId`, all others are optional.
31
31
  * `host` - The recording server host domain. Can be set to direct recorded events to a proxy that you host. Defaults to `fullstory.com`.
32
32
  * `script` - FullStory script host domain. FullStory hosts the `fs.js` recording script on a CDN, but you can choose to host a copy yourself. Defaults to `edge.fullstory.com`.
33
33
  * `namespace` - Sets the global identifier for FullStory when conflicts with `FS` arise; see [help](https://help.fullstory.com/hc/en-us/articles/360020624694-What-if-the-identifier-FS-is-used-by-another-script-on-my-site-).
34
+ * `cookieDomain` - Overrides the cookie domain. By default, cookies will be valid for all subdomains of your site; if you want to limit the cookies to a specific subdomain, you can set the domain value explicitly. More information can be found [here](https://help.fullstory.com/hc/en-us/articles/360020622874-Can-the-FullStory-cookie-be-associated-with-a-specific-subdomain-).
34
35
  * `recordCrossDomainIFrames` - Defaults to `false`. FullStory can record cross-domain iFrames if: 1. The FullStory Browser SDK is running in the cross-domain iFrame and 2. `recordCrossDomainIFrames` is set to `true` in the cross-domain iFrame and 3. The FullStory Browser SDK is running in the parent page of the cross-domain iFrame. Click [here](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy) for a detailed explanation of what "cross-domain" means. Before using, you should understand the security implications, and configure your [Content Security Policy](https://www.html5rocks.com/en/tutorials/security/content-security-policy/) (CSP) HTTP headers accordingly - specifically the frame-ancestors directive. Failure to configure your CSP headers while using this setting can bypass IFrames security protections that are included in modern browsers. More information about cross-domain iFrame recording can be found on our [Knowledge Base](https://help.fullstory.com/hc/en-us/articles/360020622514-Can-FullStory-capture-content-that-is-presented-in-iframes-#2-the-outer-page-is-running-fullstory-and-you-have-iframes-runni). Note: the `recordCrossDomainIFrames` parameter is the same as the `window['_fs_run_in_iframe']` referenced in the KB article.
35
36
  * `recordOnlyThisIFrame` - When set to `true`, this tells FullStory that the IFrame is the "root" of the recording and should be its own session; defaults to `false`. Use this when your app is embedded in an IFrame on a site not running FullStory or when the site *is* running FullStory, but you want your content sent to a different FullStory org.
36
37
  * `devMode` - Set to `true` if you want to deactivate FullStory in your development environment. When set to `true`, FullStory will shutdown recording and all subsequent SDK method calls will be no-ops. At the time `init` is called with `devMode: true`, a single `event` call will be sent to FullStory to indicate that the SDK is in `devMode`; this is to help trouble-shoot the case that the SDK was accidentally set to `devMode: true` in a production environment. Additionally, any calls to SDK methods will `console.warn` that FullStory is in `devMode`. Defaults to `false`.
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@
6
6
  * - debug: Debug mode with extra browser console logging.
7
7
  * - host: The recording server host domain. Can be set to direct recorded events to a proxy that you host. Defaults to `fullstory.com`.
8
8
  * - script: FullStory script host domain. FullStory hosts the `fs.js` recording script on a CDN, but you can choose to host a copy yourself. Defaults to `edge.fullstory.com`.
9
+ * - cookieDomain: Overrides the cookie domain. By default, cookies will be valid for all subdomains of your site; if you want to limit the cookies to a specific subdomain, you can set the domain value explicitly. More information can be found [here](https://help.fullstory.com/hc/en-us/articles/360020622874-Can-the-FullStory-cookie-be-associated-with-a-specific-subdomain-).
9
10
  * - recordCrossDomainIFrames: FullStory can record cross-domain iFrames. Defaults to `false`. Certain limitations apply and can be found [here](https://help.fullstory.com/hc/en-us/articles/360020622514-Can-FullStory-capture-content-that-is-presented-in-iframes-#h_01F1G333PYKPGZ4B42WDBV3YKV).
10
11
  * - recordOnlyThisIFrame: FullStory can record the iFrame as its own unique session. Defaults to `false`. Additional conditions apply and can be found [here](https://help.fullstory.com/hc/en-us/articles/360020622514-Can-FullStory-capture-content-that-is-presented-in-iframes-#h_01F1G33B40Q2TPQA8MA7SF8Y5P).
11
12
  * - devMode: In dev mode FullStory won't record sessions. Any calls to SDK methods will `console.warn` that FullStory is in `devMode`. Defaults to `false`.
@@ -16,6 +17,7 @@ interface SnippetOptions {
16
17
  debug?: boolean;
17
18
  host?: string;
18
19
  script?: string;
20
+ cookieDomain?: string;
19
21
  recordCrossDomainIFrames?: boolean;
20
22
  recordOnlyThisIFrame?: boolean;
21
23
  devMode?: boolean;
package/dist/index.esm.js CHANGED
@@ -212,6 +212,10 @@ var _init = function _init(inputOptions, readyCallback) {
212
212
  window._fs_is_outer_script = true;
213
213
  }
214
214
 
215
+ if (options.cookieDomain) {
216
+ window._fs_cookie_domain = options.cookieDomain;
217
+ }
218
+
215
219
  if (options.debug === true) {
216
220
  if (!options.script) {
217
221
  options.script = 'edge.fullstory.com/s/fs-debug.js';
package/dist/index.js CHANGED
@@ -216,6 +216,10 @@ var _init = function _init(inputOptions, readyCallback) {
216
216
  window._fs_is_outer_script = true;
217
217
  }
218
218
 
219
+ if (options.cookieDomain) {
220
+ window._fs_cookie_domain = options.cookieDomain;
221
+ }
222
+
219
223
  if (options.debug === true) {
220
224
  if (!options.script) {
221
225
  options.script = 'edge.fullstory.com/s/fs-debug.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullstory/browser",
3
- "version": "1.6.2",
3
+ "version": "1.7.0",
4
4
  "description": "The official FullStory browser SDK",
5
5
  "repository": "git://github.com/fullstorydev/fullstory-browser-sdk.git",
6
6
  "homepage": "https://github.com/fullstorydev/fullstory-browser-sdk",
package/src/index.d.ts CHANGED
@@ -6,6 +6,7 @@
6
6
  * - debug: Debug mode with extra browser console logging.
7
7
  * - host: The recording server host domain. Can be set to direct recorded events to a proxy that you host. Defaults to `fullstory.com`.
8
8
  * - script: FullStory script host domain. FullStory hosts the `fs.js` recording script on a CDN, but you can choose to host a copy yourself. Defaults to `edge.fullstory.com`.
9
+ * - cookieDomain: Overrides the cookie domain. By default, cookies will be valid for all subdomains of your site; if you want to limit the cookies to a specific subdomain, you can set the domain value explicitly. More information can be found [here](https://help.fullstory.com/hc/en-us/articles/360020622874-Can-the-FullStory-cookie-be-associated-with-a-specific-subdomain-).
9
10
  * - recordCrossDomainIFrames: FullStory can record cross-domain iFrames. Defaults to `false`. Certain limitations apply and can be found [here](https://help.fullstory.com/hc/en-us/articles/360020622514-Can-FullStory-capture-content-that-is-presented-in-iframes-#h_01F1G333PYKPGZ4B42WDBV3YKV).
10
11
  * - recordOnlyThisIFrame: FullStory can record the iFrame as its own unique session. Defaults to `false`. Additional conditions apply and can be found [here](https://help.fullstory.com/hc/en-us/articles/360020622514-Can-FullStory-capture-content-that-is-presented-in-iframes-#h_01F1G33B40Q2TPQA8MA7SF8Y5P).
11
12
  * - devMode: In dev mode FullStory won't record sessions. Any calls to SDK methods will `console.warn` that FullStory is in `devMode`. Defaults to `false`.
@@ -16,6 +17,7 @@ interface SnippetOptions {
16
17
  debug?: boolean;
17
18
  host?: string;
18
19
  script?: string;
20
+ cookieDomain?: string;
19
21
  recordCrossDomainIFrames?: boolean;
20
22
  recordOnlyThisIFrame?: boolean;
21
23
  devMode?: boolean;
package/src/index.js CHANGED
@@ -57,6 +57,11 @@ const _init = (inputOptions, readyCallback) => {
57
57
  window._fs_is_outer_script = true;
58
58
  }
59
59
 
60
+ // Set cookie domain if it was specified.
61
+ if (options.cookieDomain) {
62
+ window._fs_cookie_domain = options.cookieDomain;
63
+ }
64
+
60
65
  if (options.debug === true) {
61
66
  if (!options.script) {
62
67
  options.script = 'edge.fullstory.com/s/fs-debug.js';