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.

Update example-data.ts

Tim Wilsonc202faf44c1b
diff --git a/apps/web/ui/analytics/events/example-data.ts b/apps/web/ui/analytics/events/example-data.ts
index dceaa9921e..87e4bc2ba2 100644
--- a/apps/web/ui/analytics/events/example-data.ts
+++ b/apps/web/ui/analytics/events/example-data.ts
@@ -1,133 +1,137 @@
+const common = {
+ ip: "0.0.0.0",
+ referer: "(direct)",
+ qr: 0,
+ device: "Desktop",
+ browser: "Chrome",
+ os: "Mac OS",
+};
+
+const dubLink = {
+ link_id: "1",
+ domain: "dub.link",
+ key: "uxUrVCz",
+ url: "https://dub.co/",
+ link: {
+ id: "1",
+ domain: "dub.link",
+ key: "uxUrVCz",
+ url: "https://dub.co/",
+ },
+};
+
+const githubLink = {
+ link_id: "3",
+ domain: "git.new",
+ key: "9XyzIho",
+ url: "https://github.com/dubinc/dub",
+ link: {
+ id: "3",
+ domain: "git.new",
+ key: "9XyzIho",
+ url: "https://github.com/dubinc/dub",
+ },
+};
+
+const steven = {
+ customer_name: "Steven",
+ customer_email: "",
+ customer_avatar: "https://avatar.vercel.sh/s.png?text=S",
+ customer: {
+ name: "Steven",
+ email: "",
+ avatar: "https://avatar.vercel.sh/s.png?text=S",
+ },
+};
+
+const tim = {
+ customer_name: "Tim",
+ customer_email: "",
+ customer_avatar: "https://avatar.vercel.sh/t.png?text=T",
+ customer: {
+ name: "Tim",
+ email: "",
+ avatar: "https://avatar.vercel.sh/t.png?text=T",
+ },
+};
+
+const kiran = {
+ customer_name: "Kiran",
+ customer_email: "",
+ customer_avatar: "https://avatar.vercel.sh/k.png?text=K",
+ customer: {
+ name: "Kiran",
+ email: "",
+ avatar: "https://avatar.vercel.sh/k.png?text=K",
+ },
+};
+
export const exampleData = {
clicks: [
{
+ ...common,
timestamp: "2024-06-09T16:12:02.556Z",
click_id: "1",
country: "US",
city: "San Francisco",
- device: "Desktop",
- browser: "Chrome",
- os: "Mac OS",
- referer: "(direct)",
- qr: 0,
- link: {
- id: "1",
- domain: "dub.link",
- key: "uxUrVCz",
- url: "https://dub.co/",
- },
+ ...dubLink,
},
{
+ ...common,
timestamp: "2024-06-09T15:52:02.556Z",
click_id: "2",
country: "US",
city: "San Francisco",
- device: "Desktop",
- browser: "Chrome",
- os: "Mac OS",
- referer: "(direct)",
- qr: 0,
- link: {
- id: "2",
- domain: "dub.link",
- key: "cHT2sg4",
- url: "https://google.com",
- },
+ ...dubLink,
},
{
+ ...common,
timestamp: "2024-06-08T13:32:02.556Z",
click_id: "3",
country: "US",
city: "New York",
- device: "Desktop",
- browser: "Firefox",
- os: "Mac OS",
- referer: "(direct)",
- qr: 0,
- link: {
- id: "3",
- domain: "git.new",
- key: "9XyzIho",
- url: "https://github.com/dubinc/dub",
- },
+ ...githubLink,
},
],
leads: [
{
+ ...common,
+ click_id: "1",
timestamp: "2024-06-11T17:03:56.000Z",
event_id: "YbL8RwLTRRCxQz5H",
event_name: "Sign up",
country: "US",
city: "San Francisco",
- device: "Desktop",
- browser: "Chrome",
- os: "Mac OS",
- referer: "(direct)",
- qr: 0,
- ip: "",
- link: {
- id: "1",
- domain: "dub.link",
- key: "uxUrVCz",
- url: "https://dub.co/",
- },
- customer: {
- name: "Steven",
- email: "",
- avatar: "https://avatar.vercel.sh/s.png?text=S",
- },
+ ...dubLink,
+ ...steven,
},
{
+ ...common,
+ click_id: "2",
timestamp: "2024-06-10T16:07:56.000Z",
event_id: "YbL8RwLTRRCxQz5H",
event_name: "Sign up",
country: "IN",
city: "Kerala",
- device: "Desktop",
- browser: "Chrome",
- os: "Mac OS",
- referer: "(direct)",
- qr: 0,
- ip: "",
- link: {
- id: "1",
- domain: "dub.link",
- key: "uxUrVCz",
- url: "https://dub.co/",
- },
- customer: {
- name: "Kiran",
- email: "",
- avatar: "https://avatar.vercel.sh/k.png?text=K",
- },
+ ...dubLink,
+ ...kiran,
},
{
+ ...common,
+ click_id: "3",
timestamp: "2024-06-10T16:07:56.000Z",
event_id: "YbL8RwLTRRCxQz5H",
event_name: "Sign up",
country: "US",
city: "Pittsburgh",
- device: "Desktop",
- browser: "Chrome",
- os: "Mac OS",
- referer: "(direct)",
- qr: 0,
- ip: "",
- link: {
- id: "1",
- domain: "dub.link",
- key: "uxUrVCz",
- url: "https://dub.co/",
- },
- customer: {
- name: "Tim",
- email: "",
- avatar: "https://avatar.vercel.sh/t.png?text=T",
- },
+ ...dubLink,
+ ...tim,
},
],
sales: [
{
+ ...common,
+ click_id: "1",
timestamp: "2024-06-14T18:36:01.000Z",
event_id: "Nffk2cwShKu5lQ7E",
event_name: "Purchase",
@@ -136,24 +140,12 @@ export const exampleData = {
amount: 900,
country: "US",
city: "San Francisco",
- device: "Desktop",
- browser: "Chrome",
- os: "Mac OS",
- referer: "(direct)",
- qr: 0,
- link: {
- id: "clx97xeyl00017deqwbuvqmq7",
- domain: "dub.localhost",
- key: "0SHZh1V",
- url: "https://dub.co/",
- },
- customer: {
- name: "Steven",
- email: "",
- avatar: "https://avatar.vercel.sh/s.png?text=S",
- },
+ ...dubLink,
+ ...steven,
},
{
+ ...common,
+ click_id: "2",
timestamp: "2024-06-13T20:36:06.000Z",
event_id: "Nffk2cwShKu5lQ7E",
event_name: "Purchase",
@@ -162,24 +154,12 @@ export const exampleData = {
amount: 700,
country: "US",
city: "Pittsburgh",
- device: "Desktop",
- browser: "Chrome",
- os: "Mac OS",
- referer: "(direct)",
- qr: 0,
- link: {
- id: "clx97xeyl00017deqwbuvqmq7",
- domain: "dub.localhost",
- key: "0SHZh1V",
- url: "https://dub.co/",
- },
- customer: {
- name: "Tim",
- email: "",
- avatar: "https://avatar.vercel.sh/t.png?text=T",
- },
+ ...dubLink,
+ ...tim,
},
{
+ ...common,
+ click_id: "2",
timestamp: "2024-06-13T22:02:06.000Z",
event_id: "Nffk2cwShKu5lQ7E",
event_name: "Purchase",
@@ -188,22 +168,8 @@ export const exampleData = {
amount: 1000,
country: "IN",
city: "Kerala",
- device: "Desktop",
- browser: "Chrome",
- os: "Mac OS",
- referer: "(direct)",
- qr: 0,
- link: {
- id: "clx97xeyl00017deqwbuvqmq7",
- domain: "dub.localhost",
- key: "0SHZh1V",
- url: "https://dub.co/",
- },
- customer: {
- name: "Kiran",
- email: "",
- avatar: "https://avatar.vercel.sh/k.png?text=K",
- },
+ ...dubLink,
+ ...kiran,
},
],
};