Skip to content

Instantly share code, notes, and snippets.

@sinan
Last active September 12, 2016 22:08
Show Gist options
  • Save sinan/7efe9c19fcefd6e2af6b550a0a0fe4da to your computer and use it in GitHub Desktop.
Save sinan/7efe9c19fcefd6e2af6b550a0a0fe4da to your computer and use it in GitHub Desktop.
hasoffers identify/track calls thru segment
# IDENTIFY CALL WITH TRANSACTION_ID
{
"messageId": "api-DKJ9on3WyBhZegvIP246o1MQeKs5cDn8",
"projectId": "2XFFlhuziK",
"integration": "HasOffers",
"error": {
"name": "Error",
"retry": false,
"status": 400,
"message": "cannot POST /segment.php (400)"
},
"requests": [
{
"request": {
"method": "POST",
"url": "https://segment.go2cloud.org/segment.php",
"data": {
"channel": "server",
"context": {
"library": {
"name": "analytics-node",
"version": "1.2.2"
}
},
"message_id": "api-DKJ9on3WyBhZegvIP246o1MQeKs5cDn8",
"received_at": "2016-09-12T22:05:41.632Z",
"sent_at": "2016-09-12T22:05:41.275Z",
"timestamp": "2016-09-12T22:05:41.632Z",
"traits": {
"env": "dev",
"hostname": "dev.koding.com:8090",
"last_login_date": "2016-09-12T22:05:41.264Z",
"transaction_id": "1026d7cec58fb6b02144374c7c77f1"
},
"type": "identify",
"user_id": "sinan",
"version": 2
},
"query": {}
},
"response": {
"status": 400,
"header": {
"content-type": "text/html; charset=utf-8",
"date": "Mon, 12 Sep 2016 22:05:42 GMT",
"content-length": "0",
"connection": "keep-alive"
},
"text": ""
}
}
]
}
# TRACK CALL WITH GOAL_ID
{
"messageId": "324d176a-c952-4da0-bd48-409286e40f69",
"projectId": "2XFFlhuziK",
"integration": "HasOffers",
"error": {
"name": "Error",
"retry": false,
"status": 400,
"message": "cannot POST /segment.php (400)"
},
"requests": [
{
"request": {
"method": "POST",
"url": "https://segment.go2cloud.org/segment.php",
"data": {
"channel": "server",
"context": {
"library": {
"name": "analytics-go",
"version": "2.1.0"
}
},
"event": "sent invitation",
"message_id": "324d176a-c952-4da0-bd48-409286e40f69",
"properties": {
"body": "",
"body_type": 0,
"current_date": "Sep 12, 2016",
"email": "",
"env": "dev",
"goal_id": 10,
"group_name": "jabba",
"host": "dev.koding.com:8090",
"subject": "sent invitation"
},
"received_at": "2016-09-12T22:07:06.905Z",
"sent_at": "2016-09-12T22:07:06.000Z",
"timestamp": "2016-09-12T22:07:06.905Z",
"type": "track",
"user_id": "sinan",
"version": 2
},
"query": {}
},
"response": {
"status": 400,
"header": {
"content-type": "text/html; charset=utf-8",
"date": "Mon, 12 Sep 2016 22:07:07 GMT",
"server": "nginx",
"content-length": "0",
"connection": "keep-alive"
},
"text": ""
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment