How to consume Chatbot Analytics? - analytics

We want to somehow consume a Chatbot Analytics so we can create our Own Analytics site for our Clients.
Is that any Possible?
Are there Any tools that will help?
We don't want tools, we want to consume their Data and Present them in our own site on behalf of our Clients.
Conside creating Chatbot via Chatfuel, API.ai or something.

You can use chatbotproxy.com API to fetch app and page specific metrics.
Currently, it collects 10 metrics, Note: if there is no data; then API does not return 0, it skips keys with 0 count. ChatbotProxy Metrics

We don't want tools, we want to consume their Data and Present them in our own site on behalf of our Clients.
By assuming you are referring consumer response as Data, yes that is possible.
To gather that data you should use AWS cloud services; you can use AWS Lex and AWS Lambda to build chatbot. In AWS ecosystem,you build the skeleton with Lex and provide functionality using Lambda function which will be triggered on catching an intent.
Considering you want to do some custom analysis on your consumer's responses AWS provides the best solution. AWS implementations are more flexible, transparent and their SDKs are available for a diverse set of platforms.

If your bot is created using api.ai, unfortunately, there's no way to consume analytics data via API calls, instead, they have developed & announced Analytics dashboard in api.ai console. Here, you can review statistics relevant to the specific agent. The solution to your problem can be logging everything via webhooks and write your own analytics service, but you'd probably know that already.

Related

Sending User Input from IBM Watson Assistant to Database or via E-Mail

I want to implement an evaluation feature to my chatbot. User would be able to rate service on a scale of 1 to 5 and make suggestions.
I guess I would use slots for that and store the provided data in a variable.
What would be the easiest way for me to save and access that data later?
Somehow I need to write it to a database and make that database easily accessible. Or ideally having Watson sending an email with the feedback to myself.
Is there an IBM Cloud Database service available for that?
What would be my first steps in order to achieve this? Maybe you have some tips or documentation links, or even code snippets if it's not to much work for you.
I used IBM Cloud functions to get a joke from an API to Watson via webhook. I used code from the internet. So I am somewhat familiar with the concept, but I need more guidance and couldn’t find anything helpful. Basically I know nothing about NODE.
I would recommend the tutorial and its code on how to build a database-driven Slackbot with Watson Assistant. It uses a webhook and Cloud Functions to interact with a database for various actions. You could use that as blueprint for setting up the webhook and see how the database is invoked.
Make sure to secure the webhook. This can only be done using the command line (CLI), see the Cloud Functions doc on securing web actions.

Can I store data captured with a Watson conversation to an external file?

I am looking to capture various answers from a Watson conversation to an external file for analytics. Also looking to capture the length of time a user spends on a session on the bot. First, I need to know whether this is possible and secondaly, the method to do so.
This is really possible. You need to create one application to call the Watson Conversation Service, you can use one function inside the SDK to analyze the conversation.
You need to know: Watson Conversation service is one REST API endpoint, so you can build your app with Python, Java, PHP, Node, etc, and integrating with Watson Conversation.
You will need to use the SDK Watson Developer Cloud for call Watson Services, and, for getting the conversation, you will need to use the getLogs function, and with this, you will access all conversation flows. And with your custom code, you'll store the data.
See one example (Web application using Watson Conversation: Conversation-simple with Nodejs
API Reference for calling the Conversation service and methods.
See how to verify logs inside the UI Conversation.

Showing Google Analytics Data in real time

I would like to show number of visitors on a site since beginning of the month, number of users on the current day and currently on site.
I have Google Analytics installed, I tried to solve this issue with Embed API by enabling Google Analytics API from developer console - but I requires user authorization, etc.
What would be the easiest way to show analytics on-site without user authentication and accepting access by Embeded API, etc. Application is written in Angular, so Javascript API is the one I look for.
Thank you for any suggestion.
Authorization has to happen in order to get the data you want. Either you can let visitors to your site authorize themselves, or you'll have to authorize server-side on their behalf.
Once authorized, you can do something similar to what the Third Party Visualization Embed API demo shows. It uses a custom ActiveUsers Embed API component and includes the source code to show how it works.
Whether you use the ActiveUsers component or not, the basic gist is that once the users is authenticated via the Embed API, you have access to the method gapi.client.analytics.data.realtime.get, which you can use to query this data.
Here's where that happens in the source code for the ActiveUsers component:
https://github.com/googleanalytics/ga-dev-tools/blob/master/src/javascript/embed-api/components/active-users.js#L69-L87
Authentication with the Analytics service is mandatory. But the OAuth 2.0 Service Accounts (for Server to Server Applications) can be used to automate it in many cases.
It's unclear to me (from a quick scan) if the Auth options of the Embeed API would work with the automated authentication scheme, you may want to go through the details.
You should be able to use the Analytics Core Reporting API and maybe the Analytics Real Time Reporting API (beta) which work with the automated authentication according to their guides (look for the Authorisation sections on the left frames of the respective guides).
Donno if this qualifies as easy, tho, YMMV :)

Google API discovery possible within Google Apps Script?

I want to access an external Google API through a GAS trigger. Is it possible/advisable to use something like the javascript Google API client library, adapted for the GAS context, instead of manually using URL Fetch, as mentioned here ?
PS. I am trying to hit the Google App Engine TaskQueue service via its REST API.
In the Apps Script Code Editor, under the RESOURCES, ADVANCED GOOGLE SERVICES menu, you can enable different API's. I don't see an Advanced Service for anything the resembles a Task Queue. There is a Tasks API, but that's for Task List, which is very different than the Task Queue.
So, I don't think you have any choice but to use the REST API with UrlFetchApp.fetch() in server side gs code in Apps Script.
As far as the trigger is concerned, you might want to look at quota limits, if you're going to be running it a lot, or running code that takes a long time to run.
You can use external APIs with OAUTH2 as outlined here: apps-script-oauth2
It's just not built-in, but you can easily add it as a library as mentioned in the Readme.

Strategy: How do I exchange data directly between JavaScript and Google App Engine DataStore

I am somewhat new to Web development - specifically Google App Engine and JavaScript/HTML development, but I have an app deployed and working on Google App Engine and it is working ok.
I would like a user of my App to be able to store and retrieve a serialization of the app state in JSON using the GAE Datastore. (Note - This is only a user-initiated action - so channels seem to be overkill)
The examples provided by Google demonstrates one approach that allows the server-side Python implementation to do this. Specifically https://developers.google.com/appengine/docs/python/gettingstartedpython27/usingdatastore. I have this working ok.
But this approach seems rather inelegant especially if as an "app" I want to store and retrieve serialized chunks of data somewhat asynchronously without reloading the page/app each time (again, this is only ever user-initiated).
I have not been able to find any high-level guidance on an approach to do that (assuming it is possible).
Any suggestions/links/examples would be greatly appreciated.
Thank you!
Jeff
As with many things, this depends on your specific needs. If you just want direct access to datastore storage, the datastore is exposed as an independent service with an API.
If you instead want to assert logic over the usage and interact with your app in some fashion, you may also want to look at Google Cloud Endpoints. With an endpoints API, you gain a more structured API you can call directly from javascript, or generate client libraries to be consumed by other languages/platforms.

Resources