Skip to content

Commit b7f8562

Browse files
committed
Always set client-tracked click ID if successful
1 parent fb4cfa9 commit b7f8562

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

packages/script/src/base.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,6 @@
200200

201201
clientClickTracked = true;
202202

203-
const params = new URLSearchParams(location.search);
204-
const serverClickId = params.get(DUB_ID_VAR);
205-
206203
fetch(`${API_HOST}/track/click`, {
207204
method: 'POST',
208205
headers: { 'Content-Type': 'application/json' },
@@ -216,12 +213,6 @@
216213
.then((res) => res.ok && res.json())
217214
.then((data) => {
218215
if (data) {
219-
if (serverClickId && serverClickId !== data.clickId) {
220-
console.warn(
221-
`[dubAnalytics] Client-tracked click ID ${data.clickId} does not match server-tracked click ID ${serverClickId}, skipping...`,
222-
);
223-
return;
224-
}
225216
cookieManager.set(DUB_ID_VAR, data.clickId);
226217
// if partner data is present, set it as dub_partner_data cookie
227218
if (data.partner) {

0 commit comments

Comments
 (0)