Skip to content

Commit bd63359

Browse files
committed
Update index.js
1 parent 3561f13 commit bd63359

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/script/src/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
}
105105

106106
// Support cross-domain tracking
107-
function appendCrossDomainClickId(clickId) {
107+
function addClickTrackingToLinks(clickId) {
108108
let { domains } = getOptions(script);
109109

110110
if (!domains || domains.length === 0) {
@@ -150,7 +150,7 @@
150150

151151
if (clickId) {
152152
checkCookieAndSet(clickId);
153-
appendCrossDomainClickId(clickId);
153+
addClickTrackingToLinks(clickId);
154154
return;
155155
}
156156

@@ -188,12 +188,12 @@
188188
}
189189
const { clickId } = await res.json(); // Response: { clickId: string }
190190
checkCookieAndSet(clickId);
191-
appendCrossDomainClickId(clickId);
191+
addClickTrackingToLinks(clickId);
192192
});
193193
}
194194

195195
watchForQueryParams();
196-
appendCrossDomainClickId();
196+
addClickTrackingToLinks();
197197

198198
// Listen for URL changes in case of SPA where the page doesn't reload
199199
window.addEventListener('popstate', watchForQueryParams);

0 commit comments

Comments
 (0)