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

factorial-pixel

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

factorial-pixel - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

7

__tests__/pixelUrl.spec.js

@@ -6,3 +6,2 @@ import pixelUrl from '../src/pixelUrl'

let dom
let host

@@ -13,3 +12,2 @@ describe('pixelUrl', () => {

html = "<!DOCTYPE html><html lang='en-es'></html>"
host = 'factorialhr.com'
dom = new JSDOM(html, {

@@ -19,3 +17,3 @@ url: 'https://factorialhr.com/blog?mc=123',

})
expect(pixelUrl(dom.window.document, host)).toEqual('https://factorialhr.com/api/internal/pixel?mc=123&referer=https://google.com/&language=en&landing_page=https://factorialhr.com/blog')
expect(pixelUrl(dom.window.document)).toEqual('https://factorialhr.com/api/internal/pixel?mc=123&referer=https://google.com/&language=en&landing_page=https://factorialhr.com/blog')
})

@@ -27,9 +25,8 @@ })

html = "<!DOCTYPE html><html lang='es'></html>"
host = 'staging.factorialhr.com'
dom = new JSDOM(html, {
url: 'https://staging.factorialhr.es/blog'
})
expect(pixelUrl(dom.window.document, host)).toEqual('https://staging.factorialhr.com/api/internal/pixel?mc=&referer=&language=es&landing_page=https://staging.factorialhr.es/blog')
expect(pixelUrl(dom.window.document)).toEqual('https://factorialhr.com/api/internal/pixel?mc=&referer=&language=es&landing_page=https://staging.factorialhr.es/blog')
})
})
})

@@ -77,6 +77,2 @@ var factorialPixel =

Object.defineProperty(exports, "__esModule", {
value: true
});
__webpack_require__(5);

@@ -94,4 +90,4 @@

exports.default = function (document, host) {
var url = (0, _pixelUrl2.default)(document, host);
document.addEventListener('DOMContentLoaded', function () {
var url = (0, _pixelUrl2.default)(document);

@@ -105,3 +101,3 @@ return fetch(url, { credentials: 'include' }).then(function (response) {

});
};
});

@@ -125,5 +121,3 @@ /***/ }),

exports.default = function (document, host) {
var protocol = document.location.protocol;
exports.default = function (document) {
var _requestParameters = (0, _requestParameters3.default)(document),

@@ -136,3 +130,3 @@ language = _requestParameters.language,

return protocol + '//' + host + '/api/internal/pixel?' + attributes;
return 'https://factorialhr.com/api/internal/pixel?' + attributes;
};

@@ -139,0 +133,0 @@

# Changelog
## `0.1.1`
Made pixel auto execute on dom loaded + hardcoded host
## `0.1.0`
First version

@@ -1,5 +0,5 @@

{"/Users/pauramonrevilla/Sites/factorial-pixel/src/index.js": {"path":"/Users/pauramonrevilla/Sites/factorial-pixel/src/index.js","statementMap":{"0":{"start":{"line":1,"column":13},"end":{"line":1,"column":75}},"1":{"start":{"line":1,"column":75},"end":{"line":1,"column":99}},"2":{"start":{"line":2,"column":16},"end":{"line":2,"column":37}},"3":{"start":{"line":2,"column":55},"end":{"line":2,"column":88}},"4":{"start":{"line":3,"column":19},"end":{"line":3,"column":43}},"5":{"start":{"line":3,"column":64},"end":{"line":3,"column":100}},"6":{"start":{"line":3,"column":139},"end":{"line":3,"column":193}},"7":{"start":{"line":3,"column":194},"end":{"line":16,"column":2}},"8":{"start":{"line":6,"column":12},"end":{"line":6,"column":51}},"9":{"start":{"line":8,"column":2},"end":{"line":15,"column":5}},"10":{"start":{"line":10,"column":4},"end":{"line":10,"column":27}},"11":{"start":{"line":12,"column":4},"end":{"line":12,"column":37}},"12":{"start":{"line":14,"column":4},"end":{"line":14,"column":22}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":3,"column":110},"end":{"line":3,"column":132}},"loc":{"start":{"line":3,"column":138},"end":{"line":3,"column":194}},"line":3},"1":{"name":"(anonymous_1)","decl":{"start":{"line":5,"column":0},"end":{"line":5,"column":1}},"loc":{"start":{"line":5,"column":26},"end":{"line":16,"column":1}},"line":5},"2":{"name":"(anonymous_2)","decl":{"start":{"line":9,"column":7},"end":{"line":9,"column":8}},"loc":{"start":{"line":9,"column":27},"end":{"line":11,"column":3}},"line":9},"3":{"name":"(anonymous_3)","decl":{"start":{"line":11,"column":10},"end":{"line":11,"column":11}},"loc":{"start":{"line":11,"column":26},"end":{"line":13,"column":3}},"line":11},"4":{"name":"(anonymous_4)","decl":{"start":{"line":13,"column":11},"end":{"line":13,"column":12}},"loc":{"start":{"line":13,"column":25},"end":{"line":15,"column":3}},"line":13}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":146},"end":{"line":3,"column":192}},"type":"cond-expr","locations":[{"start":{"line":3,"column":170},"end":{"line":3,"column":173}},{"start":{"line":3,"column":176},"end":{"line":3,"column":192}}],"line":3},"1":{"loc":{"start":{"line":3,"column":146},"end":{"line":3,"column":167}},"type":"binary-expr","locations":[{"start":{"line":3,"column":146},"end":{"line":3,"column":149}},{"start":{"line":3,"column":153},"end":{"line":3,"column":167}}],"line":3}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0},"b":{"0":[0,0],"1":[0,0]}}
,"/Users/pauramonrevilla/Sites/factorial-pixel/src/pixelUrl.js": {"path":"/Users/pauramonrevilla/Sites/factorial-pixel/src/pixelUrl.js","statementMap":{"0":{"start":{"line":4,"column":19},"end":{"line":4,"column":45}},"1":{"start":{"line":6,"column":36},"end":{"line":6,"column":63}},"2":{"start":{"line":7,"column":13},"end":{"line":7,"column":52}},"3":{"start":{"line":8,"column":21},"end":{"line":13,"column":13}},"4":{"start":{"line":15,"column":2},"end":{"line":15,"column":64}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":15},"end":{"line":3,"column":16}},"loc":{"start":{"line":3,"column":35},"end":{"line":16,"column":1}},"line":3}},"branchMap":{"0":{"loc":{"start":{"line":9,"column":10},"end":{"line":9,"column":25}},"type":"cond-expr","locations":[{"start":{"line":9,"column":15},"end":{"line":9,"column":20}},{"start":{"line":9,"column":23},"end":{"line":9,"column":25}}],"line":9}},"s":{"0":2,"1":2,"2":2,"3":2,"4":2},"f":{"0":2},"b":{"0":[1,1]},"_coverageSchema":"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c","hash":"3726dd162f0c42cb1d36a3d9583e5a01753e4fa1"}
{"/Users/pauramonrevilla/Sites/factorial-pixel/src/index.js": {"path":"/Users/pauramonrevilla/Sites/factorial-pixel/src/index.js","statementMap":{"0":{"start":{"line":1,"column":13},"end":{"line":1,"column":37}},"1":{"start":{"line":2,"column":16},"end":{"line":2,"column":37}},"2":{"start":{"line":2,"column":55},"end":{"line":2,"column":88}},"3":{"start":{"line":3,"column":19},"end":{"line":3,"column":43}},"4":{"start":{"line":3,"column":64},"end":{"line":3,"column":100}},"5":{"start":{"line":3,"column":139},"end":{"line":3,"column":193}},"6":{"start":{"line":5,"column":0},"end":{"line":16,"column":3}},"7":{"start":{"line":6,"column":12},"end":{"line":6,"column":45}},"8":{"start":{"line":8,"column":2},"end":{"line":15,"column":5}},"9":{"start":{"line":10,"column":4},"end":{"line":10,"column":27}},"10":{"start":{"line":12,"column":4},"end":{"line":12,"column":37}},"11":{"start":{"line":14,"column":4},"end":{"line":14,"column":22}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":3,"column":110},"end":{"line":3,"column":132}},"loc":{"start":{"line":3,"column":138},"end":{"line":3,"column":194}},"line":3},"1":{"name":"(anonymous_1)","decl":{"start":{"line":5,"column":46},"end":{"line":5,"column":47}},"loc":{"start":{"line":5,"column":58},"end":{"line":16,"column":1}},"line":5},"2":{"name":"(anonymous_2)","decl":{"start":{"line":9,"column":7},"end":{"line":9,"column":8}},"loc":{"start":{"line":9,"column":27},"end":{"line":11,"column":3}},"line":9},"3":{"name":"(anonymous_3)","decl":{"start":{"line":11,"column":10},"end":{"line":11,"column":11}},"loc":{"start":{"line":11,"column":26},"end":{"line":13,"column":3}},"line":11},"4":{"name":"(anonymous_4)","decl":{"start":{"line":13,"column":11},"end":{"line":13,"column":12}},"loc":{"start":{"line":13,"column":25},"end":{"line":15,"column":3}},"line":13}},"branchMap":{"0":{"loc":{"start":{"line":3,"column":146},"end":{"line":3,"column":192}},"type":"cond-expr","locations":[{"start":{"line":3,"column":170},"end":{"line":3,"column":173}},{"start":{"line":3,"column":176},"end":{"line":3,"column":192}}],"line":3},"1":{"loc":{"start":{"line":3,"column":146},"end":{"line":3,"column":167}},"type":"binary-expr","locations":[{"start":{"line":3,"column":146},"end":{"line":3,"column":149}},{"start":{"line":3,"column":153},"end":{"line":3,"column":167}}],"line":3}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0},"b":{"0":[0,0],"1":[0,0]}}
,"/Users/pauramonrevilla/Sites/factorial-pixel/src/pixelUrl.js": {"path":"/Users/pauramonrevilla/Sites/factorial-pixel/src/pixelUrl.js","statementMap":{"0":{"start":{"line":4,"column":36},"end":{"line":4,"column":63}},"1":{"start":{"line":5,"column":13},"end":{"line":5,"column":52}},"2":{"start":{"line":6,"column":21},"end":{"line":11,"column":13}},"3":{"start":{"line":13,"column":2},"end":{"line":13,"column":67}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":15},"end":{"line":3,"column":16}},"loc":{"start":{"line":3,"column":29},"end":{"line":14,"column":1}},"line":3}},"branchMap":{"0":{"loc":{"start":{"line":7,"column":10},"end":{"line":7,"column":25}},"type":"cond-expr","locations":[{"start":{"line":7,"column":15},"end":{"line":7,"column":20}},{"start":{"line":7,"column":23},"end":{"line":7,"column":25}}],"line":7}},"s":{"0":2,"1":2,"2":2,"3":2},"f":{"0":2},"b":{"0":[1,1]},"_coverageSchema":"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c","hash":"353fe97c97e88670dfa3b1eb36bf57f29228bf65"}
,"/Users/pauramonrevilla/Sites/factorial-pixel/src/requestParameters.js": {"path":"/Users/pauramonrevilla/Sites/factorial-pixel/src/requestParameters.js","statementMap":{"0":{"start":{"line":2,"column":18},"end":{"line":2,"column":54}},"1":{"start":{"line":3,"column":17},"end":{"line":3,"column":66}},"2":{"start":{"line":5,"column":2},"end":{"line":8,"column":3}}},"fnMap":{"0":{"name":"requestParameters","decl":{"start":{"line":1,"column":24},"end":{"line":1,"column":41}},"loc":{"start":{"line":1,"column":53},"end":{"line":9,"column":1}},"line":1}},"branchMap":{},"s":{"0":3,"1":3,"2":3},"f":{"0":3},"b":{},"_coverageSchema":"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c","hash":"de5372e174041251d52be76bd23fcc1c64eb8569"}
,"/Users/pauramonrevilla/Sites/factorial-pixel/src/storeCookie.js": {"path":"/Users/pauramonrevilla/Sites/factorial-pixel/src/storeCookie.js","statementMap":{"0":{"start":{"line":1,"column":13},"end":{"line":1,"column":75}},"1":{"start":{"line":1,"column":91},"end":{"line":1,"column":111}},"2":{"start":{"line":1,"column":129},"end":{"line":1,"column":162}},"3":{"start":{"line":1,"column":201},"end":{"line":1,"column":255}},"4":{"start":{"line":1,"column":256},"end":{"line":7,"column":2}},"5":{"start":{"line":4,"column":2},"end":{"line":6,"column":5}},"6":{"start":{"line":5,"column":4},"end":{"line":5,"column":43}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":1,"column":172},"end":{"line":1,"column":194}},"loc":{"start":{"line":1,"column":200},"end":{"line":1,"column":256}},"line":1},"1":{"name":"(anonymous_1)","decl":{"start":{"line":3,"column":0},"end":{"line":3,"column":1}},"loc":{"start":{"line":3,"column":16},"end":{"line":7,"column":1}},"line":3},"2":{"name":"(anonymous_2)","decl":{"start":{"line":4,"column":28},"end":{"line":4,"column":29}},"loc":{"start":{"line":4,"column":43},"end":{"line":6,"column":3}},"line":4}},"branchMap":{"0":{"loc":{"start":{"line":1,"column":208},"end":{"line":1,"column":254}},"type":"cond-expr","locations":[{"start":{"line":1,"column":232},"end":{"line":1,"column":235}},{"start":{"line":1,"column":238},"end":{"line":1,"column":254}}],"line":1},"1":{"loc":{"start":{"line":1,"column":208},"end":{"line":1,"column":229}},"type":"binary-expr","locations":[{"start":{"line":1,"column":208},"end":{"line":1,"column":211}},{"start":{"line":1,"column":215},"end":{"line":1,"column":229}}],"line":1}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0},"f":{"0":0,"1":0,"2":0},"b":{"0":[0,0],"1":[0,0]}}
}
{
"name": "factorial-pixel",
"version": "0.1.0",
"version": "0.1.1",
"description": "Factorial marketing pixel",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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