{"_id":"57e11acb463a9120006d6e2b","parentDoc":null,"githubsync":"","category":{"_id":"57df9df05927cb0e002bce1e","project":"54861bb654b3ce0b00367292","version":"57b96d6b1d08500e00bf81d1","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-09-19T08:12:32.921Z","from_sync":false,"order":7,"slug":"cordova-app-triggers","title":"Cordova / App triggers"},"version":{"_id":"57b96d6b1d08500e00bf81d1","__v":7,"project":"54861bb654b3ce0b00367292","createdAt":"2016-08-21T08:59:23.326Z","releaseDate":"2016-08-21T08:59:23.326Z","categories":["57b96d6b1d08500e00bf81d2","57b96d6b1d08500e00bf81d3","57b96d6b1d08500e00bf81d4","57b96d6b1d08500e00bf81d5","57b96d6b1d08500e00bf81d6","57b96d6b1d08500e00bf81d7","57b96d6b1d08500e00bf81d8","57b96d6b1d08500e00bf81d9","57b96d6b1d08500e00bf81da","57b96d6b1d08500e00bf81db","57b96d6b1d08500e00bf81dc","57b97748306b9b0e001dd53f","57d12c6c1227b40e0044908a","57d51ad68191880e008bb51b","57d52b5cf350090e00fe073e","57d5468a17b492170053a3f0","57df9df05927cb0e002bce1e"],"is_deprecated":true,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"","version_clean":"4.0.0","version":"4.0"},"project":"54861bb654b3ce0b00367292","user":"548d74b716fc980b00e2a786","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-09-20T11:17:31.404Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"You can share information to drive deeper personalization capabilities, user data, user behavior and source attribution\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Prior to starting the initial session:\"\n}\n[/block]\nIn order to apply these configurations, change the following code in your app delegate as following: \n\n1.Key value attribution (bool , int , double , string)\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"params.data.addSessionAttributes(Object);\",\n \"language\": \"javascript\"\n }\n ]\n}\n[/block]\n2. [Source Attribution](doc:source-attr) \n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"params.data.addSessionAppsFlyerAttributes(Object);\\n\\nparams.data.addSessionAdjustAttributes(Object);\\n\\nparams.data.addSessionBranchIOAttributes(Object);\\n\\nparams.data.addSessionButtonAttributes(Object);\\n\\nparams.data.addSessionKochavaAttributes(Object);\",\n \"language\": \"javascript\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Post initial session setup\"\n}\n[/block]\nIn addition, there are three relevant fixed types of information, or any key-value parameter.\n\nFor example: Males, between 20-25, US residents, using iOS7, who downloaded 3 social apps and have entered your app 4 times this week - will receive alternative A.\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Key (String)\",\n \"h-1\": \"Type\",\n \"h-2\": \"Description/Example\",\n \"0-0\": \"Age\",\n \"0-1\": \"Double\",\n \"0-2\": \"20, 30.5, 40.05, etc...\",\n \"1-0\": \"Gender\",\n \"1-1\": \"Int\",\n \"1-2\": \"0 - Male, 1 - Female\",\n \"2-0\": \"Location\",\n \"2-1\": \"String\",\n \"2-2\": \"The coordinates formated as string (Left - Lat, Right - Lon): (37.70042180136,-81.84539998)\",\n \"3-0\": \"[Your Key]\",\n \"3-1\": \"bool \\nint \\ndouble \\nstring\",\n \"3-2\": \"Your own key - value\"\n },\n \"cols\": 3,\n \"rows\": 4\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Share your own parameters!\",\n \"body\": \"You can add your own keys, but they should receive only Boolean, Integer, Double and String values.\"\n}\n[/block]\nUse the following methods to share the relevant user info:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"var userInfo = {\\n\\t\\\"Age\\\" : 20.5,\\n\\t\\\"Gender\\\" : 0,\\n\\t\\\"Location\\\" : \\\"(37.700421688980136,-81.84535319999998)\\\"\\n};\\nelasticode.shareUserInfo(userInfo);\",\n \"language\": \"javascript\",\n \"name\": \"JavaScript\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Adding events [post initial session setup]\"\n}\n[/block]\nYou can use the *event *method to share about user behaviors:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"elasticode.event(\\\"finished registration flow\\\");\",\n \"language\": \"javascript\"\n }\n ]\n}\n[/block]\nYou can also add parameters to that event:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"var attributes = {\\n\\t\\\"timePassed\\\" : 30\\n};\\nelasticode.eventWithAttributes(\\\"finished registration flow\\\", attributes);\",\n \"language\": \"javascript\"\n }\n ]\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"body\": \"You can add your own keys, but they should receive only Boolean, Integer, Double and String values.\",\n \"title\": \"Share your own parameters!\"\n}\n[/block]","excerpt":"Sharing user information, session events and source attribution for a personalized interaction","slug":"user-infomration-1","type":"basic","title":"User infomration"}
User infomration
Sharing user information, session events and source attribution for a personalized interaction