Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

add workspace_id, domain, key and country

Pedro Ladeira4b23d564c76d
diff --git a/apps/web/lib/api/commissions/create-manual-commissions.ts b/apps/web/lib/api/commissions/create-manual-commissions.ts
index 6998a52aa9..faccb29afa 100644
--- a/apps/web/lib/api/commissions/create-manual-commissions.ts
+++ b/apps/web/lib/api/commissions/create-manual-commissions.ts
@@ -447,9 +447,13 @@ async function recordEvents(args: RecordEventsArgs) {
timestamp: clickedAt.toISOString(),
identity_hash: targetCustomer.externalId || targetCustomer.id,
click_id: clickId,
+ workspace_id: workspace.id,
link_id: targetLink.id,
+ domain: targetLink.domain,
+ key: targetLink.key,
url: targetLink.url,
ip: "127.0.0.1",
+ country: targetCustomer.country || "Unknown",
continent: targetCustomer.country
? COUNTRIES_TO_CONTINENTS[targetCustomer.country.toUpperCase()] || ""
: "",