0

I am creating an AoG app (actions on google) with Dialogflow and using Firebase functions for webhook/fulfillment. Now I want to use the power of Analytics here to collect the hits of each intent. I am using NodeJS to write functions inside Firebase. Can I use Google Analytics/Firebase Analytics in that case?

Assume this code as Firebase functions:

'use strict';
const functions = require('firebase-functions');
const app = dialogflow({debug: true});


app.intent('Ask about user', (conv) => {
  conv.ask('Hi User, whats your name');
});


app.intent('user provides name', (conv, name) => {
  conv.ask(`Hi ${name}, do you want to know about product, price or support?`);
});


app.intent('user select options', (conv, option) => {
  if (option === 'product') {
    conv.ask('Say something ...');
  } else if (option === 'price') {
    conv.ask('Say something else');
  } else {
    conv.ask('Say about support');
  }
});

exports.myFunction = functions.https.onRequest(app);

Now, I want to track that how many times user provided product, price etc.

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
Deepak Dixit
  • 1,510
  • 15
  • 24
  • Firebase-analytics and google analytics are two different web applications. I have removed the google analytics tag as it sounds like you are going with firebase analytics. – Linda Lawton - DaImTo Jan 20 '20 at 10:37

1 Answers1

1

Where Google Analytics is more for webpages, and Firebase is more for mobile apps, for Conversational AIs you probably want to choose Chatbase, or (since you are using Dialogflow which is Google Cloud) BigQuery.

I wrote a guide, on how to do so: https://cloud.google.com/blog/products/ai-machine-learning/simple-blueprint-for-building-ai-powered-customer-service-on-gcp

And I also have some working code, for both; Chatbase and BigQuery: https://github.com/savelee/kube-django-ng/tree/master/chatserver/src

Hope this helps!

Lee Boonstra
  • 101
  • 3