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

factorial-pixel

Package Overview
Dependencies
Maintainers
5
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.7.7 to 0.7.8

12

__tests__/pixelUrl.spec.js

@@ -56,2 +56,14 @@ import pixelUrl from '../src/pixelUrl'

})
describe('with fbclid', () => {
it('returns the data', () => {
html = "<!DOCTYPE html><html lang='es'></html>"
dom = new JSDOM(html, {
url: 'https://staging.factorialhr.es/blog?fbclid=123'
})
expect(pixelUrl(dom.window.document)).toEqual(
'/internal/pixel?mc=&referer=&language=es&landing_page=https://staging.factorialhr.es/blog&fbclid=123'
)
})
})
})

@@ -20,2 +20,7 @@ import requestParameters from '../src/requestParameters'

const domWithFbclid = new JSDOM(html, {
url: 'https://factorialhr.com/team/césar?fbclid=123',
referrer: 'https://google.com?query=cómo hacer nóminas'
})
describe('requestParameters', () => {

@@ -44,2 +49,10 @@ it('returns the data', () => {

})
it('returns the data with fbclid', () => {
expect(requestParameters(domWithFbclid.window.document)).toEqual({
landingPage: 'https://factorialhr.com/team/c%25C3%25A9sar',
language: 'en',
fbclid: '123'
})
})
})

10

build/app.js

@@ -122,3 +122,4 @@ var factorialPixel =

gclid = _requestParameters.gclid,
aclid = _requestParameters.aclid;
aclid = _requestParameters.aclid,
fbclid = _requestParameters.fbclid;

@@ -134,2 +135,5 @@ var mc = document.location.href.match(/mc=(.*)/);

}
if (fbclid) {
attributes.push('fbclid=' + fbclid);
}

@@ -178,2 +182,3 @@ return '/internal/pixel?' + attributes.join('&');

var aclid = findPropertyInParams(search, 'aclid');
var fbclid = findPropertyInParams(search, 'fbclid');

@@ -184,3 +189,4 @@ return {

gclid: gclid,
aclid: aclid
aclid: aclid,
fbclid: fbclid
};

@@ -187,0 +193,0 @@ }

4

CHANGELOG.md
# Changelog
## `0.7.8`
Adds tracking for FBCLID
## `0.7.7`

@@ -4,0 +8,0 @@

@@ -1,4 +0,4 @@

{"/Users/sergio/workspace/factorial/factorial-pixel/src/index.js": {"path":"/Users/sergio/workspace/factorial/factorial-pixel/src/index.js","statementMap":{"0":{"start":{"line":1,"column":29},"end":{"line":1,"column":50}},"1":{"start":{"line":1,"column":68},"end":{"line":1,"column":101}},"2":{"start":{"line":1,"column":140},"end":{"line":1,"column":194}},"3":{"start":{"line":9,"column":13},"end":{"line":9,"column":55}},"4":{"start":{"line":10,"column":19},"end":{"line":10,"column":69}},"5":{"start":{"line":11,"column":13},"end":{"line":11,"column":58}},"6":{"start":{"line":13,"column":10},"end":{"line":13,"column":39}},"7":{"start":{"line":14,"column":0},"end":{"line":14,"column":58}},"8":{"start":{"line":15,"column":0},"end":{"line":15,"column":14}},"9":{"start":{"line":16,"column":0},"end":{"line":16,"column":15}},"10":{"start":{"line":17,"column":0},"end":{"line":17,"column":28}},"11":{"start":{"line":18,"column":0},"end":{"line":18,"column":31}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":1,"column":111},"end":{"line":1,"column":133}},"loc":{"start":{"line":1,"column":139},"end":{"line":1,"column":195}},"line":1}},"branchMap":{"0":{"loc":{"start":{"line":1,"column":147},"end":{"line":1,"column":193}},"type":"cond-expr","locations":[{"start":{"line":1,"column":171},"end":{"line":1,"column":174}},{"start":{"line":1,"column":177},"end":{"line":1,"column":193}}],"line":1},"1":{"loc":{"start":{"line":1,"column":147},"end":{"line":1,"column":168}},"type":"binary-expr","locations":[{"start":{"line":1,"column":147},"end":{"line":1,"column":150}},{"start":{"line":1,"column":154},"end":{"line":1,"column":168}}],"line":1},"2":{"loc":{"start":{"line":10,"column":19},"end":{"line":10,"column":69}},"type":"cond-expr","locations":[{"start":{"line":10,"column":28},"end":{"line":10,"column":62}},{"start":{"line":10,"column":65},"end":{"line":10,"column":69}}],"line":10},"3":{"loc":{"start":{"line":11,"column":13},"end":{"line":11,"column":58}},"type":"binary-expr","locations":[{"start":{"line":11,"column":13},"end":{"line":11,"column":25}},{"start":{"line":11,"column":29},"end":{"line":11,"column":58}}],"line":11}},"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},"b":{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0]}}
,"/Users/sergio/workspace/factorial/factorial-pixel/src/pixelUrl.js": {"path":"/Users/sergio/workspace/factorial/factorial-pixel/src/pixelUrl.js","statementMap":{"0":{"start":{"line":4,"column":50},"end":{"line":4,"column":77}},"1":{"start":{"line":5,"column":13},"end":{"line":5,"column":52}},"2":{"start":{"line":6,"column":21},"end":{"line":11,"column":3}},"3":{"start":{"line":13,"column":2},"end":{"line":15,"column":3}},"4":{"start":{"line":14,"column":4},"end":{"line":14,"column":37}},"5":{"start":{"line":16,"column":2},"end":{"line":18,"column":3}},"6":{"start":{"line":17,"column":4},"end":{"line":17,"column":37}},"7":{"start":{"line":20,"column":2},"end":{"line":20,"column":50}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":15},"end":{"line":3,"column":16}},"loc":{"start":{"line":3,"column":27},"end":{"line":21,"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},"1":{"loc":{"start":{"line":13,"column":2},"end":{"line":15,"column":3}},"type":"if","locations":[{"start":{"line":13,"column":2},"end":{"line":15,"column":3}},{"start":{"line":13,"column":2},"end":{"line":15,"column":3}}],"line":13},"2":{"loc":{"start":{"line":16,"column":2},"end":{"line":18,"column":3}},"type":"if","locations":[{"start":{"line":16,"column":2},"end":{"line":18,"column":3}},{"start":{"line":16,"column":2},"end":{"line":18,"column":3}}],"line":16}},"s":{"0":4,"1":4,"2":4,"3":4,"4":1,"5":4,"6":1,"7":4},"f":{"0":4},"b":{"0":[1,3],"1":[1,3],"2":[1,3]},"_coverageSchema":"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c","hash":"d5fb59f7e09e7236ec4f3b08d5c37ef503905832"}
,"/Users/sergio/workspace/factorial/factorial-pixel/src/requestParameters.js": {"path":"/Users/sergio/workspace/factorial/factorial-pixel/src/requestParameters.js","statementMap":{"0":{"start":{"line":2,"column":14},"end":{"line":2,"column":16}},"1":{"start":{"line":4,"column":2},"end":{"line":8,"column":4}},"2":{"start":{"line":5,"column":25},"end":{"line":5,"column":41}},"3":{"start":{"line":7,"column":4},"end":{"line":7,"column":20}},"4":{"start":{"line":10,"column":2},"end":{"line":10,"column":22}},"5":{"start":{"line":14,"column":15},"end":{"line":14,"column":68}},"6":{"start":{"line":15,"column":17},"end":{"line":15,"column":54}},"7":{"start":{"line":16,"column":18},"end":{"line":16,"column":33}},"8":{"start":{"line":17,"column":17},"end":{"line":17,"column":66}},"9":{"start":{"line":18,"column":16},"end":{"line":18,"column":53}},"10":{"start":{"line":19,"column":16},"end":{"line":19,"column":53}},"11":{"start":{"line":21,"column":2},"end":{"line":26,"column":3}}},"fnMap":{"0":{"name":"findPropertyInParams","decl":{"start":{"line":1,"column":9},"end":{"line":1,"column":29}},"loc":{"start":{"line":1,"column":54},"end":{"line":11,"column":1}},"line":1},"1":{"name":"(anonymous_1)","decl":{"start":{"line":4,"column":28},"end":{"line":4,"column":29}},"loc":{"start":{"line":4,"column":37},"end":{"line":8,"column":3}},"line":4},"2":{"name":"requestParameters","decl":{"start":{"line":13,"column":24},"end":{"line":13,"column":41}},"loc":{"start":{"line":13,"column":53},"end":{"line":27,"column":1}},"line":13}},"branchMap":{"0":{"loc":{"start":{"line":1,"column":31},"end":{"line":1,"column":42}},"type":"default-arg","locations":[{"start":{"line":1,"column":40},"end":{"line":1,"column":42}}],"line":1}},"s":{"0":14,"1":14,"2":14,"3":14,"4":14,"5":7,"6":7,"7":7,"8":7,"9":7,"10":7,"11":7},"f":{"0":14,"1":14,"2":7},"b":{"0":[0]},"_coverageSchema":"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c","hash":"8e00355d96dc47533e4aa48791a2b6f16aabbb69"}
{"/Users/jorejasrojo/Dev/factorial-pixel/src/index.js": {"path":"/Users/jorejasrojo/Dev/factorial-pixel/src/index.js","statementMap":{"0":{"start":{"line":1,"column":29},"end":{"line":1,"column":50}},"1":{"start":{"line":1,"column":68},"end":{"line":1,"column":101}},"2":{"start":{"line":1,"column":140},"end":{"line":1,"column":194}},"3":{"start":{"line":9,"column":13},"end":{"line":9,"column":55}},"4":{"start":{"line":10,"column":19},"end":{"line":10,"column":69}},"5":{"start":{"line":11,"column":13},"end":{"line":11,"column":58}},"6":{"start":{"line":13,"column":10},"end":{"line":13,"column":39}},"7":{"start":{"line":14,"column":0},"end":{"line":14,"column":58}},"8":{"start":{"line":15,"column":0},"end":{"line":15,"column":14}},"9":{"start":{"line":16,"column":0},"end":{"line":16,"column":15}},"10":{"start":{"line":17,"column":0},"end":{"line":17,"column":28}},"11":{"start":{"line":18,"column":0},"end":{"line":18,"column":31}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":1,"column":111},"end":{"line":1,"column":133}},"loc":{"start":{"line":1,"column":139},"end":{"line":1,"column":195}},"line":1}},"branchMap":{"0":{"loc":{"start":{"line":1,"column":147},"end":{"line":1,"column":193}},"type":"cond-expr","locations":[{"start":{"line":1,"column":171},"end":{"line":1,"column":174}},{"start":{"line":1,"column":177},"end":{"line":1,"column":193}}],"line":1},"1":{"loc":{"start":{"line":1,"column":147},"end":{"line":1,"column":168}},"type":"binary-expr","locations":[{"start":{"line":1,"column":147},"end":{"line":1,"column":150}},{"start":{"line":1,"column":154},"end":{"line":1,"column":168}}],"line":1},"2":{"loc":{"start":{"line":10,"column":19},"end":{"line":10,"column":69}},"type":"cond-expr","locations":[{"start":{"line":10,"column":28},"end":{"line":10,"column":62}},{"start":{"line":10,"column":65},"end":{"line":10,"column":69}}],"line":10},"3":{"loc":{"start":{"line":11,"column":13},"end":{"line":11,"column":58}},"type":"binary-expr","locations":[{"start":{"line":11,"column":13},"end":{"line":11,"column":25}},{"start":{"line":11,"column":29},"end":{"line":11,"column":58}}],"line":11}},"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},"b":{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0]}}
,"/Users/jorejasrojo/Dev/factorial-pixel/src/pixelUrl.js": {"path":"/Users/jorejasrojo/Dev/factorial-pixel/src/pixelUrl.js","statementMap":{"0":{"start":{"line":4,"column":58},"end":{"line":6,"column":3}},"1":{"start":{"line":7,"column":13},"end":{"line":7,"column":52}},"2":{"start":{"line":8,"column":21},"end":{"line":13,"column":3}},"3":{"start":{"line":15,"column":2},"end":{"line":17,"column":3}},"4":{"start":{"line":16,"column":4},"end":{"line":16,"column":37}},"5":{"start":{"line":18,"column":2},"end":{"line":20,"column":3}},"6":{"start":{"line":19,"column":4},"end":{"line":19,"column":37}},"7":{"start":{"line":21,"column":2},"end":{"line":23,"column":3}},"8":{"start":{"line":22,"column":4},"end":{"line":22,"column":39}},"9":{"start":{"line":25,"column":2},"end":{"line":25,"column":50}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":15},"end":{"line":3,"column":16}},"loc":{"start":{"line":3,"column":27},"end":{"line":26,"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},"1":{"loc":{"start":{"line":15,"column":2},"end":{"line":17,"column":3}},"type":"if","locations":[{"start":{"line":15,"column":2},"end":{"line":17,"column":3}},{"start":{"line":15,"column":2},"end":{"line":17,"column":3}}],"line":15},"2":{"loc":{"start":{"line":18,"column":2},"end":{"line":20,"column":3}},"type":"if","locations":[{"start":{"line":18,"column":2},"end":{"line":20,"column":3}},{"start":{"line":18,"column":2},"end":{"line":20,"column":3}}],"line":18},"3":{"loc":{"start":{"line":21,"column":2},"end":{"line":23,"column":3}},"type":"if","locations":[{"start":{"line":21,"column":2},"end":{"line":23,"column":3}},{"start":{"line":21,"column":2},"end":{"line":23,"column":3}}],"line":21}},"s":{"0":5,"1":5,"2":5,"3":5,"4":1,"5":5,"6":1,"7":5,"8":1,"9":5},"f":{"0":5},"b":{"0":[1,4],"1":[1,4],"2":[1,4],"3":[1,4]},"_coverageSchema":"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c","hash":"fb393363fe44de259e9d059c218a4518decc5f1d"}
,"/Users/jorejasrojo/Dev/factorial-pixel/src/requestParameters.js": {"path":"/Users/jorejasrojo/Dev/factorial-pixel/src/requestParameters.js","statementMap":{"0":{"start":{"line":2,"column":14},"end":{"line":2,"column":16}},"1":{"start":{"line":4,"column":2},"end":{"line":8,"column":4}},"2":{"start":{"line":5,"column":25},"end":{"line":5,"column":41}},"3":{"start":{"line":7,"column":4},"end":{"line":7,"column":20}},"4":{"start":{"line":10,"column":2},"end":{"line":10,"column":22}},"5":{"start":{"line":14,"column":15},"end":{"line":14,"column":68}},"6":{"start":{"line":15,"column":17},"end":{"line":15,"column":54}},"7":{"start":{"line":16,"column":18},"end":{"line":16,"column":33}},"8":{"start":{"line":17,"column":17},"end":{"line":17,"column":66}},"9":{"start":{"line":18,"column":16},"end":{"line":18,"column":53}},"10":{"start":{"line":19,"column":16},"end":{"line":19,"column":53}},"11":{"start":{"line":20,"column":17},"end":{"line":20,"column":55}},"12":{"start":{"line":22,"column":2},"end":{"line":28,"column":3}}},"fnMap":{"0":{"name":"findPropertyInParams","decl":{"start":{"line":1,"column":9},"end":{"line":1,"column":29}},"loc":{"start":{"line":1,"column":54},"end":{"line":11,"column":1}},"line":1},"1":{"name":"(anonymous_1)","decl":{"start":{"line":4,"column":28},"end":{"line":4,"column":29}},"loc":{"start":{"line":4,"column":37},"end":{"line":8,"column":3}},"line":4},"2":{"name":"requestParameters","decl":{"start":{"line":13,"column":24},"end":{"line":13,"column":41}},"loc":{"start":{"line":13,"column":53},"end":{"line":29,"column":1}},"line":13}},"branchMap":{"0":{"loc":{"start":{"line":1,"column":31},"end":{"line":1,"column":42}},"type":"default-arg","locations":[{"start":{"line":1,"column":40},"end":{"line":1,"column":42}}],"line":1}},"s":{"0":27,"1":27,"2":27,"3":27,"4":27,"5":9,"6":9,"7":9,"8":9,"9":9,"10":9,"11":9,"12":9},"f":{"0":27,"1":27,"2":9},"b":{"0":[0]},"_coverageSchema":"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c","hash":"46d7b62ddc3597c8acb6a272065a0ce7197711bf"}
}
{
"name": "factorial-pixel",
"version": "0.7.7",
"version": "0.7.8",
"description": "Factorial marketing pixel",

@@ -38,3 +38,3 @@ "repository": {

"eslint-config-standard": "^10.2.1",
"eslint-plugin-import": "^2.3.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-node": "^5.0.0",

@@ -45,2 +45,3 @@ "eslint-plugin-promise": "^3.5.0",

"jest": "^20.0.4",
"jest-jasmine2": "^29.7.0",
"jsdom": "11.0.0",

@@ -47,0 +48,0 @@ "lint-staged": "^3.6.0",

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