{"_id":"55c184d1c6e9ad3700aaea9c","githubsync":"","parentDoc":null,"project":"55aa7d973be8f60d00041d42","category":{"_id":"55c182616d7d2921006da013","pages":["55c184d1c6e9ad3700aaea9c","55c18618c0777c0d004676e1","55c7917eb9aa4e0d0016c3a0"],"version":"55aa7d983be8f60d00041d45","__v":3,"project":"55aa7d973be8f60d00041d42","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-08-05T03:26:25.875Z","from_sync":false,"order":1,"slug":"javascript-api","title":"Javascript API"},"version":{"_id":"55aa7d983be8f60d00041d45","__v":20,"project":"55aa7d973be8f60d00041d42","createdAt":"2015-07-18T16:23:52.273Z","releaseDate":"2015-07-18T16:23:52.273Z","categories":["55aa7d983be8f60d00041d46","55aacf4e3be8f60d00041d89","55aacfaae2bdcb0d00c7466e","55aacfb3e2bdcb0d00c7466f","55aacfca3be8f60d00041d8a","55b67da3f8105a2f00c351ab","55b7cae4aea7c8190058ba5b","55b9218afeef5135009b7db3","55c182616d7d2921006da013","5631407afa40240d007c8c60","56548b9c9c4c6d0d00aeda0c","572b9137ff3ba10e00b4abb4","572b9150ff3ba10e00b4abb5","581b83288ca41f0f007e4fb6","585065fa70cbe00f00835bb8","58641eba0355f31900380492","58861760b4816e19005c9941","58a316cb254c401b00a049ce","58ac80dbd5e1570f00d1c328","59f72b4991121a00104f036e"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":11,"user":"55aa7d625d3abb0d0012f3da","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-08-05T03:36:49.888Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"Before you load your the Script you can override default configurations for your website by defining leadakiSettings object.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<script>\\nwindow.leadakiSettings = {\\n\\tgoogleAdWordsConversionId : \\\"\\\",\\n\\tgoogleAnalyticsId : \\\"\\\", \\n\\tchatbotName : \\\"Pilar\\\",\\n\\tformHooksEnabled : true,\\n\\tautomaticRemarketingEnabled : true,  \\n\\tchatEnabled : true,\\n\\tchatSaluteTimeInSeconds : 15,\\n\\tcustomParams: {},\\n\\tsessionPath: \\\"/\\\", /* specify script cookies path */\\n\\thasConvertedLead : false, \\n\\tdebug : false\\n}\\n</script>\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\n\nEach one of this configurations give you the ability to change default beheaviour or even implement different actions when some event happens.\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"googleAdWordsConversionId\",\n    \"1-0\": \"googleAnalyticsId\",\n    \"0-1\": \"If you want to use [Google AdWords Remarketing](https://support.google.com/adwords/answer/2453998?hl=es-419) complete this Id with your AdWords Convertion Id. Check that automaticRemarketingEnabled is 'true'.\",\n    \"1-1\": \"Use this to enable the Google Analytics integration with your account. It use to have some format like 'UA-12341234-1'\",\n    \"2-0\": \"chatbotName\",\n    \"3-0\": \"automaticRemarketingEnabled\",\n    \"4-0\": \"chatEnabled\",\n    \"6-0\": \"hasConvertedLead\",\n    \"6-1\": \"became *true* after chatbot detects a lead and post it to Cliengo\",\n    \"7-0\": \"debug\",\n    \"7-1\": \"Default *false*.\",\n    \"4-1\": \"Default *true*\",\n    \"3-1\": \"Default *true*\",\n    \"2-1\": \"Default *Pilar*\",\n    \"5-0\": \"chatSaluteTimeInSeconds\",\n    \"5-1\": \"The time when the chatbots says 'hello' the first time the visitors arrive to a website. Default 15.\",\n    \"8-0\": \"customParams\",\n    \"8-1\": \"Check docs for [Sending Custom Params](http://developers.cliengo.com/docs/sending-custom-params)\"\n  },\n  \"cols\": 2,\n  \"rows\": 9\n}\n[/block]","excerpt":"Our documentation to help you customize Leadaki to fit your website","slug":"javascript-api-configuration","type":"basic","title":"Configuration"}

Configuration

Our documentation to help you customize Leadaki to fit your website

Before you load your the Script you can override default configurations for your website by defining leadakiSettings object. [block:code] { "codes": [ { "code": "<script>\nwindow.leadakiSettings = {\n\tgoogleAdWordsConversionId : \"\",\n\tgoogleAnalyticsId : \"\", \n\tchatbotName : \"Pilar\",\n\tformHooksEnabled : true,\n\tautomaticRemarketingEnabled : true, \n\tchatEnabled : true,\n\tchatSaluteTimeInSeconds : 15,\n\tcustomParams: {},\n\tsessionPath: \"/\", /* specify script cookies path */\n\thasConvertedLead : false, \n\tdebug : false\n}\n</script>", "language": "html" } ] } [/block] Each one of this configurations give you the ability to change default beheaviour or even implement different actions when some event happens. [block:parameters] { "data": { "0-0": "googleAdWordsConversionId", "1-0": "googleAnalyticsId", "0-1": "If you want to use [Google AdWords Remarketing](https://support.google.com/adwords/answer/2453998?hl=es-419) complete this Id with your AdWords Convertion Id. Check that automaticRemarketingEnabled is 'true'.", "1-1": "Use this to enable the Google Analytics integration with your account. It use to have some format like 'UA-12341234-1'", "2-0": "chatbotName", "3-0": "automaticRemarketingEnabled", "4-0": "chatEnabled", "6-0": "hasConvertedLead", "6-1": "became *true* after chatbot detects a lead and post it to Cliengo", "7-0": "debug", "7-1": "Default *false*.", "4-1": "Default *true*", "3-1": "Default *true*", "2-1": "Default *Pilar*", "5-0": "chatSaluteTimeInSeconds", "5-1": "The time when the chatbots says 'hello' the first time the visitors arrive to a website. Default 15.", "8-0": "customParams", "8-1": "Check docs for [Sending Custom Params](http://developers.cliengo.com/docs/sending-custom-params)" }, "cols": 2, "rows": 9 } [/block]