Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@asayerio/analytics.js-integration-asayer

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asayerio/analytics.js-integration-asayer - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

12

lib/index.js

@@ -7,14 +7,14 @@ 'use strict'

.global('asayer')
.option('sid', null)
.option('siteId', null)
.tag('<script src="https://static.asayer.io/asayer.js" data-asayer-ns="asayer"></script>')
Asayer.prototype.initialize = function () {
var sid = Number(this.options.sid)
var siteId = Number(this.options.siteId)
if (this.options.sid === null || isNaN(sid)) {
console.warn('Asayer wrong sid option, not loading.')
if (this.options.siteId === null || isNaN(siteId)) {
console.warn('Asayer wrong siteId option, not loading.')
return
}
var r = [sid]
var r = [siteId]
var asayer = window.asayer = { r: r }

@@ -24,2 +24,4 @@ asayer.start = function (v) { r.push([0]) }

asayer.event = function (t, p) { r.push([2, t, p]) }
asayer.id = Function.prototype
asayer.started = function () { return false }

@@ -26,0 +28,0 @@ this.load(this.ready)

{
"name": "@asayerio/analytics.js-integration-asayer",
"description": "The Asayer analytics.js integration.",
"version": "1.0.0",
"version": "1.0.1",
"keywords": [

@@ -6,0 +6,0 @@ "analytics.js",

@@ -26,3 +26,3 @@ 'use strict'

it('should call #load', function () {
asayer = new Asayer({ 'sid': '1234' })
asayer = new Asayer({ 'siteId': '1234' })
analytics.use(Asayer)

@@ -35,4 +35,4 @@ analytics.add(asayer)

it('should not call #load for wrong sid', function () {
asayer = new Asayer({ 'sid': 'wrong' })
it('should not call #load for wrong siteId', function () {
asayer = new Asayer({ 'siteId': 'wrong' })
analytics.use(Asayer)

@@ -48,3 +48,3 @@ analytics.add(asayer)

beforeEach(function (done) {
asayer = new Asayer({ 'sid': '1234' })
asayer = new Asayer({ 'siteId': '1234' })
analytics.use(Asayer)

@@ -51,0 +51,0 @@ analytics.add(asayer)

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