{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/identify","auth":"required","results":{"codes":[]},"settings":"","examples":{"codes":[{"name":"","language":"shell","code":"curl https://track.attributionapp.com/identify \\\n  -u YOUR_PROJECT_ID: \\\n  -d '{\"user_id\": \"TEST_123\", \"traits\": {\"email\": \"bob:::at:::initech.co\", \"created_at\": \"2017-03-04T01:07:47Z\"}}'"},{"code":"require_once(\"./analytics-php/lib/Attribution.php\");\nclass_alias('Segment', 'Attribution');\n\nAttribution::init(\"ATTRIBUTION_PROJECT_ID\", array(\n\t\"host\" => \"track.attributionapp.com\",\n));\n\nAttribution::identify(array(\n\t\"userId\" => \"test123\",\n\t\"traits\" => array(\n\t\t\"email\" => \"[email protected]\",\n\t\t\"name\" => \"Tester One-Two-Three\",\n\t\t\"purchase_count\" => 2\n\t)\n));","language":"php"}]},"method":"post","params":[{"name":"user_id","type":"string","default":"TEST_1234","desc":"ID of the user from your database","required":true,"in":"body","ref":"","_id":"5fadd512ab3e5c002c929761"},{"name":"traits","type":"object","default":"{ \"email\": \"[email protected]\", \"first_name\": \"Bob\", \"last_name\": \"Slydell\" }","desc":"pass any key-value traits that identify your user, \"email\" and \"name\" will help you find your users in dashboard","required":true,"in":"body","ref":"","_id":"5fadd512ab3e5c002c929760"}]},"next":{"description":"","pages":[]},"title":"/identify","type":"endpoint","slug":"http-identify","excerpt":"You can use identify from the server to pass in traits for known IDs. These traits will only be tied to a browsing history when that user ID has been identified from the client using the JS API.","body":"[block:api-header]\n{\n  \"title\": \"A note on Auth headers\"\n}\n[/block]\nAttribution app uses a HTTP Auth for all server-side functions.\n\nYour HTTPS request header should have a blank password and the username must be your \"Project ID\" from [Attribution app settings](https://dashboard.attributionapp.com/#!/settings)","updates":[],"order":1,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"560d77fa8bfb03170030ac12","createdAt":"2015-10-01T18:14:18.282Z","githubsync":"","parentDoc":null,"__v":8,"user":"560c92f2ac2859170013faa3","project":"560c93ad7e9b9d0d00ca81a2","category":{"sync":{"isSync":false,"url":""},"pages":["560d77ae772ec32d00fa585a","560d77fa8bfb03170030ac12","569c7befd326c80d0068f78c"],"title":"HTTP API (server-side)","slug":"http-api-server-side","order":8,"from_sync":false,"reference":true,"_id":"560d76d899bb5a0d0044f307","__v":3,"project":"560c93ad7e9b9d0d00ca81a2","version":"560c93ae7e9b9d0d00ca81a5","createdAt":"2015-10-01T18:09:28.082Z"},"version":{"version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["560c93af7e9b9d0d00ca81a6","560c9d9399bb5a0d0044f220","560d76d899bb5a0d0044f307","560d76ee1ec45619006069ed","560d86e099bb5a0d0044f32e","560dba80373c0e0d0024ff3b","57c722ecdf19130e001fba5d","57c743d1b6f94a2200659903","58995ec083f743190077bbe2","5fabfb070e9b0600424707dd","60004359deee820012dc1efc","600060c72dcd9d002fa13656","6001ac08c104fe002b933b7c","6009604d81b288001417df30","60097b7be8ec1e00334419f6","600aa98de28fae003a33108a","600aa9ee7d3e350018e7d6e4"],"_id":"560c93ae7e9b9d0d00ca81a5","project":"560c93ad7e9b9d0d00ca81a2","createdAt":"2015-10-01T02:00:14.709Z","releaseDate":"2015-10-01T02:00:14.709Z","__v":17}}

post/identify

You can use identify from the server to pass in traits for known IDs. These traits will only be tied to a browsing history when that user ID has been identified from the client using the JS API.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

user_id:
required
stringTEST_1234
ID of the user from your database
traits:
required
object{ "email": "[email protected]", "first_name": "Bob", "last_name": "Slydell" }
pass any key-value traits that identify your user, "email" and "name" will help you find your users in dashboard

Examples


Documentation

[block:api-header] { "title": "A note on Auth headers" } [/block] Attribution app uses a HTTP Auth for all server-side functions. Your HTTPS request header should have a blank password and the username must be your "Project ID" from [Attribution app settings](https://dashboard.attributionapp.com/#!/settings)

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}