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
142
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.1 to 2.2.2

4

HISTORY.md

@@ -0,2 +1,6 @@

2.2.2 / 2019-11-26
==================
* Added support for page events with 3 option settings i.e. trackAllPages, trackNamedPages,trackCategorizedPages.
2.2.1 / 2019-08-09

@@ -3,0 +7,0 @@ ==================

@@ -20,2 +20,5 @@ 'use strict';

.option('debug', false)
.option('trackAllPages', false)
.option('trackNamedPages', false)
.option('trackCategorizedPages', false)
.tag(

@@ -101,2 +104,26 @@ '<script async src="https://www.fullstory.com/s/fs.js" crossorigin="anonymous"></script>'

/**
* Page.
*
* @api public
* @param {Page} page
*/
FullStory.prototype.page = function(page) {
var category = page.category();
var name = page.fullName();
var opts = this.options;
if (name && opts.trackNamedPages) {
// named pages
this.track(page.track(name));
} else if (category && opts.trackCategorizedPages) {
// categorized pages
this.track(page.track(category));
} else if (opts.trackAllPages) {
// all pages
this.track(page.track());
}
};
/**
* Track. Passes the events directly to FullStory via FS.event API.

@@ -103,0 +130,0 @@ *

4

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

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

},
"gitHead": "6a6a663cdef3ea6b8901d8cb18ad2963f7a19e85"
"gitHead": "5e3879d6978464ab6291c19e2afb251957050bd3"
}

@@ -14,3 +14,6 @@ 'use strict';

org: '1JO',
debug: false
debug: false,
trackAllPages: false,
trackNamedPages: false,
trackCategorizedPages: false
};

@@ -39,2 +42,5 @@

.option('debug', false)
.option('trackAllPages', false)
.option('trackNamedPages', false)
.option('trackCategorizedPages', false)
);

@@ -67,2 +73,3 @@ });

analytics.initialize();
analytics.page();
});

@@ -185,3 +192,42 @@

});
describe('#page', function() {
beforeEach(function() {
analytics.stub(window.FS, 'event');
});
it('should not track unnamed pages by default', function() {
analytics.page();
analytics.didNotCall(window.FS.event);
});
it('should track unnamed pages if enabled', function() {
fullstory.options.trackAllPages = true;
analytics.page();
analytics.called(window.FS.event, 'Loaded a Page');
});
it('should not track named pages by default', function() {
analytics.page('Name');
analytics.didNotCall(window.FS.event);
});
it('should track named pages if enabled', function() {
fullstory.options.trackNamedPages = true;
analytics.page('Name');
analytics.called(window.FS.event, 'Viewed Name Page');
});
it('should not track categorized pages by default', function() {
analytics.page('Category', 'Name');
analytics.didNotCall(window.FS.event);
});
it('should track categorized pages if enabled', function() {
fullstory.options.trackCategorizedPages = true;
analytics.page('Category', 'Name');
analytics.called(window.FS.event, 'Viewed Category Page');
});
});
});
});
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