Open chpapa opened 7 years ago
@royuen I remember you have mention Oursky team have implemented similar plugins for numerous time. Can you take the lead to implement it when it's about the right time?
@louischan-oursky FYI. The existing description and the notes on API design are just a brain dump of something I discussed with @royuen before. Feel free to overwrite it with what you would like to propose.
@tensiuyan why you removed the WIP label? I think Louis is actually working on it...
@rickmak @louischan-oursky so you two discussed and think the current spec is good? Shall we assume the specification are approved and it is design-complete already?
No, none ping me for any discussion. I don't know who approval the design spec.
@rickmak the initial implementation of the plugin part is here ready for review. I am going to work on the three client (android, ios, javascript). Can you create three repositories for me?
Or use something like this? https://github.com/rudderlabs/rudder-server
Description
A standard event tracking API supporting PostgreSQL as data store.
Design
Client API Design
Sample Code
Construction of a tracker
Usage of a tracker
Expected behavior
In addition to the properties given by the caller, the tracker also gather information from the runtime environment and send them to the server.
Common columns
_id
: a server generated UUIDv4 id for the event_user_id
: the user id of the user, in our case it is_user.id
_received_at
: the timestamp with timezone when the event is received by the server_tracked_at
: the timestamp with timezone when the event is tracker by the caller_sent_at
: the timestamp with timezone when the event is sent by the client_event_raw
: the event name as given by the caller, e.g.Posted an item for sale
_event_norm
: the normalized event_name, e.g.posted_an_item_for_sale
. This is same as the table name in the relational database_ips
: the ip as seen by the server.Web specific columns
_page_path
: the pathname of the url, e.g./about
_page_search
: the querystring of the url, e.g.?utm_campaign=easter-sale
_page_url
: the full url, e.g.https://www.example.com/about?utm_campaign=easter-sale
_page_referrer
: the value ofdocument.referrer
_utm_campaign
: theutm_campagin
in querystring, if any_utm_channel
: theutm_channel
in querystring, if any_user_agent
: the value ofnavigator.userAgent
Mobile specific columns
_app_id
:CFBundleIdentifier
orApplication.getPackageName()
_app_version
:CFBundleShortVersionString
orPackageInfo.versionName
_app_build_number
:CFBundleVersion
orPackageInfo.versionCode
_device_id
:[[UIDevice currentDevice] identifierForVendor]
orSettings.Secure.ANDROID_ID
_device_manufacturer
:"Apple"
orBuild.MANUFACTURER
_device_model
:utsname.machine
orBuild.MODEL
_device_os
:"ios"
or"android"
_device_os_version
:[[UIDevice currentDevice] systemVersion]
orBuild.VERSION.RELEASE
_device_carrier
:[CTCarrier carrierName]
orTelephonyManager.getNetworkOperatorName()
_device_locales
: A list of comma separated BCP47 tags, e.g. "en-US,ja-JP,zh-Hant-HK"_device_locale
: The first item of_device_locales
_device_timezone
:[[NSTimeZone localTimeZone] name]
orTimeZone.getDefault().getID()
Open Questions
Put a list of open questions here before a complete design / specification is decided
Related Issues
Progress Tracker
Advice