Writing Java Script code in Head and Body section

With your custom Apps, you would often need extended functionality that enables tracking and maintaining of site analytics. The integration of various analytics and marketing services is possible by using different tags. You can add code snippets to the header inside the tag and the body section inside the tag. For example when you want to include a chatbot for example your Insurance HelpDesk, a Support Chatbot, and so on.

Once you log in to Studio using your Admin credentials for authentication, open your App. On the App’s home page, you can see the Settings. Click to view the different Settings.
custom script

Here you can find the Custom Script option.

Tag Scripting

Under Custom Scripts, you can now add the scripts for the head section and the body section. To add the scripts -

  1. Go to the Third-party provider of your needs and copy the script provided by them in the respective placeholder for the head section and body section.
  2. Click Save Script.
  3. Once done Publish your app.

So now whenever an app is used by the end-user your script would be loaded and it will start sending you analytics or other information to your third-party provider which you have used and can be viewed accordingly.

Let us now consider an example to add a chatbot to your application. There are several such applications available like Drift, engati, verloop, and so on.

So let us try and create a chatbot with engati.com. Follow the process for the specific chatbot that is usually specified in respective websites. In this example, you need to first sign up using your respective authentication details and get started with providing a Name for your bot.

  1. For this example when creating the bot, we have a few templates for creating bots like Insurance bot, Financial Services, Travel booking, and so on. So select any template and click Create Bot.

  2. Based on the template you would typically have a builder that enables you to define the paths for assisting and responding to your customer. Use the builder and define the complete flow.

  3. After the whole path is defined, you can then deploy the respective Chatbot. Now in the Deployment page you would typically find the script that needs to be added to your app’s or website’s head or body tags.

  4. Copy the Script from the Deployment page and click Save changes.

  5. This Script that has been copied in this example will have to be added to the Head Section of your App. So go to Settings > Custom Script > Tag Scripting, and paste it to the Head Section and then click Save Script.

The script is now saved in the Head section and whenePublishver you Publish the app you would be able to use the ChatBot created in the respective Chatbot service within your App.

So whenever you Publish and share your app with your customer, the Chatbot will also be provided to the user. You can keep track of your customer requests and ensure a good customer experience for them with such features.