serveit-ca / curastreamPlugin

Curastream
https://www.curastream.com
0 stars 0 forks source link

User Tracking #75

Open serveit-ca opened 5 years ago

serveit-ca commented 5 years ago

Create three API Endpoints which have the following capabilities

For each of these endpoints we want the following items to be recorded

User Reporting page We want a page created in the Curastream plugin which will display the end user activtity The following columns will be needed

SideonDeaka commented 5 years ago

@serveit-ca We should discuss about how to track this data, my best option for is it a cura_user_tracking table? where we have ID(PK), user_id, program_id, exercise_id, timestamp. ?

SideonDeaka commented 5 years ago

FINAL SCHEMA PROPOSAL:

dev_cura_user_tracking id(int 11) - PK; user_id (int 11) - FK; event_type(int 1) - 0 Login event, 1 Program View Event, 2 Exercise View Event, 3 Program View Event. program_id (int 11) - FK; exercise_id (int 11) - FK; timestamp (TIMESTAMP);

SideonDeaka commented 5 years ago

User Tracking - Create Git Issue and Briefing

SideonDeaka commented 5 years ago

User Tracking - Database Creation

SideonDeaka commented 5 years ago

User Tracking - Endpoint Creation

serveit-ca commented 5 years ago

the database structure looks great!

SideonDeaka commented 5 years ago

CREATE TABLE dev_cura_user_tracking( id int(11) AUTO_INCREMENT, user_id int(11), event_type int(1), program_id int(11), exercise_id int(11), event_timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id));

SideonDeaka commented 5 years ago

@serveit-ca For the Corp Account Field in the user metrics page, we can only currently see if the user belongs to a corp by checking their groups and then if their groups belong to a corp, which also runs into the really weird scenario where a user is in 2 corps? You had a solution via the API.

SideonDeaka commented 5 years ago

Everything is done for this task, we just need to figure out how to have these API's fire correctly on both the website and app.

SideonDeaka commented 5 years ago

Commented out testing function on line 803 of test-wp-program as for some reason the database is seeing duplicate primary key entries upon trying to log a user in multiple times, the code works just fine when ran locally, both this exact unit test, and for the metrics page.

serveit-ca commented 5 years ago

hey @SideonDeaka what is left on this ticket other than the integration with the app and the website pages.

Can you please start to do the integration of the website side of the application.

The pages we need to update with the api calls will be as follows: