{"_id":"59a7d212329c030031a87ae0","project":"56cacb1bc675f50b00a4b619","version":{"_id":"56cacb1cc675f50b00a4b61c","project":"56cacb1bc675f50b00a4b619","__v":14,"createdAt":"2016-02-22T08:47:24.528Z","releaseDate":"2016-02-22T08:47:24.528Z","categories":["56cacb1dc675f50b00a4b61d","56cc10aaca43550b0028125a","56cc10b7b4cbcf0b004a5df9","56cc1bb2272aa4130002ccd2","56cc5834b4cbcf0b004a5f8b","56cda18bface161300dae13b","56d51f2873dcd20b00fb87bb","56fbe0610023171700b96105","57658310c176520e00ea9076","5772bdd48c48e00e00503638","577c1dfe87acf617003c3fcd","579525172979790e00771a15","582b4661cdfdc125000c8684","586365cedfe6cc3700a7be63"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"category":{"_id":"586365cedfe6cc3700a7be63","__v":0,"project":"56cacb1bc675f50b00a4b619","version":"56cacb1cc675f50b00a4b61c","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-12-28T07:12:14.104Z","from_sync":false,"order":1,"slug":"web-sdk","title":"Web SDK"},"user":"56caca84245b841300806def","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-08-31T09:08:34.564Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":999,"body":"Login to your publisher account from [here](https://publishers.codemojo.io) or if you don't have an account already then [Register from here](http://publishers.codemojo.io/register)\n\nOnce you are in the account, add a New app by Clicking on the \"Manage Apps\" menu and then clicking on the \"Add new app\" - For more details on how to add an app, please check the [Getting Started](http://docs.codemojo.io/v1/page/rewards-network) section\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/9820101-1.png\",\n \"1.png\",\n 502,\n 834,\n \"#2e2e35\"\n ],\n \"caption\": \"Go to Manage Apps\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/c3ba239-2.png\",\n \"2.png\",\n 1974,\n 534,\n \"#f3f5f7\"\n ],\n \"caption\": \"Click on the Wrench Icon\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/b38eea8-3.png\",\n \"3.png\",\n 2052,\n 410,\n \"#e2e9f0\"\n ],\n \"caption\": \"Click on the \\\"Get Code\\\"\"\n }\n ]\n}\n[/block]\n\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/42667a1-4.png\",\n \"4.png\",\n 1826,\n 456,\n \"#f5f5f5\"\n ],\n \"caption\": \"Copy & Paste this code in the website footer\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"title\": \"Configuring the SDK with User Info\"\n}\n[/block]\nYou can choose to configure the SDK to pre-populate certain details like the email which can be done as below\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"<script>\\n Codemojo().clearListening();\\n var codemojo = Codemojo({\\n data: {\\n email: 'john:::at:::doe.com',\\n\\t name:\\t'John Doe',\\n \\t\\t\\t\\t\\tage:\\t23,\\n \\t\\t\\t\\t\\tgender: 'male'\\n }\\n });\\n</script>\",\n \"language\": \"javascript\"\n }\n ]\n}\n[/block]","excerpt":"Our newest version of Web SDK that comes with a simple one time integration, but a highly configurable UI & trigger system in the backend.","slug":"javascript-sdk-v2","type":"basic","title":"Javascript SDK v2"}
Javascript SDK v2
Our newest version of Web SDK that comes with a simple one time integration, but a highly configurable UI & trigger system in the backend.