Using mixpanel to create custom dashboards for users

I like the graphics.

I would like to get some data and make it beautiful. But, alas, I lost a bit of what is considered best practice.

I chose mixpanel (just as an example) as it seems surprisingly easy to track user events and does not have any subdomain restrictions like Google Analytics.

Let's say I had 100-1000 + users who have an account (which is publicly seen), and I'm currently tracking the public interactions that their pages receive. With mixpanel, I can see data that is beautiful, and I split it into separate accounts. So far so good!

But then I want to show my users this information. And then my head begins to hurt. Should I schedule cron jobs, retrieve data from mixpanel and write it to the appropriate accounts? Or is there a better way? I looked at the mixpanel api (I use Ruby), but they keep telling me that I should use the javascript api. But when using JS, how can I prevent other data from receiving other data (that is, what causes someone to fake mixpanel api messages on the console or view my private key?).

What do you consider a practical solution in this case?

+8
api ruby-on-rails analytics mixpanel
source share
2 answers

You can achieve this by saving the user events of each user with the $ bucket value attached to them, which has a value unique to each user, as described in the mixpanel docs here Mixpanel docs . If you want to use ruby ​​for event handling, look at Mixpanel, the recommended ruby client libraries mixpanel_client looks like it was mentioned above. If you agree with this, you can service user-defined events, as shown in the example below (which is also in the gem readme file):

data = client.request do # Available options resource 'events/properties' event '["test-event"]' name 'hello' values '["uno", "dos"]' timezone '-8' type 'general' unit 'hour' interval 24 limit 5 bucket 'contents' from_date '2011-08-11' to_date '2011-08-12' on 'properties["product_id"]' where '1 in properties["product_id"]' buckets '5' end 
+5
source share

You can try a service like Keen IO, which allows you to generate encrypted keys for reading and reading the API. Keen IO is designed for customizable and software analytic functions, such as providing analytics to your customers, where MixPanel is more suitable for exploring your data in the user interface. The idea with an encrypted cloud key is that they will never be able to access your account, but only the data that you want to view. You can easily tag your events with a customer ID, and then use Scoped Keys so that you only show your data to customers.

https://keen.io/docs/security/#scoped-key

In addition, Keen IO has an importer that allows you to export your mixpanel events to your Keen IO database.

+1
source share

All Articles