mirror of
https://github.com/rybbit-io/rybbit.git
synced 2025-05-11 04:15:36 +02:00
add event tracking
This commit is contained in:
parent
a622799599
commit
fcdbe1429f
7 changed files with 291 additions and 163 deletions
|
@ -10,6 +10,9 @@ type TotalPayload = TrackingPayload & {
|
|||
ua: UAParser.IResult;
|
||||
referrer: string;
|
||||
ipAddress: string;
|
||||
event_type?: string;
|
||||
event_name?: string;
|
||||
properties?: string;
|
||||
};
|
||||
|
||||
class PageviewQueue {
|
||||
|
@ -82,6 +85,9 @@ class PageviewQueue {
|
|||
country: countryCode,
|
||||
iso_3166_2:
|
||||
countryCode && regionCode ? countryCode + "-" + regionCode : "",
|
||||
event_type: pv.event_type || "pageview",
|
||||
event_name: pv.event_name || "",
|
||||
properties: pv.properties,
|
||||
};
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue