factorial-pixel 0.7.9 → 0.9.0
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/.eslintrc.js +5 -1
- package/.tool-versions +2 -0
- package/CHANGELOG.md +8 -0
- package/__tests__/pixelUrl.spec.js +64 -0
- package/__tests__/requestParameters.spec.js +36 -0
- package/build/app.js +74 -2
- package/coverage/clover.xml +65 -29
- package/coverage/coverage-final.json +3 -3
- package/coverage/lcov-report/index.html +2 -2
- package/coverage/lcov-report/index.js.html +1 -1
- package/coverage/lcov-report/pixelUrl.js.html +117 -9
- package/coverage/lcov-report/requestParameters.js.html +89 -17
- package/coverage/lcov.info +100 -40
- package/package.json +1 -1
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
package/.eslintrc.js
CHANGED
package/.tool-versions
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## `0.9.0`
|
|
4
|
+
|
|
5
|
+
Adds support for HubSpot Ads (HSA) parameters (hsa_ad, hsa_cam, hsa_grp, hsa_kw, hsa_mt, hsa_src, hsa_tgt).
|
|
6
|
+
|
|
7
|
+
## `0.8.0`
|
|
8
|
+
|
|
9
|
+
Adds support for UTM parameters (utm_source, utm_medium, utm_campaign, utm_content, utm_term). UTM parameters are automatically extracted from the URL and sent to the pixel endpoint with proper URL encoding to handle special characters.
|
|
10
|
+
|
|
3
11
|
## `0.7.8`
|
|
4
12
|
|
|
5
13
|
Adds tracking for FBCLID
|
|
@@ -65,4 +65,68 @@ describe('pixelUrl', () => {
|
|
|
65
65
|
)
|
|
66
66
|
})
|
|
67
67
|
})
|
|
68
|
+
|
|
69
|
+
describe('with UTM parameters', () => {
|
|
70
|
+
it('returns the data with all UTM params', () => {
|
|
71
|
+
html = "<!DOCTYPE html><html lang='en'></html>"
|
|
72
|
+
dom = new JSDOM(html, {
|
|
73
|
+
url: 'https://factorialhr.com/blog?utm_source=google&utm_medium=cpc&utm_campaign=Q1_Brand&utm_content=ad_1&utm_term=hr_software'
|
|
74
|
+
})
|
|
75
|
+
expect(pixelUrl(dom.window.document)).toEqual(
|
|
76
|
+
'/internal/pixel?mc=&referer=&language=en&landing_page=https://factorialhr.com/blog&utm_source=google&utm_medium=cpc&utm_campaign=Q1_Brand&utm_content=ad_1&utm_term=hr_software'
|
|
77
|
+
)
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
it('encodes UTM parameters with special characters', () => {
|
|
81
|
+
html = "<!DOCTYPE html><html lang='en'></html>"
|
|
82
|
+
dom = new JSDOM(html, {
|
|
83
|
+
url: 'https://factorialhr.com/blog?utm_source=google&utm_campaign=Q1%20Brand%20Campaign&utm_content=ad%20%231'
|
|
84
|
+
})
|
|
85
|
+
expect(pixelUrl(dom.window.document)).toEqual(
|
|
86
|
+
'/internal/pixel?mc=&referer=&language=en&landing_page=https://factorialhr.com/blog&utm_source=google&utm_campaign=Q1%2520Brand%2520Campaign&utm_content=ad%2520%25231'
|
|
87
|
+
)
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
it('combines UTMs with gclid', () => {
|
|
91
|
+
html = "<!DOCTYPE html><html lang='en'></html>"
|
|
92
|
+
dom = new JSDOM(html, {
|
|
93
|
+
url: 'https://factorialhr.com/blog?utm_source=google&utm_medium=cpc&utm_campaign=Q1&gclid=test_click_123'
|
|
94
|
+
})
|
|
95
|
+
expect(pixelUrl(dom.window.document)).toEqual(
|
|
96
|
+
'/internal/pixel?mc=&referer=&language=en&landing_page=https://factorialhr.com/blog&gclid=test_click_123&utm_source=google&utm_medium=cpc&utm_campaign=Q1'
|
|
97
|
+
)
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
describe('with HSA parameters', () => {
|
|
102
|
+
it('returns the data with all HSA params', () => {
|
|
103
|
+
html = "<!DOCTYPE html><html lang='en'></html>"
|
|
104
|
+
dom = new JSDOM(html, {
|
|
105
|
+
url: 'https://factorialhr.com/blog?hsa_cam=123456&hsa_grp=789012&hsa_ad=345678&hsa_src=google&hsa_mt=exact&hsa_kw=hr_software&hsa_tgt=901234'
|
|
106
|
+
})
|
|
107
|
+
expect(pixelUrl(dom.window.document)).toEqual(
|
|
108
|
+
'/internal/pixel?mc=&referer=&language=en&landing_page=https://factorialhr.com/blog&hsa_ad=345678&hsa_cam=123456&hsa_grp=789012&hsa_kw=hr_software&hsa_mt=exact&hsa_src=google&hsa_tgt=901234'
|
|
109
|
+
)
|
|
110
|
+
})
|
|
111
|
+
|
|
112
|
+
it('encodes HSA parameters with special characters', () => {
|
|
113
|
+
html = "<!DOCTYPE html><html lang='en'></html>"
|
|
114
|
+
dom = new JSDOM(html, {
|
|
115
|
+
url: 'https://factorialhr.com/blog?hsa_cam=123&hsa_kw=hr%20software%20%23best'
|
|
116
|
+
})
|
|
117
|
+
expect(pixelUrl(dom.window.document)).toEqual(
|
|
118
|
+
'/internal/pixel?mc=&referer=&language=en&landing_page=https://factorialhr.com/blog&hsa_cam=123&hsa_kw=hr%2520software%2520%2523best'
|
|
119
|
+
)
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
it('combines HSA with UTM and gclid parameters', () => {
|
|
123
|
+
html = "<!DOCTYPE html><html lang='en'></html>"
|
|
124
|
+
dom = new JSDOM(html, {
|
|
125
|
+
url: 'https://factorialhr.com/blog?utm_source=google&hsa_cam=123456&hsa_src=google&gclid=test_click_123'
|
|
126
|
+
})
|
|
127
|
+
expect(pixelUrl(dom.window.document)).toEqual(
|
|
128
|
+
'/internal/pixel?mc=&referer=&language=en&landing_page=https://factorialhr.com/blog&gclid=test_click_123&utm_source=google&hsa_cam=123456&hsa_src=google'
|
|
129
|
+
)
|
|
130
|
+
})
|
|
131
|
+
})
|
|
68
132
|
})
|
|
@@ -22,6 +22,16 @@ const domWithFbclid = new JSDOM(html, {
|
|
|
22
22
|
referrer: 'https://google.com?query=cómo hacer nóminas'
|
|
23
23
|
})
|
|
24
24
|
|
|
25
|
+
const domWithUtms = new JSDOM(html, {
|
|
26
|
+
url: 'https://factorialhr.com/team/césar?utm_source=google&utm_medium=cpc&utm_campaign=Q1_Brand&utm_content=ad_variant_1&utm_term=hr_software',
|
|
27
|
+
referrer: 'https://google.com?query=cómo hacer nóminas'
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
const domWithHsa = new JSDOM(html, {
|
|
31
|
+
url: 'https://factorialhr.com/team/césar?hsa_cam=123456&hsa_grp=789012&hsa_ad=345678&hsa_src=google&hsa_mt=exact&hsa_kw=hr_software&hsa_tgt=901234',
|
|
32
|
+
referrer: 'https://google.com?query=cómo hacer nóminas'
|
|
33
|
+
})
|
|
34
|
+
|
|
25
35
|
describe('requestParameters', () => {
|
|
26
36
|
it('returns the data', () => {
|
|
27
37
|
expect(requestParameters(dom.window.document)).toEqual({
|
|
@@ -53,4 +63,30 @@ describe('requestParameters', () => {
|
|
|
53
63
|
fbclid: '123'
|
|
54
64
|
})
|
|
55
65
|
})
|
|
66
|
+
|
|
67
|
+
it('returns the data with UTM parameters', () => {
|
|
68
|
+
expect(requestParameters(domWithUtms.window.document)).toEqual({
|
|
69
|
+
landingPage: 'https://factorialhr.com/team/c%25C3%25A9sar',
|
|
70
|
+
language: 'en',
|
|
71
|
+
utm_source: 'google',
|
|
72
|
+
utm_medium: 'cpc',
|
|
73
|
+
utm_campaign: 'Q1_Brand',
|
|
74
|
+
utm_content: 'ad_variant_1',
|
|
75
|
+
utm_term: 'hr_software'
|
|
76
|
+
})
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
it('returns the data with HSA parameters', () => {
|
|
80
|
+
expect(requestParameters(domWithHsa.window.document)).toEqual({
|
|
81
|
+
landingPage: 'https://factorialhr.com/team/c%25C3%25A9sar',
|
|
82
|
+
language: 'en',
|
|
83
|
+
hsa_ad: '345678',
|
|
84
|
+
hsa_cam: '123456',
|
|
85
|
+
hsa_grp: '789012',
|
|
86
|
+
hsa_kw: 'hr_software',
|
|
87
|
+
hsa_mt: 'exact',
|
|
88
|
+
hsa_src: 'google',
|
|
89
|
+
hsa_tgt: '901234'
|
|
90
|
+
})
|
|
91
|
+
})
|
|
56
92
|
})
|
package/build/app.js
CHANGED
|
@@ -121,7 +121,19 @@ exports.default = function (document) {
|
|
|
121
121
|
mc = _requestParameters.mc,
|
|
122
122
|
gclid = _requestParameters.gclid,
|
|
123
123
|
aclid = _requestParameters.aclid,
|
|
124
|
-
fbclid = _requestParameters.fbclid
|
|
124
|
+
fbclid = _requestParameters.fbclid,
|
|
125
|
+
utm_source = _requestParameters.utm_source,
|
|
126
|
+
utm_medium = _requestParameters.utm_medium,
|
|
127
|
+
utm_campaign = _requestParameters.utm_campaign,
|
|
128
|
+
utm_content = _requestParameters.utm_content,
|
|
129
|
+
utm_term = _requestParameters.utm_term,
|
|
130
|
+
hsa_ad = _requestParameters.hsa_ad,
|
|
131
|
+
hsa_cam = _requestParameters.hsa_cam,
|
|
132
|
+
hsa_grp = _requestParameters.hsa_grp,
|
|
133
|
+
hsa_kw = _requestParameters.hsa_kw,
|
|
134
|
+
hsa_mt = _requestParameters.hsa_mt,
|
|
135
|
+
hsa_src = _requestParameters.hsa_src,
|
|
136
|
+
hsa_tgt = _requestParameters.hsa_tgt;
|
|
125
137
|
|
|
126
138
|
var attributes = ['mc=' + (mc || ''), 'referer=' + encodeURI(document.referrer), 'language=' + language, 'landing_page=' + landingPage];
|
|
127
139
|
|
|
@@ -134,6 +146,42 @@ exports.default = function (document) {
|
|
|
134
146
|
if (fbclid) {
|
|
135
147
|
attributes.push('fbclid=' + fbclid);
|
|
136
148
|
}
|
|
149
|
+
if (utm_source) {
|
|
150
|
+
attributes.push('utm_source=' + encodeURIComponent(utm_source));
|
|
151
|
+
}
|
|
152
|
+
if (utm_medium) {
|
|
153
|
+
attributes.push('utm_medium=' + encodeURIComponent(utm_medium));
|
|
154
|
+
}
|
|
155
|
+
if (utm_campaign) {
|
|
156
|
+
attributes.push('utm_campaign=' + encodeURIComponent(utm_campaign));
|
|
157
|
+
}
|
|
158
|
+
if (utm_content) {
|
|
159
|
+
attributes.push('utm_content=' + encodeURIComponent(utm_content));
|
|
160
|
+
}
|
|
161
|
+
if (utm_term) {
|
|
162
|
+
attributes.push('utm_term=' + encodeURIComponent(utm_term));
|
|
163
|
+
}
|
|
164
|
+
if (hsa_ad) {
|
|
165
|
+
attributes.push('hsa_ad=' + encodeURIComponent(hsa_ad));
|
|
166
|
+
}
|
|
167
|
+
if (hsa_cam) {
|
|
168
|
+
attributes.push('hsa_cam=' + encodeURIComponent(hsa_cam));
|
|
169
|
+
}
|
|
170
|
+
if (hsa_grp) {
|
|
171
|
+
attributes.push('hsa_grp=' + encodeURIComponent(hsa_grp));
|
|
172
|
+
}
|
|
173
|
+
if (hsa_kw) {
|
|
174
|
+
attributes.push('hsa_kw=' + encodeURIComponent(hsa_kw));
|
|
175
|
+
}
|
|
176
|
+
if (hsa_mt) {
|
|
177
|
+
attributes.push('hsa_mt=' + encodeURIComponent(hsa_mt));
|
|
178
|
+
}
|
|
179
|
+
if (hsa_src) {
|
|
180
|
+
attributes.push('hsa_src=' + encodeURIComponent(hsa_src));
|
|
181
|
+
}
|
|
182
|
+
if (hsa_tgt) {
|
|
183
|
+
attributes.push('hsa_tgt=' + encodeURIComponent(hsa_tgt));
|
|
184
|
+
}
|
|
137
185
|
|
|
138
186
|
return '/internal/pixel?' + attributes.join('&');
|
|
139
187
|
};
|
|
@@ -179,6 +227,18 @@ function requestParameters(document) {
|
|
|
179
227
|
var gclid = findPropertyInParams(search, 'gclid');
|
|
180
228
|
var aclid = findPropertyInParams(search, 'aclid');
|
|
181
229
|
var fbclid = findPropertyInParams(search, 'fbclid');
|
|
230
|
+
var utm_source = findPropertyInParams(search, 'utm_source');
|
|
231
|
+
var utm_medium = findPropertyInParams(search, 'utm_medium');
|
|
232
|
+
var utm_campaign = findPropertyInParams(search, 'utm_campaign');
|
|
233
|
+
var utm_content = findPropertyInParams(search, 'utm_content');
|
|
234
|
+
var utm_term = findPropertyInParams(search, 'utm_term');
|
|
235
|
+
var hsa_ad = findPropertyInParams(search, 'hsa_ad');
|
|
236
|
+
var hsa_cam = findPropertyInParams(search, 'hsa_cam');
|
|
237
|
+
var hsa_grp = findPropertyInParams(search, 'hsa_grp');
|
|
238
|
+
var hsa_kw = findPropertyInParams(search, 'hsa_kw');
|
|
239
|
+
var hsa_mt = findPropertyInParams(search, 'hsa_mt');
|
|
240
|
+
var hsa_src = findPropertyInParams(search, 'hsa_src');
|
|
241
|
+
var hsa_tgt = findPropertyInParams(search, 'hsa_tgt');
|
|
182
242
|
|
|
183
243
|
return {
|
|
184
244
|
language: locale,
|
|
@@ -186,7 +246,19 @@ function requestParameters(document) {
|
|
|
186
246
|
mc: mc,
|
|
187
247
|
gclid: gclid,
|
|
188
248
|
aclid: aclid,
|
|
189
|
-
fbclid: fbclid
|
|
249
|
+
fbclid: fbclid,
|
|
250
|
+
utm_source: utm_source,
|
|
251
|
+
utm_medium: utm_medium,
|
|
252
|
+
utm_campaign: utm_campaign,
|
|
253
|
+
utm_content: utm_content,
|
|
254
|
+
utm_term: utm_term,
|
|
255
|
+
hsa_ad: hsa_ad,
|
|
256
|
+
hsa_cam: hsa_cam,
|
|
257
|
+
hsa_grp: hsa_grp,
|
|
258
|
+
hsa_kw: hsa_kw,
|
|
259
|
+
hsa_mt: hsa_mt,
|
|
260
|
+
hsa_src: hsa_src,
|
|
261
|
+
hsa_tgt: hsa_tgt
|
|
190
262
|
};
|
|
191
263
|
}
|
|
192
264
|
|
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="1768946524651" clover="3.2.0">
|
|
3
|
+
<project timestamp="1768946524651" name="All files">
|
|
4
|
+
<metrics statements="69" coveredstatements="59" conditionals="41" coveredconditionals="32" methods="5" coveredmethods="4" elements="115" coveredelements="95" complexity="0" loc="69" ncloc="69" packages="1" files="3" classes="3">
|
|
5
|
+
<file name="index.js" path="/Users/joan.silio/code/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,34 +15,70 @@
|
|
|
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="7" count="
|
|
22
|
-
<line num="14" count="
|
|
23
|
-
<line num="15" count="
|
|
24
|
-
<line num="17" count="
|
|
18
|
+
<file name="pixelUrl.js" path="/Users/joan.silio/code/factorial-pixel/src/pixelUrl.js">
|
|
19
|
+
<metrics statements="33" coveredstatements="33" conditionals="32" coveredconditionals="32" methods="1" coveredmethods="1"/>
|
|
20
|
+
<line num="4" count="11" type="stmt"/>
|
|
21
|
+
<line num="7" count="11" type="stmt"/>
|
|
22
|
+
<line num="14" count="11" type="cond" truecount="2" falsecount="0"/>
|
|
23
|
+
<line num="15" count="3" type="stmt"/>
|
|
24
|
+
<line num="17" count="11" type="cond" truecount="2" falsecount="0"/>
|
|
25
25
|
<line num="18" count="1" type="stmt"/>
|
|
26
|
-
<line num="20" count="
|
|
26
|
+
<line num="20" count="11" type="cond" truecount="2" falsecount="0"/>
|
|
27
27
|
<line num="21" count="1" type="stmt"/>
|
|
28
|
-
<line num="
|
|
28
|
+
<line num="23" count="11" type="cond" truecount="2" falsecount="0"/>
|
|
29
|
+
<line num="24" count="4" type="stmt"/>
|
|
30
|
+
<line num="26" count="11" type="cond" truecount="2" falsecount="0"/>
|
|
31
|
+
<line num="27" count="2" type="stmt"/>
|
|
32
|
+
<line num="29" count="11" type="cond" truecount="2" falsecount="0"/>
|
|
33
|
+
<line num="30" count="3" type="stmt"/>
|
|
34
|
+
<line num="32" count="11" type="cond" truecount="2" falsecount="0"/>
|
|
35
|
+
<line num="33" count="2" type="stmt"/>
|
|
36
|
+
<line num="35" count="11" type="cond" truecount="2" falsecount="0"/>
|
|
37
|
+
<line num="36" count="1" type="stmt"/>
|
|
38
|
+
<line num="38" count="11" type="cond" truecount="2" falsecount="0"/>
|
|
39
|
+
<line num="39" count="1" type="stmt"/>
|
|
40
|
+
<line num="41" count="11" type="cond" truecount="2" falsecount="0"/>
|
|
41
|
+
<line num="42" count="3" type="stmt"/>
|
|
42
|
+
<line num="44" count="11" type="cond" truecount="2" falsecount="0"/>
|
|
43
|
+
<line num="45" count="1" type="stmt"/>
|
|
44
|
+
<line num="47" count="11" type="cond" truecount="2" falsecount="0"/>
|
|
45
|
+
<line num="48" count="2" type="stmt"/>
|
|
46
|
+
<line num="50" count="11" type="cond" truecount="2" falsecount="0"/>
|
|
47
|
+
<line num="51" count="1" type="stmt"/>
|
|
48
|
+
<line num="53" count="11" type="cond" truecount="2" falsecount="0"/>
|
|
49
|
+
<line num="54" count="2" type="stmt"/>
|
|
50
|
+
<line num="56" count="11" type="cond" truecount="2" falsecount="0"/>
|
|
51
|
+
<line num="57" count="1" type="stmt"/>
|
|
52
|
+
<line num="60" count="11" type="stmt"/>
|
|
29
53
|
</file>
|
|
30
|
-
<file name="requestParameters.js" path="/Users/
|
|
31
|
-
<metrics statements="
|
|
32
|
-
<line num="2" count="
|
|
33
|
-
<line num="4" count="
|
|
34
|
-
<line num="5" count="
|
|
35
|
-
<line num="7" count="
|
|
36
|
-
<line num="10" count="
|
|
37
|
-
<line num="14" count="
|
|
38
|
-
<line num="15" count="
|
|
39
|
-
<line num="16" count="
|
|
40
|
-
<line num="17" count="
|
|
41
|
-
<line num="18" count="
|
|
42
|
-
<line num="19" count="
|
|
43
|
-
<line num="20" count="
|
|
44
|
-
<line num="21" count="
|
|
45
|
-
<line num="
|
|
54
|
+
<file name="requestParameters.js" path="/Users/joan.silio/code/factorial-pixel/src/requestParameters.js">
|
|
55
|
+
<metrics statements="26" coveredstatements="26" conditionals="1" coveredconditionals="0" methods="3" coveredmethods="3"/>
|
|
56
|
+
<line num="2" count="272" type="stmt"/>
|
|
57
|
+
<line num="4" count="272" type="stmt"/>
|
|
58
|
+
<line num="5" count="736" type="stmt"/>
|
|
59
|
+
<line num="7" count="736" type="stmt"/>
|
|
60
|
+
<line num="10" count="272" type="stmt"/>
|
|
61
|
+
<line num="14" count="17" type="stmt"/>
|
|
62
|
+
<line num="15" count="17" type="stmt"/>
|
|
63
|
+
<line num="16" count="17" type="stmt"/>
|
|
64
|
+
<line num="17" count="17" type="stmt"/>
|
|
65
|
+
<line num="18" count="17" type="stmt"/>
|
|
66
|
+
<line num="19" count="17" type="stmt"/>
|
|
67
|
+
<line num="20" count="17" type="stmt"/>
|
|
68
|
+
<line num="21" count="17" type="stmt"/>
|
|
69
|
+
<line num="22" count="17" type="stmt"/>
|
|
70
|
+
<line num="23" count="17" type="stmt"/>
|
|
71
|
+
<line num="24" count="17" type="stmt"/>
|
|
72
|
+
<line num="25" count="17" type="stmt"/>
|
|
73
|
+
<line num="26" count="17" type="stmt"/>
|
|
74
|
+
<line num="27" count="17" type="stmt"/>
|
|
75
|
+
<line num="28" count="17" type="stmt"/>
|
|
76
|
+
<line num="29" count="17" type="stmt"/>
|
|
77
|
+
<line num="30" count="17" type="stmt"/>
|
|
78
|
+
<line num="31" count="17" type="stmt"/>
|
|
79
|
+
<line num="32" count="17" type="stmt"/>
|
|
80
|
+
<line num="33" count="17" type="stmt"/>
|
|
81
|
+
<line num="35" count="17" type="stmt"/>
|
|
46
82
|
</file>
|
|
47
83
|
</metrics>
|
|
48
84
|
</project>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{"/Users/
|
|
2
|
-
,"/Users/
|
|
3
|
-
,"/Users/
|
|
1
|
+
{"/Users/joan.silio/code/factorial-pixel/src/index.js": {"path":"/Users/joan.silio/code/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/joan.silio/code/factorial-pixel/src/pixelUrl.js": {"path":"/Users/joan.silio/code/factorial-pixel/src/pixelUrl.js","statementMap":{"0":{"start":{"line":4,"column":183},"end":{"line":6,"column":3}},"1":{"start":{"line":7,"column":21},"end":{"line":12,"column":3}},"2":{"start":{"line":14,"column":2},"end":{"line":16,"column":3}},"3":{"start":{"line":15,"column":4},"end":{"line":15,"column":37}},"4":{"start":{"line":17,"column":2},"end":{"line":19,"column":3}},"5":{"start":{"line":18,"column":4},"end":{"line":18,"column":37}},"6":{"start":{"line":20,"column":2},"end":{"line":22,"column":3}},"7":{"start":{"line":21,"column":4},"end":{"line":21,"column":39}},"8":{"start":{"line":23,"column":2},"end":{"line":25,"column":3}},"9":{"start":{"line":24,"column":4},"end":{"line":24,"column":67}},"10":{"start":{"line":26,"column":2},"end":{"line":28,"column":3}},"11":{"start":{"line":27,"column":4},"end":{"line":27,"column":67}},"12":{"start":{"line":29,"column":2},"end":{"line":31,"column":3}},"13":{"start":{"line":30,"column":4},"end":{"line":30,"column":71}},"14":{"start":{"line":32,"column":2},"end":{"line":34,"column":3}},"15":{"start":{"line":33,"column":4},"end":{"line":33,"column":69}},"16":{"start":{"line":35,"column":2},"end":{"line":37,"column":3}},"17":{"start":{"line":36,"column":4},"end":{"line":36,"column":63}},"18":{"start":{"line":38,"column":2},"end":{"line":40,"column":3}},"19":{"start":{"line":39,"column":4},"end":{"line":39,"column":59}},"20":{"start":{"line":41,"column":2},"end":{"line":43,"column":3}},"21":{"start":{"line":42,"column":4},"end":{"line":42,"column":61}},"22":{"start":{"line":44,"column":2},"end":{"line":46,"column":3}},"23":{"start":{"line":45,"column":4},"end":{"line":45,"column":61}},"24":{"start":{"line":47,"column":2},"end":{"line":49,"column":3}},"25":{"start":{"line":48,"column":4},"end":{"line":48,"column":59}},"26":{"start":{"line":50,"column":2},"end":{"line":52,"column":3}},"27":{"start":{"line":51,"column":4},"end":{"line":51,"column":59}},"28":{"start":{"line":53,"column":2},"end":{"line":55,"column":3}},"29":{"start":{"line":54,"column":4},"end":{"line":54,"column":61}},"30":{"start":{"line":56,"column":2},"end":{"line":58,"column":3}},"31":{"start":{"line":57,"column":4},"end":{"line":57,"column":61}},"32":{"start":{"line":60,"column":2},"end":{"line":60,"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":61,"column":1}},"line":3}},"branchMap":{"0":{"loc":{"start":{"line":8,"column":10},"end":{"line":8,"column":18}},"type":"binary-expr","locations":[{"start":{"line":8,"column":10},"end":{"line":8,"column":12}},{"start":{"line":8,"column":16},"end":{"line":8,"column":18}}],"line":8},"1":{"loc":{"start":{"line":14,"column":2},"end":{"line":16,"column":3}},"type":"if","locations":[{"start":{"line":14,"column":2},"end":{"line":16,"column":3}},{"start":{"line":14,"column":2},"end":{"line":16,"column":3}}],"line":14},"2":{"loc":{"start":{"line":17,"column":2},"end":{"line":19,"column":3}},"type":"if","locations":[{"start":{"line":17,"column":2},"end":{"line":19,"column":3}},{"start":{"line":17,"column":2},"end":{"line":19,"column":3}}],"line":17},"3":{"loc":{"start":{"line":20,"column":2},"end":{"line":22,"column":3}},"type":"if","locations":[{"start":{"line":20,"column":2},"end":{"line":22,"column":3}},{"start":{"line":20,"column":2},"end":{"line":22,"column":3}}],"line":20},"4":{"loc":{"start":{"line":23,"column":2},"end":{"line":25,"column":3}},"type":"if","locations":[{"start":{"line":23,"column":2},"end":{"line":25,"column":3}},{"start":{"line":23,"column":2},"end":{"line":25,"column":3}}],"line":23},"5":{"loc":{"start":{"line":26,"column":2},"end":{"line":28,"column":3}},"type":"if","locations":[{"start":{"line":26,"column":2},"end":{"line":28,"column":3}},{"start":{"line":26,"column":2},"end":{"line":28,"column":3}}],"line":26},"6":{"loc":{"start":{"line":29,"column":2},"end":{"line":31,"column":3}},"type":"if","locations":[{"start":{"line":29,"column":2},"end":{"line":31,"column":3}},{"start":{"line":29,"column":2},"end":{"line":31,"column":3}}],"line":29},"7":{"loc":{"start":{"line":32,"column":2},"end":{"line":34,"column":3}},"type":"if","locations":[{"start":{"line":32,"column":2},"end":{"line":34,"column":3}},{"start":{"line":32,"column":2},"end":{"line":34,"column":3}}],"line":32},"8":{"loc":{"start":{"line":35,"column":2},"end":{"line":37,"column":3}},"type":"if","locations":[{"start":{"line":35,"column":2},"end":{"line":37,"column":3}},{"start":{"line":35,"column":2},"end":{"line":37,"column":3}}],"line":35},"9":{"loc":{"start":{"line":38,"column":2},"end":{"line":40,"column":3}},"type":"if","locations":[{"start":{"line":38,"column":2},"end":{"line":40,"column":3}},{"start":{"line":38,"column":2},"end":{"line":40,"column":3}}],"line":38},"10":{"loc":{"start":{"line":41,"column":2},"end":{"line":43,"column":3}},"type":"if","locations":[{"start":{"line":41,"column":2},"end":{"line":43,"column":3}},{"start":{"line":41,"column":2},"end":{"line":43,"column":3}}],"line":41},"11":{"loc":{"start":{"line":44,"column":2},"end":{"line":46,"column":3}},"type":"if","locations":[{"start":{"line":44,"column":2},"end":{"line":46,"column":3}},{"start":{"line":44,"column":2},"end":{"line":46,"column":3}}],"line":44},"12":{"loc":{"start":{"line":47,"column":2},"end":{"line":49,"column":3}},"type":"if","locations":[{"start":{"line":47,"column":2},"end":{"line":49,"column":3}},{"start":{"line":47,"column":2},"end":{"line":49,"column":3}}],"line":47},"13":{"loc":{"start":{"line":50,"column":2},"end":{"line":52,"column":3}},"type":"if","locations":[{"start":{"line":50,"column":2},"end":{"line":52,"column":3}},{"start":{"line":50,"column":2},"end":{"line":52,"column":3}}],"line":50},"14":{"loc":{"start":{"line":53,"column":2},"end":{"line":55,"column":3}},"type":"if","locations":[{"start":{"line":53,"column":2},"end":{"line":55,"column":3}},{"start":{"line":53,"column":2},"end":{"line":55,"column":3}}],"line":53},"15":{"loc":{"start":{"line":56,"column":2},"end":{"line":58,"column":3}},"type":"if","locations":[{"start":{"line":56,"column":2},"end":{"line":58,"column":3}},{"start":{"line":56,"column":2},"end":{"line":58,"column":3}}],"line":56}},"s":{"0":11,"1":11,"2":11,"3":3,"4":11,"5":1,"6":11,"7":1,"8":11,"9":4,"10":11,"11":2,"12":11,"13":3,"14":11,"15":2,"16":11,"17":1,"18":11,"19":1,"20":11,"21":3,"22":11,"23":1,"24":11,"25":2,"26":11,"27":1,"28":11,"29":2,"30":11,"31":1,"32":11},"f":{"0":11},"b":{"0":[11,10],"1":[3,8],"2":[1,10],"3":[1,10],"4":[4,7],"5":[2,9],"6":[3,8],"7":[2,9],"8":[1,10],"9":[1,10],"10":[3,8],"11":[1,10],"12":[2,9],"13":[1,10],"14":[2,9],"15":[1,10]},"_coverageSchema":"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c","hash":"9a1856fc35ad61775f716d61ea47de056c31c8c0"}
|
|
3
|
+
,"/Users/joan.silio/code/factorial-pixel/src/requestParameters.js": {"path":"/Users/joan.silio/code/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":13},"end":{"line":18,"column":47}},"10":{"start":{"line":19,"column":16},"end":{"line":19,"column":53}},"11":{"start":{"line":20,"column":16},"end":{"line":20,"column":53}},"12":{"start":{"line":21,"column":17},"end":{"line":21,"column":55}},"13":{"start":{"line":22,"column":21},"end":{"line":22,"column":63}},"14":{"start":{"line":23,"column":21},"end":{"line":23,"column":63}},"15":{"start":{"line":24,"column":23},"end":{"line":24,"column":67}},"16":{"start":{"line":25,"column":22},"end":{"line":25,"column":65}},"17":{"start":{"line":26,"column":19},"end":{"line":26,"column":59}},"18":{"start":{"line":27,"column":17},"end":{"line":27,"column":55}},"19":{"start":{"line":28,"column":18},"end":{"line":28,"column":57}},"20":{"start":{"line":29,"column":18},"end":{"line":29,"column":57}},"21":{"start":{"line":30,"column":17},"end":{"line":30,"column":55}},"22":{"start":{"line":31,"column":17},"end":{"line":31,"column":55}},"23":{"start":{"line":32,"column":18},"end":{"line":32,"column":57}},"24":{"start":{"line":33,"column":18},"end":{"line":33,"column":57}},"25":{"start":{"line":35,"column":2},"end":{"line":54,"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":55,"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":272,"1":272,"2":736,"3":736,"4":272,"5":17,"6":17,"7":17,"8":17,"9":17,"10":17,"11":17,"12":17,"13":17,"14":17,"15":17,"16":17,"17":17,"18":17,"19":17,"20":17,"21":17,"22":17,"23":17,"24":17,"25":17},"f":{"0":272,"1":736,"2":17},"b":{"0":[0]},"_coverageSchema":"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c","hash":"e3c61ead2024de08e4e2c59336a4f3452dd8b26f"}
|
|
4
4
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<div class='clearfix'>
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
24
|
-
<div class='status-line
|
|
24
|
+
<div class='status-line high'></div>
|
|
25
25
|
<div class="pad1">
|
|
26
26
|
<table class="coverage-summary">
|
|
27
27
|
<thead>
|
|
@@ -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 Jan 20 2026 23:02:04 GMT+0100 (Central European Standard 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 Jan 20 2026 23:02:04 GMT+0100 (Central European Standard Time)
|
|
87
87
|
</div>
|
|
88
88
|
</div>
|
|
89
89
|
<script src="prettify.js"></script>
|
|
@@ -48,35 +48,107 @@
|
|
|
48
48
|
23
|
|
49
49
|
24
|
|
50
50
|
25
|
|
51
|
-
26
|
|
51
|
+
26
|
|
52
|
+
27
|
|
53
|
+
28
|
|
54
|
+
29
|
|
55
|
+
30
|
|
56
|
+
31
|
|
57
|
+
32
|
|
58
|
+
33
|
|
59
|
+
34
|
|
60
|
+
35
|
|
61
|
+
36
|
|
62
|
+
37
|
|
63
|
+
38
|
|
64
|
+
39
|
|
65
|
+
40
|
|
66
|
+
41
|
|
67
|
+
42
|
|
68
|
+
43
|
|
69
|
+
44
|
|
70
|
+
45
|
|
71
|
+
46
|
|
72
|
+
47
|
|
73
|
+
48
|
|
74
|
+
49
|
|
75
|
+
50
|
|
76
|
+
51
|
|
77
|
+
52
|
|
78
|
+
53
|
|
79
|
+
54
|
|
80
|
+
55
|
|
81
|
+
56
|
|
82
|
+
57
|
|
83
|
+
58
|
|
84
|
+
59
|
|
85
|
+
60
|
|
86
|
+
61
|
|
87
|
+
62</td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
52
88
|
<span class="cline-any cline-neutral"> </span>
|
|
53
89
|
<span class="cline-any cline-neutral"> </span>
|
|
54
|
-
<span class="cline-any cline-yes">
|
|
90
|
+
<span class="cline-any cline-yes">11x</span>
|
|
55
91
|
<span class="cline-any cline-neutral"> </span>
|
|
56
92
|
<span class="cline-any cline-neutral"> </span>
|
|
57
|
-
<span class="cline-any cline-yes">
|
|
93
|
+
<span class="cline-any cline-yes">11x</span>
|
|
58
94
|
<span class="cline-any cline-neutral"> </span>
|
|
59
95
|
<span class="cline-any cline-neutral"> </span>
|
|
60
96
|
<span class="cline-any cline-neutral"> </span>
|
|
61
97
|
<span class="cline-any cline-neutral"> </span>
|
|
62
98
|
<span class="cline-any cline-neutral"> </span>
|
|
63
99
|
<span class="cline-any cline-neutral"> </span>
|
|
64
|
-
<span class="cline-any cline-yes">
|
|
100
|
+
<span class="cline-any cline-yes">11x</span>
|
|
101
|
+
<span class="cline-any cline-yes">3x</span>
|
|
102
|
+
<span class="cline-any cline-neutral"> </span>
|
|
103
|
+
<span class="cline-any cline-yes">11x</span>
|
|
104
|
+
<span class="cline-any cline-yes">1x</span>
|
|
105
|
+
<span class="cline-any cline-neutral"> </span>
|
|
106
|
+
<span class="cline-any cline-yes">11x</span>
|
|
107
|
+
<span class="cline-any cline-yes">1x</span>
|
|
108
|
+
<span class="cline-any cline-neutral"> </span>
|
|
109
|
+
<span class="cline-any cline-yes">11x</span>
|
|
110
|
+
<span class="cline-any cline-yes">4x</span>
|
|
111
|
+
<span class="cline-any cline-neutral"> </span>
|
|
112
|
+
<span class="cline-any cline-yes">11x</span>
|
|
113
|
+
<span class="cline-any cline-yes">2x</span>
|
|
114
|
+
<span class="cline-any cline-neutral"> </span>
|
|
115
|
+
<span class="cline-any cline-yes">11x</span>
|
|
116
|
+
<span class="cline-any cline-yes">3x</span>
|
|
117
|
+
<span class="cline-any cline-neutral"> </span>
|
|
118
|
+
<span class="cline-any cline-yes">11x</span>
|
|
119
|
+
<span class="cline-any cline-yes">2x</span>
|
|
120
|
+
<span class="cline-any cline-neutral"> </span>
|
|
121
|
+
<span class="cline-any cline-yes">11x</span>
|
|
122
|
+
<span class="cline-any cline-yes">1x</span>
|
|
123
|
+
<span class="cline-any cline-neutral"> </span>
|
|
124
|
+
<span class="cline-any cline-yes">11x</span>
|
|
125
|
+
<span class="cline-any cline-yes">1x</span>
|
|
126
|
+
<span class="cline-any cline-neutral"> </span>
|
|
127
|
+
<span class="cline-any cline-yes">11x</span>
|
|
128
|
+
<span class="cline-any cline-yes">3x</span>
|
|
129
|
+
<span class="cline-any cline-neutral"> </span>
|
|
130
|
+
<span class="cline-any cline-yes">11x</span>
|
|
65
131
|
<span class="cline-any cline-yes">1x</span>
|
|
66
132
|
<span class="cline-any cline-neutral"> </span>
|
|
67
|
-
<span class="cline-any cline-yes">
|
|
133
|
+
<span class="cline-any cline-yes">11x</span>
|
|
134
|
+
<span class="cline-any cline-yes">2x</span>
|
|
135
|
+
<span class="cline-any cline-neutral"> </span>
|
|
136
|
+
<span class="cline-any cline-yes">11x</span>
|
|
68
137
|
<span class="cline-any cline-yes">1x</span>
|
|
69
138
|
<span class="cline-any cline-neutral"> </span>
|
|
70
|
-
<span class="cline-any cline-yes">
|
|
139
|
+
<span class="cline-any cline-yes">11x</span>
|
|
140
|
+
<span class="cline-any cline-yes">2x</span>
|
|
141
|
+
<span class="cline-any cline-neutral"> </span>
|
|
142
|
+
<span class="cline-any cline-yes">11x</span>
|
|
71
143
|
<span class="cline-any cline-yes">1x</span>
|
|
72
144
|
<span class="cline-any cline-neutral"> </span>
|
|
73
145
|
<span class="cline-any cline-neutral"> </span>
|
|
74
|
-
<span class="cline-any cline-yes">
|
|
146
|
+
<span class="cline-any cline-yes">11x</span>
|
|
75
147
|
<span class="cline-any cline-neutral"> </span>
|
|
76
148
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import requestParameters from './requestParameters'
|
|
77
149
|
|
|
78
150
|
export default document => {
|
|
79
|
-
const { language, landingPage, mc, gclid, aclid, fbclid } = requestParameters(
|
|
151
|
+
const { language, landingPage, mc, gclid, aclid, fbclid, utm_source, utm_medium, utm_campaign, utm_content, utm_term, hsa_ad, hsa_cam, hsa_grp, hsa_kw, hsa_mt, hsa_src, hsa_tgt } = requestParameters(
|
|
80
152
|
document
|
|
81
153
|
)
|
|
82
154
|
const attributes = [
|
|
@@ -95,6 +167,42 @@ export default document => {
|
|
|
95
167
|
if (fbclid) {
|
|
96
168
|
attributes.push(`fbclid=${fbclid}`)
|
|
97
169
|
}
|
|
170
|
+
if (utm_source) {
|
|
171
|
+
attributes.push(`utm_source=${encodeURIComponent(utm_source)}`)
|
|
172
|
+
}
|
|
173
|
+
if (utm_medium) {
|
|
174
|
+
attributes.push(`utm_medium=${encodeURIComponent(utm_medium)}`)
|
|
175
|
+
}
|
|
176
|
+
if (utm_campaign) {
|
|
177
|
+
attributes.push(`utm_campaign=${encodeURIComponent(utm_campaign)}`)
|
|
178
|
+
}
|
|
179
|
+
if (utm_content) {
|
|
180
|
+
attributes.push(`utm_content=${encodeURIComponent(utm_content)}`)
|
|
181
|
+
}
|
|
182
|
+
if (utm_term) {
|
|
183
|
+
attributes.push(`utm_term=${encodeURIComponent(utm_term)}`)
|
|
184
|
+
}
|
|
185
|
+
if (hsa_ad) {
|
|
186
|
+
attributes.push(`hsa_ad=${encodeURIComponent(hsa_ad)}`)
|
|
187
|
+
}
|
|
188
|
+
if (hsa_cam) {
|
|
189
|
+
attributes.push(`hsa_cam=${encodeURIComponent(hsa_cam)}`)
|
|
190
|
+
}
|
|
191
|
+
if (hsa_grp) {
|
|
192
|
+
attributes.push(`hsa_grp=${encodeURIComponent(hsa_grp)}`)
|
|
193
|
+
}
|
|
194
|
+
if (hsa_kw) {
|
|
195
|
+
attributes.push(`hsa_kw=${encodeURIComponent(hsa_kw)}`)
|
|
196
|
+
}
|
|
197
|
+
if (hsa_mt) {
|
|
198
|
+
attributes.push(`hsa_mt=${encodeURIComponent(hsa_mt)}`)
|
|
199
|
+
}
|
|
200
|
+
if (hsa_src) {
|
|
201
|
+
attributes.push(`hsa_src=${encodeURIComponent(hsa_src)}`)
|
|
202
|
+
}
|
|
203
|
+
if (hsa_tgt) {
|
|
204
|
+
attributes.push(`hsa_tgt=${encodeURIComponent(hsa_tgt)}`)
|
|
205
|
+
}
|
|
98
206
|
|
|
99
207
|
return `/internal/pixel?${attributes.join('&')}`
|
|
100
208
|
}
|
|
@@ -104,7 +212,7 @@ export default document => {
|
|
|
104
212
|
</div><!-- /wrapper -->
|
|
105
213
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
106
214
|
Code coverage
|
|
107
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at
|
|
215
|
+
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Jan 20 2026 23:02:04 GMT+0100 (Central European Standard Time)
|
|
108
216
|
</div>
|
|
109
217
|
</div>
|
|
110
218
|
<script src="prettify.js"></script>
|
|
@@ -54,29 +54,77 @@
|
|
|
54
54
|
29
|
|
55
55
|
30
|
|
56
56
|
31
|
|
57
|
-
32
|
|
58
|
-
|
|
57
|
+
32
|
|
58
|
+
33
|
|
59
|
+
34
|
|
60
|
+
35
|
|
61
|
+
36
|
|
62
|
+
37
|
|
63
|
+
38
|
|
64
|
+
39
|
|
65
|
+
40
|
|
66
|
+
41
|
|
67
|
+
42
|
|
68
|
+
43
|
|
69
|
+
44
|
|
70
|
+
45
|
|
71
|
+
46
|
|
72
|
+
47
|
|
73
|
+
48
|
|
74
|
+
49
|
|
75
|
+
50
|
|
76
|
+
51
|
|
77
|
+
52
|
|
78
|
+
53
|
|
79
|
+
54
|
|
80
|
+
55
|
|
81
|
+
56</td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
82
|
+
<span class="cline-any cline-yes">272x</span>
|
|
83
|
+
<span class="cline-any cline-neutral"> </span>
|
|
84
|
+
<span class="cline-any cline-yes">272x</span>
|
|
85
|
+
<span class="cline-any cline-yes">736x</span>
|
|
86
|
+
<span class="cline-any cline-neutral"> </span>
|
|
87
|
+
<span class="cline-any cline-yes">736x</span>
|
|
88
|
+
<span class="cline-any cline-neutral"> </span>
|
|
89
|
+
<span class="cline-any cline-neutral"> </span>
|
|
90
|
+
<span class="cline-any cline-yes">272x</span>
|
|
91
|
+
<span class="cline-any cline-neutral"> </span>
|
|
92
|
+
<span class="cline-any cline-neutral"> </span>
|
|
93
|
+
<span class="cline-any cline-neutral"> </span>
|
|
94
|
+
<span class="cline-any cline-yes">17x</span>
|
|
95
|
+
<span class="cline-any cline-yes">17x</span>
|
|
96
|
+
<span class="cline-any cline-yes">17x</span>
|
|
97
|
+
<span class="cline-any cline-yes">17x</span>
|
|
98
|
+
<span class="cline-any cline-yes">17x</span>
|
|
99
|
+
<span class="cline-any cline-yes">17x</span>
|
|
100
|
+
<span class="cline-any cline-yes">17x</span>
|
|
101
|
+
<span class="cline-any cline-yes">17x</span>
|
|
102
|
+
<span class="cline-any cline-yes">17x</span>
|
|
103
|
+
<span class="cline-any cline-yes">17x</span>
|
|
104
|
+
<span class="cline-any cline-yes">17x</span>
|
|
105
|
+
<span class="cline-any cline-yes">17x</span>
|
|
106
|
+
<span class="cline-any cline-yes">17x</span>
|
|
107
|
+
<span class="cline-any cline-yes">17x</span>
|
|
108
|
+
<span class="cline-any cline-yes">17x</span>
|
|
109
|
+
<span class="cline-any cline-yes">17x</span>
|
|
110
|
+
<span class="cline-any cline-yes">17x</span>
|
|
111
|
+
<span class="cline-any cline-yes">17x</span>
|
|
112
|
+
<span class="cline-any cline-yes">17x</span>
|
|
113
|
+
<span class="cline-any cline-yes">17x</span>
|
|
114
|
+
<span class="cline-any cline-neutral"> </span>
|
|
115
|
+
<span class="cline-any cline-yes">17x</span>
|
|
116
|
+
<span class="cline-any cline-neutral"> </span>
|
|
117
|
+
<span class="cline-any cline-neutral"> </span>
|
|
118
|
+
<span class="cline-any cline-neutral"> </span>
|
|
119
|
+
<span class="cline-any cline-neutral"> </span>
|
|
59
120
|
<span class="cline-any cline-neutral"> </span>
|
|
60
|
-
<span class="cline-any cline-yes">36x</span>
|
|
61
|
-
<span class="cline-any cline-yes">36x</span>
|
|
62
121
|
<span class="cline-any cline-neutral"> </span>
|
|
63
|
-
<span class="cline-any cline-yes">36x</span>
|
|
64
122
|
<span class="cline-any cline-neutral"> </span>
|
|
65
123
|
<span class="cline-any cline-neutral"> </span>
|
|
66
|
-
<span class="cline-any cline-yes">36x</span>
|
|
67
124
|
<span class="cline-any cline-neutral"> </span>
|
|
68
125
|
<span class="cline-any cline-neutral"> </span>
|
|
69
126
|
<span class="cline-any cline-neutral"> </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-yes">9x</span>
|
|
76
|
-
<span class="cline-any cline-yes">9x</span>
|
|
77
|
-
<span class="cline-any cline-yes">9x</span>
|
|
78
127
|
<span class="cline-any cline-neutral"> </span>
|
|
79
|
-
<span class="cline-any cline-yes">9x</span>
|
|
80
128
|
<span class="cline-any cline-neutral"> </span>
|
|
81
129
|
<span class="cline-any cline-neutral"> </span>
|
|
82
130
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -106,6 +154,18 @@ export default function requestParameters (document) {
|
|
|
106
154
|
const gclid = findPropertyInParams(search, 'gclid')
|
|
107
155
|
const aclid = findPropertyInParams(search, 'aclid')
|
|
108
156
|
const fbclid = findPropertyInParams(search, 'fbclid')
|
|
157
|
+
const utm_source = findPropertyInParams(search, 'utm_source')
|
|
158
|
+
const utm_medium = findPropertyInParams(search, 'utm_medium')
|
|
159
|
+
const utm_campaign = findPropertyInParams(search, 'utm_campaign')
|
|
160
|
+
const utm_content = findPropertyInParams(search, 'utm_content')
|
|
161
|
+
const utm_term = findPropertyInParams(search, 'utm_term')
|
|
162
|
+
const hsa_ad = findPropertyInParams(search, 'hsa_ad')
|
|
163
|
+
const hsa_cam = findPropertyInParams(search, 'hsa_cam')
|
|
164
|
+
const hsa_grp = findPropertyInParams(search, 'hsa_grp')
|
|
165
|
+
const hsa_kw = findPropertyInParams(search, 'hsa_kw')
|
|
166
|
+
const hsa_mt = findPropertyInParams(search, 'hsa_mt')
|
|
167
|
+
const hsa_src = findPropertyInParams(search, 'hsa_src')
|
|
168
|
+
const hsa_tgt = findPropertyInParams(search, 'hsa_tgt')
|
|
109
169
|
|
|
110
170
|
return {
|
|
111
171
|
language: locale,
|
|
@@ -113,7 +173,19 @@ export default function requestParameters (document) {
|
|
|
113
173
|
mc,
|
|
114
174
|
gclid,
|
|
115
175
|
aclid,
|
|
116
|
-
fbclid
|
|
176
|
+
fbclid,
|
|
177
|
+
utm_source,
|
|
178
|
+
utm_medium,
|
|
179
|
+
utm_campaign,
|
|
180
|
+
utm_content,
|
|
181
|
+
utm_term,
|
|
182
|
+
hsa_ad,
|
|
183
|
+
hsa_cam,
|
|
184
|
+
hsa_grp,
|
|
185
|
+
hsa_kw,
|
|
186
|
+
hsa_mt,
|
|
187
|
+
hsa_src,
|
|
188
|
+
hsa_tgt
|
|
117
189
|
}
|
|
118
190
|
}
|
|
119
191
|
</pre></td></tr>
|
|
@@ -122,7 +194,7 @@ export default function requestParameters (document) {
|
|
|
122
194
|
</div><!-- /wrapper -->
|
|
123
195
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
124
196
|
Code coverage
|
|
125
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at
|
|
197
|
+
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Jan 20 2026 23:02:04 GMT+0100 (Central European Standard Time)
|
|
126
198
|
</div>
|
|
127
199
|
</div>
|
|
128
200
|
<script src="prettify.js"></script>
|
package/coverage/lcov.info
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
TN:
|
|
2
|
-
SF:/Users/
|
|
2
|
+
SF:/Users/joan.silio/code/factorial-pixel/src/index.js
|
|
3
3
|
FN:1,_interopRequireDefault
|
|
4
4
|
FNF:1
|
|
5
5
|
FNH:0
|
|
@@ -28,59 +28,119 @@ BRF:8
|
|
|
28
28
|
BRH:0
|
|
29
29
|
end_of_record
|
|
30
30
|
TN:
|
|
31
|
-
SF:/Users/
|
|
31
|
+
SF:/Users/joan.silio/code/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:7,
|
|
38
|
-
DA:14,
|
|
39
|
-
DA:15,
|
|
40
|
-
DA:17,
|
|
35
|
+
FNDA:11,(anonymous_0)
|
|
36
|
+
DA:4,11
|
|
37
|
+
DA:7,11
|
|
38
|
+
DA:14,11
|
|
39
|
+
DA:15,3
|
|
40
|
+
DA:17,11
|
|
41
41
|
DA:18,1
|
|
42
|
-
DA:20,
|
|
42
|
+
DA:20,11
|
|
43
43
|
DA:21,1
|
|
44
|
-
DA:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
DA:23,11
|
|
45
|
+
DA:24,4
|
|
46
|
+
DA:26,11
|
|
47
|
+
DA:27,2
|
|
48
|
+
DA:29,11
|
|
49
|
+
DA:30,3
|
|
50
|
+
DA:32,11
|
|
51
|
+
DA:33,2
|
|
52
|
+
DA:35,11
|
|
53
|
+
DA:36,1
|
|
54
|
+
DA:38,11
|
|
55
|
+
DA:39,1
|
|
56
|
+
DA:41,11
|
|
57
|
+
DA:42,3
|
|
58
|
+
DA:44,11
|
|
59
|
+
DA:45,1
|
|
60
|
+
DA:47,11
|
|
61
|
+
DA:48,2
|
|
62
|
+
DA:50,11
|
|
63
|
+
DA:51,1
|
|
64
|
+
DA:53,11
|
|
65
|
+
DA:54,2
|
|
66
|
+
DA:56,11
|
|
67
|
+
DA:57,1
|
|
68
|
+
DA:60,11
|
|
69
|
+
LF:33
|
|
70
|
+
LH:33
|
|
71
|
+
BRDA:8,0,0,11
|
|
72
|
+
BRDA:8,0,1,10
|
|
73
|
+
BRDA:14,1,0,3
|
|
74
|
+
BRDA:14,1,1,8
|
|
51
75
|
BRDA:17,2,0,1
|
|
52
|
-
BRDA:17,2,1,
|
|
76
|
+
BRDA:17,2,1,10
|
|
53
77
|
BRDA:20,3,0,1
|
|
54
|
-
BRDA:20,3,1,
|
|
55
|
-
|
|
56
|
-
|
|
78
|
+
BRDA:20,3,1,10
|
|
79
|
+
BRDA:23,4,0,4
|
|
80
|
+
BRDA:23,4,1,7
|
|
81
|
+
BRDA:26,5,0,2
|
|
82
|
+
BRDA:26,5,1,9
|
|
83
|
+
BRDA:29,6,0,3
|
|
84
|
+
BRDA:29,6,1,8
|
|
85
|
+
BRDA:32,7,0,2
|
|
86
|
+
BRDA:32,7,1,9
|
|
87
|
+
BRDA:35,8,0,1
|
|
88
|
+
BRDA:35,8,1,10
|
|
89
|
+
BRDA:38,9,0,1
|
|
90
|
+
BRDA:38,9,1,10
|
|
91
|
+
BRDA:41,10,0,3
|
|
92
|
+
BRDA:41,10,1,8
|
|
93
|
+
BRDA:44,11,0,1
|
|
94
|
+
BRDA:44,11,1,10
|
|
95
|
+
BRDA:47,12,0,2
|
|
96
|
+
BRDA:47,12,1,9
|
|
97
|
+
BRDA:50,13,0,1
|
|
98
|
+
BRDA:50,13,1,10
|
|
99
|
+
BRDA:53,14,0,2
|
|
100
|
+
BRDA:53,14,1,9
|
|
101
|
+
BRDA:56,15,0,1
|
|
102
|
+
BRDA:56,15,1,10
|
|
103
|
+
BRF:32
|
|
104
|
+
BRH:32
|
|
57
105
|
end_of_record
|
|
58
106
|
TN:
|
|
59
|
-
SF:/Users/
|
|
107
|
+
SF:/Users/joan.silio/code/factorial-pixel/src/requestParameters.js
|
|
60
108
|
FN:1,findPropertyInParams
|
|
61
109
|
FN:4,(anonymous_1)
|
|
62
110
|
FN:13,requestParameters
|
|
63
111
|
FNF:3
|
|
64
112
|
FNH:3
|
|
65
|
-
FNDA:
|
|
66
|
-
FNDA:
|
|
67
|
-
FNDA:
|
|
68
|
-
DA:2,
|
|
69
|
-
DA:4,
|
|
70
|
-
DA:5,
|
|
71
|
-
DA:7,
|
|
72
|
-
DA:10,
|
|
73
|
-
DA:14,
|
|
74
|
-
DA:15,
|
|
75
|
-
DA:16,
|
|
76
|
-
DA:17,
|
|
77
|
-
DA:18,
|
|
78
|
-
DA:19,
|
|
79
|
-
DA:20,
|
|
80
|
-
DA:21,
|
|
81
|
-
DA:
|
|
82
|
-
|
|
83
|
-
|
|
113
|
+
FNDA:272,findPropertyInParams
|
|
114
|
+
FNDA:736,(anonymous_1)
|
|
115
|
+
FNDA:17,requestParameters
|
|
116
|
+
DA:2,272
|
|
117
|
+
DA:4,272
|
|
118
|
+
DA:5,736
|
|
119
|
+
DA:7,736
|
|
120
|
+
DA:10,272
|
|
121
|
+
DA:14,17
|
|
122
|
+
DA:15,17
|
|
123
|
+
DA:16,17
|
|
124
|
+
DA:17,17
|
|
125
|
+
DA:18,17
|
|
126
|
+
DA:19,17
|
|
127
|
+
DA:20,17
|
|
128
|
+
DA:21,17
|
|
129
|
+
DA:22,17
|
|
130
|
+
DA:23,17
|
|
131
|
+
DA:24,17
|
|
132
|
+
DA:25,17
|
|
133
|
+
DA:26,17
|
|
134
|
+
DA:27,17
|
|
135
|
+
DA:28,17
|
|
136
|
+
DA:29,17
|
|
137
|
+
DA:30,17
|
|
138
|
+
DA:31,17
|
|
139
|
+
DA:32,17
|
|
140
|
+
DA:33,17
|
|
141
|
+
DA:35,17
|
|
142
|
+
LF:26
|
|
143
|
+
LH:26
|
|
84
144
|
BRDA:1,0,0,0
|
|
85
145
|
BRF:1
|
|
86
146
|
BRH:0
|
package/package.json
CHANGED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
var jumpToCode = (function init() {
|
|
3
|
-
// Classes of code we would like to highlight in the file view
|
|
4
|
-
var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
|
|
5
|
-
|
|
6
|
-
// Elements to highlight in the file listing view
|
|
7
|
-
var fileListingElements = ['td.pct.low'];
|
|
8
|
-
|
|
9
|
-
// We don't want to select elements that are direct descendants of another match
|
|
10
|
-
var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
|
|
11
|
-
|
|
12
|
-
// Selecter that finds elements on the page to which we can jump
|
|
13
|
-
var selector =
|
|
14
|
-
fileListingElements.join(', ') +
|
|
15
|
-
', ' +
|
|
16
|
-
notSelector +
|
|
17
|
-
missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
|
|
18
|
-
|
|
19
|
-
// The NodeList of matching elements
|
|
20
|
-
var missingCoverageElements = document.querySelectorAll(selector);
|
|
21
|
-
|
|
22
|
-
var currentIndex;
|
|
23
|
-
|
|
24
|
-
function toggleClass(index) {
|
|
25
|
-
missingCoverageElements
|
|
26
|
-
.item(currentIndex)
|
|
27
|
-
.classList.remove('highlighted');
|
|
28
|
-
missingCoverageElements.item(index).classList.add('highlighted');
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function makeCurrent(index) {
|
|
32
|
-
toggleClass(index);
|
|
33
|
-
currentIndex = index;
|
|
34
|
-
missingCoverageElements.item(index).scrollIntoView({
|
|
35
|
-
behavior: 'smooth',
|
|
36
|
-
block: 'center',
|
|
37
|
-
inline: 'center'
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function goToPrevious() {
|
|
42
|
-
var nextIndex = 0;
|
|
43
|
-
if (typeof currentIndex !== 'number' || currentIndex === 0) {
|
|
44
|
-
nextIndex = missingCoverageElements.length - 1;
|
|
45
|
-
} else if (missingCoverageElements.length > 1) {
|
|
46
|
-
nextIndex = currentIndex - 1;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
makeCurrent(nextIndex);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function goToNext() {
|
|
53
|
-
var nextIndex = 0;
|
|
54
|
-
|
|
55
|
-
if (
|
|
56
|
-
typeof currentIndex === 'number' &&
|
|
57
|
-
currentIndex < missingCoverageElements.length - 1
|
|
58
|
-
) {
|
|
59
|
-
nextIndex = currentIndex + 1;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
makeCurrent(nextIndex);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return function jump(event) {
|
|
66
|
-
if (
|
|
67
|
-
document.getElementById('fileSearch') === document.activeElement &&
|
|
68
|
-
document.activeElement != null
|
|
69
|
-
) {
|
|
70
|
-
// if we're currently focused on the search input, we don't want to navigate
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
switch (event.which) {
|
|
75
|
-
case 78: // n
|
|
76
|
-
case 74: // j
|
|
77
|
-
goToNext();
|
|
78
|
-
break;
|
|
79
|
-
case 66: // b
|
|
80
|
-
case 75: // k
|
|
81
|
-
case 80: // p
|
|
82
|
-
goToPrevious();
|
|
83
|
-
break;
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
})();
|
|
87
|
-
window.addEventListener('keydown', jumpToCode);
|
|
Binary file
|