In this article we’ll share our journey on how we built our first Google Assistant application.We’ll also include some things we tried, so you don’t have to.
To set the scene - Our first app wasn’t built using DialogFlow technology. DialogFlow was only used during the second application. This will be tackled in a separate article. In the app we’ll be examining today we used a Google template as a basis for the application.
The basic setup
Working with the Google Assistant means working with Actions on Google. It’s a completely separate platform dedicated to the development of Google Assistant applications. A full walkthrough of the platform can be found in our previous article “A guided tour to Google Actions, Google’s Assistance app management platform”.
For our application, we used a Google’s “Trivia” template in order build the first application called “Glenn’s digital marketing quiz”.
Upon activating this build you’ll need to complete two steps:
- Pick a voice
- Create the feed
This template is built upon a feed. The feed is actually driven by a Google Sheet and serves as a huge lookup table to match questions with replies. Google’s game is strong here as it provides you with a template that’s ready to be duplicated for your use. Just follow the steps prompted by the wizzard.
That’s it. You’re ready to start building your application!
Building the feed - the basics
Out-of-the-box, the feed (Google Sheet) comes with 2 tabs:
- Questions & Answers - This is where all questions and answers are tied together together with the follow-up replies.
- Configuration - From scratch, this sheet contains little info. Adaptation can be made however to include additional features & elements.
Building the feed is fairly basic. Our basic configuration is the following:
- Questions & Answers tab
- Column A - Contains the question
- Column B - Contains the correct reply
- Column C - Contains a false reply
- Column D - Contains a false reply
- Column E - Contains a reply follow-up. This is a line of text that’s prompted after the user replied to the question.
- Configuration tab
- QuestionsPerGame was set to 5. This means that a complete game lasts for 5 questions.
This completes your basic setup. Your feed should be good to go!
Building the feed - adding bells & whistles
Want to add some extra tweaks? That’s what we did as well! We have added the following elements:
- Categories & topics - This allows for category integration within your app. Concretely, this means that users have the choice between categories or topics of questions. Setting this up requires a dual config from both the configuration tab and the Questions & Answers tab. At the time of writing it’s possible to add up to 3 categories.
- Add the following field to the configuration tab:
- FirstChoice - Category/topic
- CategoryOrTopicPrompt - Add whatever message you like. This is what your user will hear when the app launches and what will urge him to make a choice in terms of categories.
- DifficultyOrGradeLevelSuggestionChip1 - Your first category
- DifficultyOrGradeLevelSuggestionChip2 - Your second category
- Add the following field to the Questions & Answers tab:
- Add an additional column called Category/topic. In our case this would be column F. On each row (= question) map which category the question belongs to. The categories need to match the exact spelling as was used in the configuration tab under the “DifficultyOrGradeLevelSuggestionChip” variables.
An overview of the full assembly below.
- Google Analytics tracking
We tried to implement another additional layer of Analytics. Google Actions comes with its proper Analytics platform. However, we wanted to see what data a Google Analytics implementation would yield. Documentation wasn’t entirely clear on which type of tracking was required (GA for web or app). Therefore we decided to implement them both. For those wondering if it’s worth trying, we can be short. No. Google Analytics tracking embedded in a Google Action application results in totally incomprehensible data such as coded source/medium values, therefore we wouldn’t suggest doing it. Moreover, discrepancies between the Google Actions data and Google Analytics data are big. That’s why, for now, we prefer to rely on the Google Actions data as it was built with voice in mind where Google Analytics was not.
If you’ve followed the steps mentioned above, you should have a rough outline of a functional app ready right now. All that’s left is to make it yours and publish. We can’t wait to see what you’ve built!