SkygearIO / features

Feature Tracking Repo for Skygear
Apache License 2.0
3 stars 12 forks source link

Standard Event Tracking API #33

Open chpapa opened 7 years ago

chpapa commented 7 years ago

Description

A standard event tracking API supporting PostgreSQL as data store.

Design

Client API Design

SkygearTracker(container: SkygearContainer)
SkygearTracker.prototype.track(eventName: string, properties: { [string]: number | string | boolean })

Sample Code

Construction of a tracker

import SkygearTracker from 'skygear-tracker';
// skygear is actually an instance of SkygearContainer
import skygear from 'skygear';

// To construct an instance of SkygearTracker
// Invoke the constructor with an instance of SkygearContainer
const skygearTracker = new SkygearTracker(skygear);
// You can use this skygearTracker throughout your app if you only work with a single
// SkygearContainer

Usage of a tracker

skygearTracker.track('Posted an item for sale', {
  currency: 'HKD',
  price: 20,
});

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

Web specific columns

Mobile specific columns

Open Questions

Put a list of open questions here before a complete design / specification is decided

Related Issues

Progress Tracker

Advice

chpapa commented 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?

chpapa commented 7 years ago

@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.

chpapa commented 7 years ago

@tensiuyan why you removed the WIP label? I think Louis is actually working on it...

chpapa commented 7 years ago

@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?

rickmak commented 7 years ago

No, none ping me for any discussion. I don't know who approval the design spec.

louischan-oursky commented 7 years ago

@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?

rickmak commented 7 years ago
chpapa commented 5 years ago

Or use something like this? https://github.com/rudderlabs/rudder-server