New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@segment/analytics.js-integration-fullstory

Package Overview
Dependencies
Maintainers
135
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@segment/analytics.js-integration-fullstory - npm Package Compare versions

Comparing version 2.2.3 to 3.0.0

13

HISTORY.md

@@ -0,1 +1,14 @@

3.0.0 / 2020-12-11
==================
* Update snippet to the most recent version, including new setVars and anonymize functionality.
* Now use setVars API to track pages in FullStory.
* A new setting, trackPagesWithEvents has been added to allow tracking via events in addition to the new behavior, to support the transition. This defaults to true.
2.2.4 / 2020-04-02
==================
* Add missing definition of window._fs_script
* Add a line missing from the end of the snippet
2.2.3 / 2020-02-17

@@ -2,0 +15,0 @@ ==================

33

lib/index.js

@@ -23,2 +23,3 @@ 'use strict';

.option('trackCategorizedPages', false)
.option('trackPagesWithEvents', true)
.tag(

@@ -41,2 +42,3 @@ '<script async src="https://edge.fullstory.com/s/fs.js" crossorigin="anonymous"></script>'

window._fs_host = 'fullstory.com';
window._fs_script = 'edge.fullstory.com/s/fs.js';
window._fs_org = this.options.org;

@@ -52,9 +54,12 @@ window._fs_namespace = 'FS';

g.identify=function(i,v,s){g(l,{uid:i},s);if(v)g(l,v,s)};g.setUserVars=function(v,s){g(l,v,s)};g.event=function(i,v,s){g('event',{n:i,p:v},s)};
g.anonymize=function(){g.identify(!!0)};
g.shutdown=function(){g("rec",!1)};g.restart=function(){g("rec",!0)};
g.log = function(a,b) { g("log", [a,b]) };
g.log = function(a,b){g("log",[a,b])};
g.consent=function(a){g("consent",!arguments.length||a)};
g.identifyAccount=function(i,v){o='account';v=v||{};v.acctId=i;g(o,v)};
g.clearUserCookie=function(){};
g.setVars=function(n, p){g('setVars',[n,p]);};
g._w={};y='XMLHttpRequest';g._w[y]=m[y];y='fetch';g._w[y]=m[y];
if(m[y])m[y]=function(){return g._w[y].apply(this,arguments)};
g._v="1.3.0";
})(window,document,window['_fs_namespace'],'script','user');

@@ -118,12 +123,32 @@ /* eslint-enable */

var opts = this.options;
var trackProps = page.track().properties();
if (name && opts.trackNamedPages) {
// named pages
this.track(page.track(name));
if (opts.trackPagesWithEvents) {
this.track(page.track(name));
}
window.FS.setVars(
'page',
Object.assign(trackProps, { pageName: name }),
apiSource
);
} else if (category && opts.trackCategorizedPages) {
// categorized pages
this.track(page.track(category));
if (opts.trackPagesWithEvents) {
this.track(page.track(category));
}
window.FS.setVars(
'page',
Object.assign(trackProps, { pageName: category }),
apiSource
);
} else if (opts.trackAllPages) {
// all pages
this.track(page.track());
if (opts.trackPagesWithEvents) {
this.track(page.track());
}
window.FS.setVars('page', trackProps, apiSource);
}

@@ -130,0 +155,0 @@ };

4

package.json
{
"name": "@segment/analytics.js-integration-fullstory",
"description": "The Fullstory analytics.js integration.",
"version": "2.2.3",
"version": "3.0.0",
"keywords": [

@@ -49,3 +49,3 @@ "analytics.js",

},
"gitHead": "6705f8c71eec21b88f91d8e6c891f7a47fe120e8"
"gitHead": "e275cbae3cf0cb3ed70ae9e2f7f689b3f97ffe69"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc