@fullstory/browser 2.0.0-beta.0 → 2.0.0-beta.3

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/README.md CHANGED
@@ -35,6 +35,8 @@ The only required option is `orgId`, all others are optional.
35
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.
36
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.
37
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`.
38
+ * `startCaptureManually` - Set to `true` if you want to start capture manually using `FS('start')`. FullStory will load but wait for a call to `FS('start')` to begin capturing. See [Manually Delay Data Capture](https://developer.fullstory.com/browser/v2/auto-capture/capture-data/#manually-delay-data-capture) for more information. Defaults to `false`.
39
+ * `assetMapId` - Use this to set the current asset map id. See [Asset Uploading for Web](https://help.fullstory.com/hc/en-us/articles/4404129191575-Asset-Uploading-for-Web) for more information.
38
40
 
39
41
  ### Ready Callback
40
42
 
package/dist/index.d.ts CHANGED
@@ -14,14 +14,16 @@ import { FSApi } from '@fullstory/snippet';
14
14
  */
15
15
  export interface SnippetOptions {
16
16
  orgId: string;
17
- namespace?: string;
17
+ assetMapId?: string;
18
+ cookieDomain?: string;
18
19
  debug?: boolean;
20
+ devMode?: boolean;
19
21
  host?: string;
20
- script?: string;
21
- cookieDomain?: string;
22
+ namespace?: string;
22
23
  recordCrossDomainIFrames?: boolean;
23
24
  recordOnlyThisIFrame?: boolean;
24
- devMode?: boolean;
25
+ script?: string;
26
+ startCaptureManually?: boolean;
25
27
  }
26
28
  /**
27
29
  * A callback that will be invoked when FullStory has begun a session.
@@ -35,6 +37,8 @@ type ReadyCallback = (data: {
35
37
  }) => void;
36
38
  declare global {
37
39
  interface Window {
40
+ _fs_asset_map_id?: string;
41
+ _fs_capture_on_startup?: boolean;
38
42
  _fs_cookie_domain?: string;
39
43
  _fs_debug?: boolean;
40
44
  _fs_dev_mode?: boolean;
package/dist/index.esm.js CHANGED
@@ -50,6 +50,12 @@ var _init = function (inputOptions, readyCallback) {
50
50
  if (options.recordCrossDomainIFrames) {
51
51
  window._fs_run_in_iframe = true;
52
52
  }
53
+ if (options.assetMapId) {
54
+ window._fs_asset_map_id = options.assetMapId;
55
+ }
56
+ if (options.startCaptureManually) {
57
+ window._fs_capture_on_startup = false;
58
+ }
53
59
  // record the contents of this iFrame when embedded in a parent site
54
60
  if (options.recordOnlyThisIFrame) {
55
61
  window._fs_is_outer_script = true;
package/dist/index.js CHANGED
@@ -52,6 +52,12 @@ var _init = function (inputOptions, readyCallback) {
52
52
  if (options.recordCrossDomainIFrames) {
53
53
  window._fs_run_in_iframe = true;
54
54
  }
55
+ if (options.assetMapId) {
56
+ window._fs_asset_map_id = options.assetMapId;
57
+ }
58
+ if (options.startCaptureManually) {
59
+ window._fs_capture_on_startup = false;
60
+ }
55
61
  // record the contents of this iFrame when embedded in a parent site
56
62
  if (options.recordOnlyThisIFrame) {
57
63
  window._fs_is_outer_script = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullstory/browser",
3
- "version": "2.0.0-beta.0",
3
+ "version": "2.0.0-beta.3",
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",
@@ -26,7 +26,7 @@
26
26
  "sdk"
27
27
  ],
28
28
  "dependencies": {
29
- "@fullstory/snippet": "2.0.0-beta.2"
29
+ "@fullstory/snippet": "2.0.0-beta.3"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@babel/core": "^7.8.7",
package/src/index.ts CHANGED
@@ -15,14 +15,16 @@ import { initFS, FSApi } from '@fullstory/snippet';
15
15
  */
16
16
  export interface SnippetOptions {
17
17
  orgId: string;
18
- namespace?: string;
18
+ assetMapId?: string;
19
+ cookieDomain?: string;
19
20
  debug?: boolean;
21
+ devMode?: boolean;
20
22
  host?: string;
21
- script?: string;
22
- cookieDomain?: string;
23
+ namespace?: string;
23
24
  recordCrossDomainIFrames?: boolean;
24
25
  recordOnlyThisIFrame?: boolean;
25
- devMode?: boolean;
26
+ script?: string;
27
+ startCaptureManually?: boolean;
26
28
  }
27
29
 
28
30
  /**
@@ -35,6 +37,8 @@ type ReadyCallback = (data: { sessionUrl: string, settings: Readonly<object> })
35
37
 
36
38
  declare global {
37
39
  interface Window {
40
+ _fs_asset_map_id?: string;
41
+ _fs_capture_on_startup?: boolean;
38
42
  _fs_cookie_domain?: string;
39
43
  _fs_debug?: boolean;
40
44
  _fs_dev_mode?: boolean;
@@ -79,6 +83,14 @@ const _init = (inputOptions: SnippetOptions, readyCallback?: ReadyCallback) => {
79
83
  window._fs_run_in_iframe = true;
80
84
  }
81
85
 
86
+ if (options.assetMapId) {
87
+ window._fs_asset_map_id = options.assetMapId;
88
+ }
89
+
90
+ if (options.startCaptureManually) {
91
+ window._fs_capture_on_startup = false;
92
+ }
93
+
82
94
  // record the contents of this iFrame when embedded in a parent site
83
95
  if (options.recordOnlyThisIFrame) {
84
96
  window._fs_is_outer_script = true;