Skip to content

Instantly share code, notes, and snippets.

@bperin
Created July 26, 2017 22:41
Show Gist options
  • Save bperin/1c3fc32ab9631349abefeb5c2c3fa0c9 to your computer and use it in GitHub Desktop.
Save bperin/1c3fc32ab9631349abefeb5c2c3fa0c9 to your computer and use it in GitHub Desktop.
import analytics
def on_error(error, items):
print("An error occurred:", error)
analytics.write_key = '0XP3g01Vs3vFPzQ0GL7fwWDmqaQs6Jv0'
analytics.debug = False
# analytics.on_error = on_error
analytics.identify('bperin@ridecell.com', {
'email': 'bperin@ridecell.com',
'name': 'Brian'
})
app = {
"name": "ridesharing",
"namespace": "com.ridecell.platform.leonidas.platform"
}
context = {
"device": {
"idfv": "a22e929a-7f91-4726-81e1-e4ce02b99458"
}
}
integrations = {
'all':True
}
count = 0
while count < 50:
print(count)
count += 1 # This is the same as count = count + 1
analytics.track('bperin@ridecell.com','backend_event'+str(count),{},context,None,1,integrations)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment