Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major update changing how we identify amplitude users #172

Merged
merged 8 commits into from Jul 21, 2020

Conversation

victor-cortez
Copy link
Contributor

@victor-cortez victor-cortez commented Jul 15, 2020

  • Now we are able to add cookies to the browser using resources/cookiegen.html, which has a setCookie() javascript function and a handler function that will execute commands given as get arguments. Currently we have the cookie arguments and the argument to load the user with geolocation and ip data.

  • Using those cookies amplitude will now take the geolocation cookie and use that information to feed amplitude. With that the geolocation (and possibly future user data features) now depends on information coming from the client side, and not the server side. This is still subject to adblockers and we are not trying to go over it. As of now we are only registering data from the user coming from http headers (although the IP needs to be registered through a third-party to go over streamlit restrictions)

  • Also using those cookies we store a unique user id in each user's browser. If the cookie is already present we use it as the id for amplitude and if not present we create a new one. This way we can track users way better than before when we just relied on the server-side ip.

  • Solved the problem of pointless amplitude logs due to cascade rerunning. Now we have an amplitude logging manager that receives the call for an event but decides if the event is worth logging or not by using our session makeshift db. This is to avoid us logging multiple times the same event when the page reloads.

  • Also added minor changes to Saúdem em ordem's description

  • Also fixed some of streamlit's timing problems that were causing bugs in our mobile version by adding some small wait and page reload triggers.

@fernandascovino
Copy link
Contributor

@fernandascovino
Copy link
Contributor

I added a for-now-fix on the capacity card display - it wasn't changing with data cases change because it gets the value from user_input["population_params"]["I"]"...

let's end user_input and just work with session_state? I think it's a better way to solve ir for good

@fernandascovino fernandascovino merged commit 6421ccf into master Jul 21, 2020
@fernandascovino fernandascovino deleted the amplitude_unique_user_update branch August 3, 2020 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants