tidy up customerio code
This commit is contained in:
parent
cc14ebac48
commit
a3e83659f7
|
@ -163,7 +163,6 @@ class Travis::Api::App
|
||||||
puts "this is the first log in!!"
|
puts "this is the first log in!!"
|
||||||
# send event to customer.io
|
# send event to customer.io
|
||||||
customerio = Customerio::Client.new(Travis.config.customerio.site_id, Travis.config.customerio.api_key, :json => true)
|
customerio = Customerio::Client.new(Travis.config.customerio.site_id, Travis.config.customerio.api_key, :json => true)
|
||||||
puts "customerio client set up"
|
|
||||||
payload = {
|
payload = {
|
||||||
:id => user.id,
|
:id => user.id,
|
||||||
:name => user.name,
|
:name => user.name,
|
||||||
|
@ -172,8 +171,7 @@ class Travis::Api::App
|
||||||
:created_at => user.created_at.to_i,
|
:created_at => user.created_at.to_i,
|
||||||
:github_id => user.github_id,
|
:github_id => user.github_id,
|
||||||
:education => user.education }
|
:education => user.education }
|
||||||
puts "about to identify" + payload.inspect
|
customerio.identify(payload)
|
||||||
customerio.identify( payload )
|
|
||||||
# user.update_attributes(first_logged_in_at: Time.now)
|
# user.update_attributes(first_logged_in_at: Time.now)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user