Tootman / ClientMap

0 stars 0 forks source link

How to track client log-in #92

Closed Tootman closed 4 years ago

Tootman commented 4 years ago

ISSUE

Different Users using same profile (in order to track usage from customers) eg Dan_HT@admin.orcl.co.uk and TestToerHalets@ both need to access theTH Map and profile

Idea of User proxies - where one or more FBUsers can access the same Mapbox UserProfile

Possible solutions:

Extra step in ClientMap login (non breaking): Login then look up UserProfileKey from User UID, then ... (So on live version UserID works as usual (as UserProfile key remains same, and on Draft ,with new login source code, extra step is inserted when looking up UserProfile.

Using PowerShell to add children to :

firebase database:set /App/UserProfileLookup/3dgdFghkrdiFT9 -d '\"myUserProfileKey\"'

Code snippets roughly:


const loggedIn = myUid => { // insert extra stage of lookup, which returns userProfile Id: lookupUserProfileIdfromUid(myUid).then // logged in Func getUserProfileFromFirebase(myUserProfileId).then(snapshot => {


const lookupUserProfileIdfromUid = Uid =>{ .... }


something like ...

database() .ref(App/UserProfileLookup/${userUId}/) .once("value") // return result as parameter to getUserProfile .then(result => {


da*-t***hae*@admin.ocl.co.uk apinghear*$

Tootman commented 4 years ago

on hold - Only advantage of implimenting this is because FB logs last time a user logs in - no other info about usage - so maybe not easy to tie up user behavious on website to userId

Tootman commented 4 years ago

Implimented GoogleTagManager - but not intended to identify specific user (client) usage