GithubHelp home page GithubHelp logo

Tracking User Events about clip HOT 6 CLOSED

asmuth avatar asmuth commented on April 28, 2024
Tracking User Events

from clip.

Comments (6)

asmuth avatar asmuth commented on April 28, 2024

I hope this helps...

to set the username and picture send these events to fm
-> you don't need to define any event handlers
-> the session token (_session) could be your unique session id
or the unique user id (it's hashed)

# set the user name
{ "_type": "_set_name", "name": "Tingle Tangle Bob", "_session": "mysessiontoken" }

# set the user picture
{ "_type": "_set_picture", "url": "http:#myhost/123.jpg", "_session": "mysessiontoken" }

if you want to count action/events unique per session you can
set up an event handler like this:

gauge :myaction_uniqe, 
  :tick => 1.day.to_i, 
  :unique => true

event :myaction do
  incr :myaction_uniqe
end

and send events like this one:
{ "_type": "myaction", "_session": "mysesstiontoken" }

the gauge will only be incremented once per session token (and tick/interval)
so this gauge would show "daily unique myactions"

if you want e.g. the average body size of all users on a given day:

gauge :average_body_size, 
  :tick => 1.day.to_i, 
  :unique => true,
  :average => true

event :user_body_info do
  incr :average_body_size, data[:body_size]
end

# events:
{ "_type": "user_body_info", "body_size": 186, "_session": "userid_1" }
{ "_type": "user_body_info", "body_size": 162, "_session": "userid_2" }
{ "_type": "user_body_info", "body_size": 173, "_session": "userid_3" }

from clip.

votinhthieugia avatar votinhthieugia commented on April 28, 2024

Well, thanks for your quickly response but I think you misunderstand my problems.

  1. The first is how do I keep track of each user's events (by clicking one user on the right tab Active User), can it show all the events that user does (for i.e 1pm he attacks, 2pm he robs, when i select this user it will show me these 2 events)?
  2. The second is: the event 'attack' belongs to user 'A' after the first post but after the second post (event 'rob' with session 'B'), the event 'attack' of user 'A' is changed to 'rob' of user 'B')?

from clip.

kazjote avatar kazjote commented on April 28, 2024

@votinhthieugia I guess you can't track particular user activity right now. I will work on it now as it seems to be quite easy to implement and extremly handy.

from clip.

kazjote avatar kazjote commented on April 28, 2024

@votinhthieugia here you are: #32

from clip.

asmuth avatar asmuth commented on April 28, 2024

Merged! :)

from clip.

votinhthieugia avatar votinhthieugia commented on April 28, 2024

Thank guys :)

from clip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.