mixpanel-ruby icon indicating copy to clipboard operation
mixpanel-ruby copied to clipboard

Ability to set the timestamp

Open kmcgaire opened this issue 7 years ago • 2 comments

  • I can't see this in the docs anywhere. I'm wondering if there is a supported feature to set the timestamp of the event.
  • ie. If we send events asynchronously but we have a timestamp of when it actually occurred I would like that to be the timestamp on the event

kmcgaire avatar Mar 10 '17 18:03 kmcgaire

Bump

kmcgaire avatar Apr 05 '17 15:04 kmcgaire

There is a special property called time that will do exactly what you want. See more https://mixpanel.com/help/reference/http#tracking-events

// Tracks an event, recording the fact that
// user "13793", completed level 9
// on January 15th, 2013 on a machine with ip
// 203.0.113.9
{
    "event": "Level Complete",
    "properties": {
        "Level Number": 9,
        "distinct_id": "13793",
        "token": "e3bc4100330c35722740fb8c6f5abddc",
        "time": 1358208000,
        "ip": "203.0.113.9"
    }
}

kdeggelman avatar Jul 21 '17 22:07 kdeggelman