factorial-pixel 0.7.7 → 0.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/__tests__/pixelUrl.spec.js +12 -0
- package/__tests__/requestParameters.spec.js +13 -0
- package/build/app.js +8 -2
- package/coverage/clover.xml +31 -28
- package/coverage/coverage-final.json +3 -3
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/index.js.html +1 -1
- package/coverage/lcov-report/pixelUrl.js.html +24 -9
- package/coverage/lcov-report/requestParameters.js.html +21 -15
- package/coverage/lcov.info +44 -39
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -53,4 +53,16 @@ describe('pixelUrl', () => {
|
|
|
53
53
|
)
|
|
54
54
|
})
|
|
55
55
|
})
|
|
56
|
+
|
|
57
|
+
describe('with fbclid', () => {
|
|
58
|
+
it('returns the data', () => {
|
|
59
|
+
html = "<!DOCTYPE html><html lang='es'></html>"
|
|
60
|
+
dom = new JSDOM(html, {
|
|
61
|
+
url: 'https://staging.factorialhr.es/blog?fbclid=123'
|
|
62
|
+
})
|
|
63
|
+
expect(pixelUrl(dom.window.document)).toEqual(
|
|
64
|
+
'/internal/pixel?mc=&referer=&language=es&landing_page=https://staging.factorialhr.es/blog&fbclid=123'
|
|
65
|
+
)
|
|
66
|
+
})
|
|
67
|
+
})
|
|
56
68
|
})
|
|
@@ -17,6 +17,11 @@ const domWithAclid = new JSDOM(html, {
|
|
|
17
17
|
referrer: 'https://google.com?query=cómo hacer nóminas'
|
|
18
18
|
})
|
|
19
19
|
|
|
20
|
+
const domWithFbclid = new JSDOM(html, {
|
|
21
|
+
url: 'https://factorialhr.com/team/césar?fbclid=123',
|
|
22
|
+
referrer: 'https://google.com?query=cómo hacer nóminas'
|
|
23
|
+
})
|
|
24
|
+
|
|
20
25
|
describe('requestParameters', () => {
|
|
21
26
|
it('returns the data', () => {
|
|
22
27
|
expect(requestParameters(dom.window.document)).toEqual({
|
|
@@ -40,4 +45,12 @@ describe('requestParameters', () => {
|
|
|
40
45
|
aclid: '123'
|
|
41
46
|
})
|
|
42
47
|
})
|
|
48
|
+
|
|
49
|
+
it('returns the data with fbclid', () => {
|
|
50
|
+
expect(requestParameters(domWithFbclid.window.document)).toEqual({
|
|
51
|
+
landingPage: 'https://factorialhr.com/team/c%25C3%25A9sar',
|
|
52
|
+
language: 'en',
|
|
53
|
+
fbclid: '123'
|
|
54
|
+
})
|
|
55
|
+
})
|
|
43
56
|
})
|
package/build/app.js
CHANGED
|
@@ -119,7 +119,8 @@ exports.default = function (document) {
|
|
|
119
119
|
language = _requestParameters.language,
|
|
120
120
|
landingPage = _requestParameters.landingPage,
|
|
121
121
|
gclid = _requestParameters.gclid,
|
|
122
|
-
aclid = _requestParameters.aclid
|
|
122
|
+
aclid = _requestParameters.aclid,
|
|
123
|
+
fbclid = _requestParameters.fbclid;
|
|
123
124
|
|
|
124
125
|
var mc = document.location.href.match(/mc=(.*)/);
|
|
125
126
|
var attributes = ['mc=' + (mc ? mc[1] : ''), 'referer=' + encodeURI(document.referrer), 'language=' + language, 'landing_page=' + landingPage];
|
|
@@ -130,6 +131,9 @@ exports.default = function (document) {
|
|
|
130
131
|
if (aclid) {
|
|
131
132
|
attributes.push('aclid=' + aclid);
|
|
132
133
|
}
|
|
134
|
+
if (fbclid) {
|
|
135
|
+
attributes.push('fbclid=' + fbclid);
|
|
136
|
+
}
|
|
133
137
|
|
|
134
138
|
return '/internal/pixel?' + attributes.join('&');
|
|
135
139
|
};
|
|
@@ -173,12 +177,14 @@ function requestParameters(document) {
|
|
|
173
177
|
var locale = document.querySelector('html').lang.split('-')[0];
|
|
174
178
|
var gclid = findPropertyInParams(search, 'gclid');
|
|
175
179
|
var aclid = findPropertyInParams(search, 'aclid');
|
|
180
|
+
var fbclid = findPropertyInParams(search, 'fbclid');
|
|
176
181
|
|
|
177
182
|
return {
|
|
178
183
|
language: locale,
|
|
179
184
|
landingPage: landing,
|
|
180
185
|
gclid: gclid,
|
|
181
|
-
aclid: aclid
|
|
186
|
+
aclid: aclid,
|
|
187
|
+
fbclid: fbclid
|
|
182
188
|
};
|
|
183
189
|
}
|
|
184
190
|
|
package/coverage/clover.xml
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
4
|
-
<metrics statements="
|
|
5
|
-
<file name="index.js" path="/Users/
|
|
2
|
+
<coverage generated="1718712087062" clover="3.2.0">
|
|
3
|
+
<project timestamp="1718712087062" name="All files">
|
|
4
|
+
<metrics statements="33" coveredstatements="23" conditionals="17" coveredconditionals="8" methods="5" coveredmethods="4" elements="55" coveredelements="35" complexity="0" loc="33" ncloc="33" packages="1" files="3" classes="3">
|
|
5
|
+
<file name="index.js" path="/Users/jorejasrojo/Dev/factorial-pixel/src/index.js">
|
|
6
6
|
<metrics statements="10" coveredstatements="0" conditionals="8" coveredconditionals="0" methods="1" coveredmethods="0"/>
|
|
7
7
|
<line num="1" count="0" type="cond" truecount="0" falsecount="4"/>
|
|
8
8
|
<line num="9" count="0" type="stmt"/>
|
|
@@ -15,31 +15,34 @@
|
|
|
15
15
|
<line num="17" count="0" type="stmt"/>
|
|
16
16
|
<line num="18" count="0" type="stmt"/>
|
|
17
17
|
</file>
|
|
18
|
-
<file name="pixelUrl.js" path="/Users/
|
|
19
|
-
<metrics statements="
|
|
20
|
-
<line num="4" count="
|
|
21
|
-
<line num="
|
|
22
|
-
<line num="
|
|
23
|
-
<line num="
|
|
24
|
-
<line num="
|
|
25
|
-
<line num="
|
|
26
|
-
<line num="
|
|
27
|
-
<line num="
|
|
18
|
+
<file name="pixelUrl.js" path="/Users/jorejasrojo/Dev/factorial-pixel/src/pixelUrl.js">
|
|
19
|
+
<metrics statements="10" coveredstatements="10" conditionals="8" coveredconditionals="8" methods="1" coveredmethods="1"/>
|
|
20
|
+
<line num="4" count="5" type="stmt"/>
|
|
21
|
+
<line num="7" count="5" type="stmt"/>
|
|
22
|
+
<line num="8" count="5" type="stmt"/>
|
|
23
|
+
<line num="15" count="5" type="cond" truecount="2" falsecount="0"/>
|
|
24
|
+
<line num="16" count="1" type="stmt"/>
|
|
25
|
+
<line num="18" count="5" type="cond" truecount="2" falsecount="0"/>
|
|
26
|
+
<line num="19" count="1" type="stmt"/>
|
|
27
|
+
<line num="21" count="5" type="cond" truecount="2" falsecount="0"/>
|
|
28
|
+
<line num="22" count="1" type="stmt"/>
|
|
29
|
+
<line num="25" count="5" type="stmt"/>
|
|
28
30
|
</file>
|
|
29
|
-
<file name="requestParameters.js" path="/Users/
|
|
30
|
-
<metrics statements="
|
|
31
|
-
<line num="2" count="
|
|
32
|
-
<line num="4" count="
|
|
33
|
-
<line num="5" count="
|
|
34
|
-
<line num="7" count="
|
|
35
|
-
<line num="10" count="
|
|
36
|
-
<line num="14" count="
|
|
37
|
-
<line num="15" count="
|
|
38
|
-
<line num="16" count="
|
|
39
|
-
<line num="17" count="
|
|
40
|
-
<line num="18" count="
|
|
41
|
-
<line num="19" count="
|
|
42
|
-
<line num="
|
|
31
|
+
<file name="requestParameters.js" path="/Users/jorejasrojo/Dev/factorial-pixel/src/requestParameters.js">
|
|
32
|
+
<metrics statements="13" coveredstatements="13" conditionals="1" coveredconditionals="0" methods="3" coveredmethods="3"/>
|
|
33
|
+
<line num="2" count="27" type="stmt"/>
|
|
34
|
+
<line num="4" count="27" type="stmt"/>
|
|
35
|
+
<line num="5" count="27" type="stmt"/>
|
|
36
|
+
<line num="7" count="27" type="stmt"/>
|
|
37
|
+
<line num="10" count="27" type="stmt"/>
|
|
38
|
+
<line num="14" count="9" type="stmt"/>
|
|
39
|
+
<line num="15" count="9" type="stmt"/>
|
|
40
|
+
<line num="16" count="9" type="stmt"/>
|
|
41
|
+
<line num="17" count="9" type="stmt"/>
|
|
42
|
+
<line num="18" count="9" type="stmt"/>
|
|
43
|
+
<line num="19" count="9" type="stmt"/>
|
|
44
|
+
<line num="20" count="9" type="stmt"/>
|
|
45
|
+
<line num="22" count="9" type="stmt"/>
|
|
43
46
|
</file>
|
|
44
47
|
</metrics>
|
|
45
48
|
</project>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{"/Users/
|
|
2
|
-
,"/Users/
|
|
3
|
-
,"/Users/
|
|
1
|
+
{"/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]}}
|
|
2
|
+
,"/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"}
|
|
3
|
+
,"/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"}
|
|
4
4
|
}
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
</div><!-- /wrapper -->
|
|
84
84
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
85
85
|
Code coverage
|
|
86
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at
|
|
86
|
+
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Jun 18 2024 14:01:27 GMT+0200 (Central European Summer Time)
|
|
87
87
|
</div>
|
|
88
88
|
</div>
|
|
89
89
|
<script src="prettify.js"></script>
|
|
@@ -83,7 +83,7 @@ const img <span class="cstat-no" title="statement not covered" >= document.creat
|
|
|
83
83
|
</div><!-- /wrapper -->
|
|
84
84
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
85
85
|
Code coverage
|
|
86
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at
|
|
86
|
+
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Jun 18 2024 14:01:27 GMT+0200 (Central European Summer Time)
|
|
87
87
|
</div>
|
|
88
88
|
</div>
|
|
89
89
|
<script src="prettify.js"></script>
|
|
@@ -44,31 +44,43 @@
|
|
|
44
44
|
19
|
|
45
45
|
20
|
|
46
46
|
21
|
|
47
|
-
22
|
|
47
|
+
22
|
|
48
|
+
23
|
|
49
|
+
24
|
|
50
|
+
25
|
|
51
|
+
26
|
|
52
|
+
27</td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
48
53
|
<span class="cline-any cline-neutral"> </span>
|
|
49
54
|
<span class="cline-any cline-neutral"> </span>
|
|
50
|
-
<span class="cline-any cline-yes">
|
|
51
|
-
<span class="cline-any cline-yes">4x</span>
|
|
52
|
-
<span class="cline-any cline-yes">4x</span>
|
|
55
|
+
<span class="cline-any cline-yes">5x</span>
|
|
53
56
|
<span class="cline-any cline-neutral"> </span>
|
|
54
57
|
<span class="cline-any cline-neutral"> </span>
|
|
58
|
+
<span class="cline-any cline-yes">5x</span>
|
|
59
|
+
<span class="cline-any cline-yes">5x</span>
|
|
55
60
|
<span class="cline-any cline-neutral"> </span>
|
|
56
61
|
<span class="cline-any cline-neutral"> </span>
|
|
57
62
|
<span class="cline-any cline-neutral"> </span>
|
|
58
63
|
<span class="cline-any cline-neutral"> </span>
|
|
59
|
-
<span class="cline-any cline-
|
|
64
|
+
<span class="cline-any cline-neutral"> </span>
|
|
65
|
+
<span class="cline-any cline-neutral"> </span>
|
|
66
|
+
<span class="cline-any cline-yes">5x</span>
|
|
60
67
|
<span class="cline-any cline-yes">1x</span>
|
|
61
68
|
<span class="cline-any cline-neutral"> </span>
|
|
62
|
-
<span class="cline-any cline-yes">
|
|
69
|
+
<span class="cline-any cline-yes">5x</span>
|
|
63
70
|
<span class="cline-any cline-yes">1x</span>
|
|
64
71
|
<span class="cline-any cline-neutral"> </span>
|
|
72
|
+
<span class="cline-any cline-yes">5x</span>
|
|
73
|
+
<span class="cline-any cline-yes">1x</span>
|
|
65
74
|
<span class="cline-any cline-neutral"> </span>
|
|
66
|
-
<span class="cline-any cline-
|
|
75
|
+
<span class="cline-any cline-neutral"> </span>
|
|
76
|
+
<span class="cline-any cline-yes">5x</span>
|
|
67
77
|
<span class="cline-any cline-neutral"> </span>
|
|
68
78
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import requestParameters from './requestParameters'
|
|
69
79
|
|
|
70
80
|
export default document => {
|
|
71
|
-
const { language, landingPage, gclid, aclid } = requestParameters(
|
|
81
|
+
const { language, landingPage, gclid, aclid, fbclid } = requestParameters(
|
|
82
|
+
document
|
|
83
|
+
)
|
|
72
84
|
const mc = document.location.href.match(/mc=(.*)/)
|
|
73
85
|
const attributes = [
|
|
74
86
|
`mc=${mc ? mc[1] : ''}`,
|
|
@@ -83,6 +95,9 @@ export default document => {
|
|
|
83
95
|
if (aclid) {
|
|
84
96
|
attributes.push(`aclid=${aclid}`)
|
|
85
97
|
}
|
|
98
|
+
if (fbclid) {
|
|
99
|
+
attributes.push(`fbclid=${fbclid}`)
|
|
100
|
+
}
|
|
86
101
|
|
|
87
102
|
return `/internal/pixel?${attributes.join('&')}`
|
|
88
103
|
}
|
|
@@ -92,7 +107,7 @@ export default document => {
|
|
|
92
107
|
</div><!-- /wrapper -->
|
|
93
108
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
94
109
|
Code coverage
|
|
95
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at
|
|
110
|
+
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Jun 18 2024 14:01:27 GMT+0200 (Central European Summer Time)
|
|
96
111
|
</div>
|
|
97
112
|
</div>
|
|
98
113
|
<script src="prettify.js"></script>
|
|
@@ -50,27 +50,31 @@
|
|
|
50
50
|
25
|
|
51
51
|
26
|
|
52
52
|
27
|
|
53
|
-
28
|
|
54
|
-
|
|
53
|
+
28
|
|
54
|
+
29
|
|
55
|
+
30</td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
56
|
+
<span class="cline-any cline-yes">27x</span>
|
|
55
57
|
<span class="cline-any cline-neutral"> </span>
|
|
56
|
-
<span class="cline-any cline-yes">
|
|
57
|
-
<span class="cline-any cline-yes">
|
|
58
|
+
<span class="cline-any cline-yes">27x</span>
|
|
59
|
+
<span class="cline-any cline-yes">27x</span>
|
|
58
60
|
<span class="cline-any cline-neutral"> </span>
|
|
59
|
-
<span class="cline-any cline-yes">
|
|
61
|
+
<span class="cline-any cline-yes">27x</span>
|
|
60
62
|
<span class="cline-any cline-neutral"> </span>
|
|
61
63
|
<span class="cline-any cline-neutral"> </span>
|
|
62
|
-
<span class="cline-any cline-yes">
|
|
64
|
+
<span class="cline-any cline-yes">27x</span>
|
|
63
65
|
<span class="cline-any cline-neutral"> </span>
|
|
64
66
|
<span class="cline-any cline-neutral"> </span>
|
|
65
67
|
<span class="cline-any cline-neutral"> </span>
|
|
66
|
-
<span class="cline-any cline-yes">
|
|
67
|
-
<span class="cline-any cline-yes">
|
|
68
|
-
<span class="cline-any cline-yes">
|
|
69
|
-
<span class="cline-any cline-yes">
|
|
70
|
-
<span class="cline-any cline-yes">
|
|
71
|
-
<span class="cline-any cline-yes">
|
|
68
|
+
<span class="cline-any cline-yes">9x</span>
|
|
69
|
+
<span class="cline-any cline-yes">9x</span>
|
|
70
|
+
<span class="cline-any cline-yes">9x</span>
|
|
71
|
+
<span class="cline-any cline-yes">9x</span>
|
|
72
|
+
<span class="cline-any cline-yes">9x</span>
|
|
73
|
+
<span class="cline-any cline-yes">9x</span>
|
|
74
|
+
<span class="cline-any cline-yes">9x</span>
|
|
75
|
+
<span class="cline-any cline-neutral"> </span>
|
|
76
|
+
<span class="cline-any cline-yes">9x</span>
|
|
72
77
|
<span class="cline-any cline-neutral"> </span>
|
|
73
|
-
<span class="cline-any cline-yes">7x</span>
|
|
74
78
|
<span class="cline-any cline-neutral"> </span>
|
|
75
79
|
<span class="cline-any cline-neutral"> </span>
|
|
76
80
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -96,12 +100,14 @@ export default function requestParameters (document) {
|
|
|
96
100
|
const locale = document.querySelector('html').lang.split('-')[0]
|
|
97
101
|
const gclid = findPropertyInParams(search, 'gclid')
|
|
98
102
|
const aclid = findPropertyInParams(search, 'aclid')
|
|
103
|
+
const fbclid = findPropertyInParams(search, 'fbclid')
|
|
99
104
|
|
|
100
105
|
return {
|
|
101
106
|
language: locale,
|
|
102
107
|
landingPage: landing,
|
|
103
108
|
gclid,
|
|
104
|
-
aclid
|
|
109
|
+
aclid,
|
|
110
|
+
fbclid
|
|
105
111
|
}
|
|
106
112
|
}
|
|
107
113
|
</pre></td></tr>
|
|
@@ -110,7 +116,7 @@ export default function requestParameters (document) {
|
|
|
110
116
|
</div><!-- /wrapper -->
|
|
111
117
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
112
118
|
Code coverage
|
|
113
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at
|
|
119
|
+
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Jun 18 2024 14:01:27 GMT+0200 (Central European Summer Time)
|
|
114
120
|
</div>
|
|
115
121
|
</div>
|
|
116
122
|
<script src="prettify.js"></script>
|
package/coverage/lcov.info
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
TN:
|
|
2
|
-
SF:/Users/
|
|
2
|
+
SF:/Users/jorejasrojo/Dev/factorial-pixel/src/index.js
|
|
3
3
|
FN:1,_interopRequireDefault
|
|
4
4
|
FNF:1
|
|
5
5
|
FNH:0
|
|
@@ -28,54 +28,59 @@ BRF:8
|
|
|
28
28
|
BRH:0
|
|
29
29
|
end_of_record
|
|
30
30
|
TN:
|
|
31
|
-
SF:/Users/
|
|
31
|
+
SF:/Users/jorejasrojo/Dev/factorial-pixel/src/pixelUrl.js
|
|
32
32
|
FN:3,(anonymous_0)
|
|
33
33
|
FNF:1
|
|
34
34
|
FNH:1
|
|
35
|
-
FNDA:
|
|
36
|
-
DA:4,
|
|
37
|
-
DA:5
|
|
38
|
-
DA:
|
|
39
|
-
DA:
|
|
40
|
-
DA:
|
|
41
|
-
DA:
|
|
42
|
-
DA:
|
|
43
|
-
DA:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
BRDA:
|
|
49
|
-
BRDA:
|
|
50
|
-
BRDA:
|
|
51
|
-
BRDA:
|
|
52
|
-
|
|
53
|
-
|
|
35
|
+
FNDA:5,(anonymous_0)
|
|
36
|
+
DA:4,5
|
|
37
|
+
DA:7,5
|
|
38
|
+
DA:8,5
|
|
39
|
+
DA:15,5
|
|
40
|
+
DA:16,1
|
|
41
|
+
DA:18,5
|
|
42
|
+
DA:19,1
|
|
43
|
+
DA:21,5
|
|
44
|
+
DA:22,1
|
|
45
|
+
DA:25,5
|
|
46
|
+
LF:10
|
|
47
|
+
LH:10
|
|
48
|
+
BRDA:9,0,0,1
|
|
49
|
+
BRDA:9,0,1,4
|
|
50
|
+
BRDA:15,1,0,1
|
|
51
|
+
BRDA:15,1,1,4
|
|
52
|
+
BRDA:18,2,0,1
|
|
53
|
+
BRDA:18,2,1,4
|
|
54
|
+
BRDA:21,3,0,1
|
|
55
|
+
BRDA:21,3,1,4
|
|
56
|
+
BRF:8
|
|
57
|
+
BRH:8
|
|
54
58
|
end_of_record
|
|
55
59
|
TN:
|
|
56
|
-
SF:/Users/
|
|
60
|
+
SF:/Users/jorejasrojo/Dev/factorial-pixel/src/requestParameters.js
|
|
57
61
|
FN:1,findPropertyInParams
|
|
58
62
|
FN:4,(anonymous_1)
|
|
59
63
|
FN:13,requestParameters
|
|
60
64
|
FNF:3
|
|
61
65
|
FNH:3
|
|
62
|
-
FNDA:
|
|
63
|
-
FNDA:
|
|
64
|
-
FNDA:
|
|
65
|
-
DA:2,
|
|
66
|
-
DA:4,
|
|
67
|
-
DA:5,
|
|
68
|
-
DA:7,
|
|
69
|
-
DA:10,
|
|
70
|
-
DA:14,
|
|
71
|
-
DA:15,
|
|
72
|
-
DA:16,
|
|
73
|
-
DA:17,
|
|
74
|
-
DA:18,
|
|
75
|
-
DA:19,
|
|
76
|
-
DA:
|
|
77
|
-
|
|
78
|
-
|
|
66
|
+
FNDA:27,findPropertyInParams
|
|
67
|
+
FNDA:27,(anonymous_1)
|
|
68
|
+
FNDA:9,requestParameters
|
|
69
|
+
DA:2,27
|
|
70
|
+
DA:4,27
|
|
71
|
+
DA:5,27
|
|
72
|
+
DA:7,27
|
|
73
|
+
DA:10,27
|
|
74
|
+
DA:14,9
|
|
75
|
+
DA:15,9
|
|
76
|
+
DA:16,9
|
|
77
|
+
DA:17,9
|
|
78
|
+
DA:18,9
|
|
79
|
+
DA:19,9
|
|
80
|
+
DA:20,9
|
|
81
|
+
DA:22,9
|
|
82
|
+
LF:13
|
|
83
|
+
LH:13
|
|
79
84
|
BRDA:1,0,0,0
|
|
80
85
|
BRF:1
|
|
81
86
|
BRH:0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "factorial-pixel",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.8",
|
|
4
4
|
"description": "Factorial marketing pixel",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,12 +35,13 @@
|
|
|
35
35
|
"babel-register": "^6.24.1",
|
|
36
36
|
"eslint": "^4.18.2",
|
|
37
37
|
"eslint-config-standard": "^10.2.1",
|
|
38
|
-
"eslint-plugin-import": "^2.
|
|
38
|
+
"eslint-plugin-import": "^2.29.1",
|
|
39
39
|
"eslint-plugin-node": "^5.0.0",
|
|
40
40
|
"eslint-plugin-promise": "^3.5.0",
|
|
41
41
|
"eslint-plugin-standard": "^3.0.1",
|
|
42
42
|
"husky": "^0.13.4",
|
|
43
43
|
"jest": "^20.0.4",
|
|
44
|
+
"jest-jasmine2": "^29.7.0",
|
|
44
45
|
"jsdom": "11.0.0",
|
|
45
46
|
"lint-staged": "^3.6.0",
|
|
46
47
|
"prettier-standard": "^5.0.0",
|