Skip to content

Instantly share code, notes, and snippets.

@vutran0111
Last active September 19, 2017 10:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vutran0111/5c33db40b4d12f0ba85ff845ab3ce855 to your computer and use it in GitHub Desktop.
Save vutran0111/5c33db40b4d12f0ba85ff845ab3ce855 to your computer and use it in GitHub Desktop.
user_id='iden1'
event_name = "new_event"
hook_data= {
"anonymousId"=>nil,
"channel"=>"server",
"context"=>{"library"=>{"name"=>"simple_segment", "version"=>"0.1.1"}},
"event"=>event_name,
"integrations"=>{},
"messageId"=>"api-bV5ZmieDrhHeMrqwsAqqUytqWec3q6EY",
"originalTimestamp"=>"2017-09-10T00:32:29+08:00",
"projectId"=>"3jjqD3uFsq",
"properties"=>{},
"receivedAt"=>"2017-09-09T16:32:30.575Z",
"sentAt"=>"2017-09-09T16:32:29.000Z",
"timestamp"=>"2017-09-09T16:32:30.575Z",
"type"=>"track",
"userId"=>user_id,
"source"=>"dummysource1",
"version"=>2
}.with_indifferent_access
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment