Back to Top

Seven underrated Google Analytics features that boost performance

30-second summary:

  • Google Analytics is an important web analytics tool from Google used in digital marketing.
  • Many digital marketers and website owners use it to track and measure the performance of their websites.
  • There are a lot of Google Analytics features that perform different functions. All working towards helping you get the best of your website.
  • However, there are some Google Analytics features that are underrated. Many digital marketers don’t recognize them and what they are capable of doing to improve the performance of their website.
  • This piece will highlight seven of them and how they can be helpful to you.

Google Analytics is a web analytics product from Google that has helped a lot of digital marketers and website owners ascertain the performance of their website. Approximately 29 million websites use it as an analytics tool. A lot of Google Analytics features are only known to a few digital marketers. Many people rush to it to check how page views they got over a period of time or how many conversations they got. To these people, that’s only what this great tool can for them – the basics. But it’s far beyond that.

There are some features it has which can help improve the performance of your website but are underrated.

Are you hearing this for the first time? Don’t worry that’s why I’m here and this piece will discuss seven of them and how they can be helpful to your site.

1. Custom alert

This Google Analytics feature can be located when you log into your report and tap on the ‘customization’ drop-down menu. When set up, you will be alerted through emails when there is a change in your traffic or behavior of your website.

This could be on a daily, weekly, or monthly basis. For a beginner who is curious to grow his traffic or conversion, it is simple to keep your eye on it. Another crucial function of a custom alert is to automatically notify you of trends in your data.

This could be tracking and informing you in real-time about the events on your website be it positive or negative. The advantage here is that you can fix any negative development before it becomes obvious. You can follow the screenshot below to set up your custom alert. 

2. Channel groupings

It’s easy to manage the traffic source to your website with channel groupings feature. This feature is on default on your analytics report and it organizes and groups your common source of traffic. 

For instance, you launched an ad campaign on Facebook, and Instagram as social media tactics to grow your small business,  the channels grouping will allow you to compare and analyze the performance of each of the traffic channels.

 For a marketer to want to be more specific with his traffic channel, you can create custom channels grouping and apply it to your report.

 Its effect will be seen in how your data display but won’t change the data itself. To make use of channels grouping on your GA, when you sign in to your report and locate admin at the bottom left. Click on it and you will list of features which channel groupings are one of.

Google Analytics features - Channel groupings

3. Behavior flow

When users visit your website, they move from one page or event to another in an attempt to achieve their desire which may be to get help through your content. It is a visual representation that can help you understand how your audience interacts with your site, the content they enjoy, and the ones that turn them off.

 The behavior flow of your site simply displays the node, the connections to pages on your website, and exit. After consuming your content, do your audiences click on another link to learn more? Or do they bounce because they aren’t satisfied? 

This increases your bounce rate and a clear indication that you need to work on that particular content. Below is a screenshot of the behavior flow from my blog.

Google Analytics features - Behavioral flow

4. Ecommerce tracking

For those who want to start an ecommerce business or those already in the field. Tracking the performance of your ecommerce website is possible with ecommerce tracking feature on GA. 

As a merchant who sells on Shopify or BigCommerce, you’ll want to know where your high-paying customers come from, how they interact with the products you have in your store, and which product converts more.

 With the knowledge of this, you can identify the location of customers that make you smile when you remember the number of sales you have made, the products they like, and things to fix to continue to be ahead of your competitors. 

channel groupings

Below is how to set up ecommerce  tracking on GA

  • Sign in to your report on GA
  • Click on Admin on the bottom left and you will be in a new window
  • Click on ecommerce  settings
  • Enable ecommerce  
  • Enable enhanced ecommerce  reporting and save
  • The final step is to set up your tracking code. Learn how to do it here.

Once your ecommerce site is being tracked on GA, you will gain insight into the following metrics on your dashboard; unique purchases, revenue, quantity, conversion rate, average order revenue, etc.

5. Demographic

Some digital marketers don’t know the importance of analyzing the demography of users who visit their websites.  Age, sex, and interest category of your audience are key metrics that should matter to you. 

You can use them to make decisions that can improve the performance of your website. Take, for instance, you run a small business website on women’s clothing, and your demography metrics show that 80% of your visitors in the last month were male within the age range of 18 and 24.

That’s a red flag that you’re targeting the wrong audience. A female clothing line business should have more female visitors. Also, the age range of 18 and 24 are mostly young people who are either schooling or unemployment. Hence won’t have much money to spend on clothes. Below is how you can locate the demographic metrics in your GA.


6. Site speed report

Speed is one of the key factors Google considers when ranking your website. It even became more obvious with the introduction of Accelerated Mobile Page, AMP. Not paying attention to this one of the SEO mistakes you make. Google Analytics tracks the load time of your web pages.

The aim is to give you reasons to learn how to improve the speed of your website. A web page that loads slowly is a turn off for your audiences. Nobody wants to wait for a long time for a page to load when there are many web pages competing for their attention.

 It can increase the bounce rate of your website or even cost you sales if you sell online. Site speed is an indicator of a healthy site, hence the need to learn how to make it happen.

Google Analytics features - Site speed report

7. UTM parameters

To some digital marketers and small businesses, this might be the first time of hearing this marketing acronym. Don’t be confused, UTM simply stands for Urchin Tracking Modules. They are codes you add at the end of your URL. This is crucial if you run ad campaigns for your business. 

For example, if you run an ad campaign on Instagram, Facebook, and LinkedIn and made a lot of sales, you won’t know which of the social media platforms drove more sales to you. 

The only way to know that is if you add campaign parameters to your URLs which is tracked on GA. For every user who clicked on the URL, the parameter is sent to Google  Analytics. The goal is to identify the platform in which the campaign performed better and intensify your strategy on it to make more sales next time. 

Google Analytics features - UTM parameters

Wrapping up

The performance of your website should be of utmost importance to you as a digital marketer,  small business or someone who earns passive income online. Google Analytics has all it takes to keep your site healthy all the time. 

Google Analytics features factored in all aspects of your website be it blog, ecommerce, or any other kind of website.

Yours is to take your time to identify these features, explore them, make use of them and you will be surprised at how they can keep your website at its best all the time.

Chuks Chukwuemeka is a content creator, blogger, digital marketer, and founder of, an online business blog.

The post Seven underrated Google Analytics features that boost performance appeared first on Search Engine Watch.

Reblogged 1 year ago from

Email Automation 101: How To Use Email Marketing Automation

“Email automation.”

You hear the phrase again and again.

Email automation is powerful stuff, but if you’re new to the email marketing game, you probably have a few questions about it. 

After all, automation can increase leads, conversions, and revenue, and it can save you time. The stats prove it:

Automated email messages average 70.5% higher open rates and 152% higher click-through rates than other marketing messages, according to Epsilon Email Institute.

So, to help you get a better grasp on what it is, why it’s important and how it can help you get the incredible results you want, here’s a quick guide to email automation and how to use it in AWeber.

What is email automation?

Some marketers send every subscriber the same exact message with one-time emails.

The thing is, this generic content isn’t necessarily relevant or valuable to subscribers.

But, with the creation of email automation, messages send themselves. And, they can be segmented and properly timed, which will make them more relevant too.

But how does it do all of that?

Simply put, email automation is when you set up a series of emails to send automatically to subscribers at a specific time.

With it, you can connect with a person at every stage of their buyer journey (a.k.a. the marketing funnel) — from lead to customer to brand advocate. You can build a relationship with an individual over the long term.

And the best part? It runs on autopilot, creating connections and increasing revenue while you work on other aspects of your business.

You can set up a single series automation — where a person subscribes to your list and is automatically sent email 1, then email 2, then email 3, etc. in a sequence.

In the example below, La Colombe Coffee Roasters uses email automation to welcome new subscribers after they sign up:

Automated email welcome example

But there’s no limit to how you can use automation. It can be used to trigger emails or email series that send based on almost any action: a newsletter sign up, an eBook download, a purchase, etc.

Why email automation works

1. Email automation gives you a direct line of contact to customers

There are 3.7 billion email users worldwide, and about 27% of them check their emails as soon as they receive a new email notification.

And 66% of online consumers have made a purchase as a result of an email marketing message, a higher conversion rate than messaging through direct mailings or social media.  This means that email gets you better conversions and overall results.

Want some more statistics? We thought you’d never ask. According to VB Insight,

  • 80% of marketers reported increased lead generation with email automation.
  • 77% saw conversion rates rise with email automation.

Simply put, email marketing automation works!

Learn about AWeber’s email automation platform, Campaigns.

2. Email automation helps you send messages your subscribers want

Email marketing automation allows you to segment your list of subscribers based on their interests, purchase history and even actions they take on your site (this is called action-based automation, and I’ll get into this more in depth later in this article).

Want to send an email to all the vegans on your list? The September birthdays? The webinar registrants? The sweatshirt buyers?

You can!

For example, let’s say you’re a fitness trainer. You could then send an automated email based on the skill level of the trainee: beginner, intermediate or expert.

This way, you can send each customer targeted information to fit their individual needs.

And you can do this in AWeber with tags.

When consumers get emails with information that’s relevant to them, they’re more likely to click through your email. Plus, relevant content reduces the risk of your message getting deleted or ending up in the dreaded spam folder.

3. Email marketing automation saves you time

When you’re running a small business, you don’t have time to write and deliver emails to each individual subscriber.

Luckily, email automation can do all that work for you!

With email automation, you can set a schedule for when your emails go out and to whom. And your email marketing platform will send those emails for you at the right time. This gives you more time to craft relevant and effective messaging, which is the key to boosting click-through rates, conversions and overall consumer engagement.

Email automation gives you a unique and convenient way to nurture the connection you have with your audience. And that is the key to maintaining engagement with your subscribers.

Need help figuring out exactly what to write in your emails? We’ve created 45+ email copy templates to solve this problem! Download them now.

Types of automated emails

Now that you know why automation is so important, discover how you can use it.

There are a ton of different types of automated emails series that you can use for your business. Let’s cover some of the most important ones so you can get ideas for your next series.

Automated welcome email series

Your first point of contact after a subscriber signs up to your list …

Your time to make an amazing first impression …

Your chance to get more opens and clicks than any other type of promotional emails …

Yes, your welcome email series is a big deal! But it’s actually one of the easiest automated email campaigns you can send.

Here are some things to include in your welcome series:

  • Thank subscribers for signing up. Try using more than just words ― say it with a gift! Offer free bonus content or a discount.
  • Introduce yourself and your company. How will you solve your subscribers’ needs?
  • Let readers know what kinds of emails they can expect from you in the future.
  • Tell readers how often you’ll be emailing them.
  • Share where they can find you on the web (include social channels, website, blog, etc.)
  • Give them helpful and relevant blog posts they can check out.
  • Ask them to whitelist you. (This will add you to their email address book and can improve email deliverability.)

Below is an example of a welcome email that Eddie at ReallyGoodCopy sends to new subscribers, letting them know what to expect and when.

email automation example

Educational email course series

Do you have a ton of experience and wisdom to share about a specific topic?

Are there questions your audience asks that you find yourself answering time and time again?

Consider an email course!

Here’s how you can use automation to set up an email course:

  1. Write a welcome email that delivers the first lesson.
  2. Set a wait time of one or two days between each lesson.
  3. At the end of the course, encourage social sharing to increase course sign ups and continue the cycle.
  4. Ask for feedback so you can deliver more relevant content, resulting in more valuable emails.

In our What to Write in Your Emails course, we follow this exact pattern. In one of the last emails of the series, we ask subscribers to share feedback in a survey:

automated survey email example

Customer onboarding series

You can send this automated email series to new customers to keep them engaged and encourage them to become repeat buyers.

To inform and convert subscribers into paying customers, include these resources in your series:

  • How to get started
  • Training videos and help-based articles
  • FAQs
  • Information about new products and how they solve problems
  • Exclusive deals that only subscribers can get
  • Educational resources and how they solve problems

Remember, when trying to promote a new product, focus on the value to the buyer.

Advanced action-based email automation

Instead of automatically sending everyone on your list the same series (email 1, email 2, email 3, etc.), each individual subscriber gets to pick which emails they’re sent through various actions they take.

While it’s more advanced than a single automation series, action-based automation can skyrocket engagement and sales. That’s because you are able to target segments of our audience with the exact content they needed. It’s an amazing feeling when you can put a solution right in the hands of your subscribers.

See action-based automation in action: This podcast host uses automation and tagging to let podcast listeners create their own adventure.

Need a way to visualize your email automation? Try an automation map. They’re a handy tool you can use to map out your first automated email series, especially if you plan to use more advanced strategies. 

Start with email marketing automation today

With AWeber, you’ll have all the tools you need to create automated email campaigns. We even prebuilt automated email campaigns for you. Check out these pre-written campaigns to save time and market your business 24/7.

{ “@context”: “”, “@type”: “BreadcrumbList”, “itemListElement”: [{ “@type”: “ListItem”, “position”: 1, “name”: “”, “item”: “” },{ “@type”: “ListItem”, “position”: 2, “name”: “AWeber Blogs”, “item”: “” },{ “@type”: “ListItem”, “position”: 3, “name”: “Email Automation 101: How To Use Email Marketing Automation”, “item”: “” }] } { “@context”: “”, “@type”: “FAQPage”, “mainEntity”: [{ “@type”: “Question”, “name”: “What is email automation?”, “acceptedAnswer”: { “@type”: “Answer”, “text”: “Email automation is when you set up a series of emails to send automatically to subscribers at a specific time.” } },{ “@type”: “Question”, “name”: “Why email automation works”, “acceptedAnswer”: { “@type”: “Answer”, “text”: “1. Email automation gives you a direct line of contact to customers 2. Email automation helps you send messages your subscribers want 3. Email marketing automation saves you time” } }] }

The post Email Automation 101: How To Use Email Marketing Automation appeared first on AWeber.

Reblogged 1 year ago from

A Step-By-Step Guide to Facebook Advertising

How you go about advertising your company online matters greatly for your email marketing strategy. The whole point of digital advertising is to generate traffic back to your site, where you can convert that site traffic from plain ol’ visitors to leads. But to achieve this, you need to maximize your ad potential on the…

The post A Step-By-Step Guide to Facebook Advertising appeared first on Benchmarkemail.

Reblogged 1 year ago from

Seven Ways to Show Up Human in Your PR and Marketing Efforts

As a marketer, are you telling stories that connect, or are you treating your audience like an algorithm would? People are craving connection, especially now, so it’s time to humanize your company’s communication in these seven ways. Read the full article at MarketingProfs

Reblogged 1 year ago from

How to Set SMART Goals for Your Blog in 2021

The post How to Set SMART Goals for Your Blog in 2021 appeared first on ProBlogger.

How to set SMART goals for your blog in 2021This post is based on episode 218 of the ProBlogger podcast.

It’s been a very long year, and like most people you probably can’t wait for it to be over. And with the new year just around the corner, now is a good time to set yourself some blogging goals for 2021.

Setting goals is important if you want to grow your blog. It will help you focus your time and energy on what’s most important. And knowing what you’ll be achieving will give you some added incentive to keep going.

Getting SMART about setting goals

There’s a lot of information out there about goals and how to set them. One of the most popular methods is to base them on the SMART acronym, which stands for smart, measurable, achievable, relevant and time-bound. And that’s the one I’ll be referring to in this post.

But I’ll be attaching a few more words to some of those letters to make it more specific to blogging.

S is for…

To start, your goals should be as specific as possible. Don’t set vague goals like, “I want more traffic for my blog,” or, “I want more money from my blog,” or, “I want to post more often.” How much more traffic do you want? How much more money do you want? How often do you want to post?

Instead, work out exactly what you want to achieve:

  • “I want to double the amount of traffic I had this year.”
  • “I want to make $50,000.”
  • “I want to publish a new post every week.”

Not only are these goals far more specific, they also satisfy another criterion that starts with ‘s’ – significant.

As I said earlier, setting goals is important if you want to grow your blog. But don’t start making them just for the sake of it. You should be setting significant goals that will get you closer to your long-term goals.

Want to make a million dollars from blogging? You probably won’t get there in a year, but you can certainly set yourself a goal (“I want to make $50,000.”) that gets you closer to that lucrative figure.

Want to get a book deal? You may not get one this year, but you can certainly set yourself a goal (“I want to publish a new post every week.”) that will get you closer.

You should also come up with goals that are significant to you. Maybe you want to make $50,000 so you can buy a new car or your first home. Now that goal is a lot more significant, and you’re going to be more motivated to achieve it.

M is for…

Next, your goals need to be measurable. As Peter Drucker once said, “If you can’t measure it, you can’t improve it.”

The specific goals I mentioned in the previous section are also measurable because it’s easy to work out whether or not you achieved them. At the end of the year you’ll know whether you doubled your traffic, made $50,000 or posted something new every week.

Not only that, you can work out how well you’re tracking and, if necessary, make some adjustments. Let’s say your goal is to earn $50,000 in a year. That works out to be $4,166 a month, or $137 a day. And so at any time during the year you can compare how much you’ve made with how much you should have made to see how well you’re meeting your target.

And when you’re planning your goals, keep another M word in mind – meaningful. You’re far more likely to achieve your goal if it means something to you. I once talked to a blogger whose goal was to raise $10,000 for school of orphans in Africa. It had nothing to do with growing her blog, but she’d visited the orphanage a few years before so it was a meaningful goal for her.

A is for…

Your goals should stretch you, and make you work hard. But they should also be achievable based on the situation you’re in.

If you can only blog in the evenings because of work and family commitments, you probably shouldn’t set a goal to publish a new blog post every day. Even publishing once a week might be pushing things too far. You may be better off setting a goal to publish a post once a fortnight to start with, and then see how well you’re tracking after a couple of months.

Setting goals you can’t actually reach can actually hurt your blog. You may be far less motivated to keep going, and even if you do keep going the quality of your content may drop, which can damage your brand.

By all means stretch yourself, but don’t bite off more than you can chew. When you’re creating your goals, take the time and resources you have into account. What you’d like to be a one-year goal may need to become one of your long-term goals instead ­– at least to begin with.

And if you’re part of a team, then your goals should also be agreed-upon. That means not only letting everyone know about the goals you’d like to achieve, but also getting them to take those goals on board so you can all work together to achieve them.

R is for…

Chances are you’ll be making a number of goals for the year. But once you’ve created them all, check to make sure they’re all still relevant. You may find that some of them clash with others, or have already been covered in other goals. And some may just be a little bit before their time.

Back in 2015, one of my goals was to run an event in the US. We have a lot of readers in the US, and so I thought it would be a worthwhile goal. But when I looked at all the goals I wanted to achieve that year, I could see that the work involved in running an event in the US would affect some of my other goals. And so I decided to put that particular goal on hold.

Two years later I took another look at my list of goals, and I could see how we could run that US event. In the intervening years I’d met some people who could help us make it a reality. So I freed up some time in my own schedule to work on it, and the result was our Success Incubator event.

Just because a goal isn’t relevant at the moment doesn’t mean you should discard it completely. You may simply need more resources, contacts or prep work to make it a success.

T is for…

Finally, your goals should be time-bound. In other words, they need deadlines.

This not only makes your goals specific and measurable, it also helps you work out how you’re going to reach your goal.

For example, if your goal is to publish a blog post every Friday then you can work backwards to work out when you need to finish your research, when you need to finish the first draft, and so on.

One tip with deadlines: Try to space them out, rather than putting them all at the end of the year. That way you won’t be facing a pile of deadlines at a time when you should be winding down rather than speeding up.

Spacing them out also means you’ll be achieving goals regularly, which can do wonders for your motivation.

Over to you

What are your goals for 2021? And what long-term goals will they be helping you achieve? Let us know in the comments.


Photo by Ricardo Arce on Unsplash

The post How to Set SMART Goals for Your Blog in 2021 appeared first on ProBlogger.


Reblogged 1 year ago from

SEO Competitive Analysis for B2B — Whiteboard Friday

Posted by Joyce.Collarde

In the B2B space, it’s important to be realistic about who your competitors are. 

Keeping that rule in mind, in our last Whiteboard Friday episode before 2021, guest presenter Joyce Collardé of Obility walks you through how to conduct a competitive SEO audit, helping you address your improvement areas and surpass your competition in the SERPs. 

Click on the whiteboard image above to open a high resolution version in a new tab!

Video Transcription

Hi, Moz fans. Thank you for joining me today as we talk about SEO competitive analysis for B2B businesses. My name is Joyce Collardé. I am the SEO Supervisor at Obility. Obility is a digital marketing agency based out of Portland, Oregon, with offices in Austin and Boston and that specializes in B2B businesses. 

So I wanted to talk about SEO competitive analysis because it is a really crucial part of your SEO strategy and of your SEO success. As you know, SEO doesn’t work in a vacuum. So if you want to be able to improve your SEO traffic, your click-through rate, your keyword position, and eventually your conversions, you have to be able to take the space of some existing competitors. 

Today I’m going to walk you through the five phases of the competitive analysis. We’ll start with how to select your competitors. Then we’ll discuss the keyword distribution and what is important to understand the keyword distribution. Then we’ll discuss keywords and content gaps and opportunities. Then we’ll move on to technical health of your website and your competitors’ websites.

And we’ll finish with backlink analysis. 

Selecting competitors

So selecting competitors is the step that is really important, especially in the B2B space, because the B2B space is very competitive, and in this space we have a few marketing giants like Oracle, AWS, Marketo, Google, that can be considered the de facto competitors for everyone. 

Unfortunately, with that line of thinking, you are really missing out on a lot of interesting insights because those websites are so huge that they might rank for hundreds of thousands of keywords. Sometimes we see millions of links and have a Domain Authority of 98. So when you compare yourself to them, then it will be really difficult to actually find good nuggets of information about your website.

You will always be at the bottom, and it’s also really discouraging. 

So I really would recommend that you are realistic about who your real competitors are. And nothing prevents you from refreshing your competitors in six months or a year from now if you feel like you’ve outgrown the competitors you selected in the first place. 

One thing I want to highlight as well is that you should have different sets of competitors for each funnel stage. For example, let’s say your target keyword list includes definitional keywords like “what is cloud computing.” So your competitors for “what is cloud computing” might be ZDNet or TechTarget, for example. 

But let’s say you want to target “cloud computing solution,” then your competitors could be IBM. But the intent of the user who is looking for “what is cloud computing” versus “cloud computing solution” or “cloud computing software” is very different, so you cannot target the same competitors for each level of the stage funnel.

You will miss out on a lot of good insights, too. 

I also do want to point out that your competitors will be very different in different areas of digital marketing or even offline marketing. Your PPC, your paid search keywords, or your paid social keywords will not be the same as your SEO keywords.

Really the best way for you to identify good competitors is just to Google your target keywords. It’s really as simple as that. And then see who comes up and see what their strategies are. 

Keyword distribution

So let’s take a look now at keyword distribution. One thing that I want to point out is that sometimes we audit competitors that seem like they’re ranking for thousands of keywords, and it’s a little intimidating.

But really ranking for thousands of keywords isn’t the end-all be-all. You should really pay attention to their keyword distribution. Out of those thousands of keywords, how many are branded, how many are not branded? 

Of course, you won’t be able to rank for your competitors’ branded name. So you really have to focus on the non-branded keywords.

Also, those keywords, do they have a lot of volume? Are they really difficult to rank for? Are they ranking for hundreds of keywords with zero searches or 10 searches per month, for example? Are those the keywords that you really want to target? And if you do manage to take their place on the first page, is it really going to help your overall SEO strategy? 

Another good thing to look at is diversification. Are your competitors only ranking for one keyword category, or are they targeting different categories? A competitor that, let’s say, ranks for only branded keywords or keywords that have very little search volume or that is targeting only one specific category wouldn’t be very dangerous keywords.

And as we talked about earlier, you should not have the same competitors for every set of target keywords that you are working with. So make sure that you repeat this step for each set of competitors. 

Keyword gaps and opportunities

Next comes the content and keyword gaps and opportunities. So in this stage, you should really think about the keyword gaps — the content gaps between you and your competitors.

It’s not just how often do they post or what do they target. It’s also which topics do they publish on the most, or which topics do they focus on the most on their product or their solution pages. What kind of content type do they prefer? Are they publishing only blog posts?

Are they publishing mostly videos, glossary pages, e-books, white papers, webinars? You really have to pay attention to that, because if all of your competitors are using blog posts and then you come in with your webinar that people need to sign up for and give you their information, then you are not going to be able to beat them at their own game.

You have to kind of align to what is available in the competitive space. 

Frequency is important, too. If your competitors publish twice a week on their blog or have a live demo every week, or release a new e-book every month that they will email to their customer base, you also have to align on that frequency.

I would say out of the competitive analysis, this is one of the most important stages because you really have to be aware of the type of opportunities that you are going for. 

And it really comes back to what we were talking about earlier with the competitor selection. You have to be realistic.

It is very important to know what you’re going against. Otherwise, you can keep publishing blog post after blog post after blog post, but if you have not identified the proper competitors or have not identified the proper type of content that you need to create, all of those blog posts will not amount to improved performance on your site. 

Technical health

The fourth stage of the competitive analysis is technical health.

So I think we can all relate to how annoying it is when you get to a website and it’s full of 404 errors and the links are broken and it’s too slow. It’s just a really bad user experience. And Google is very smart, and they know that we don’t like a bad user experience, and that if the user experience is bad, then they are going to put other websites above you. 

So I did mention page speed, so don’t be scared. I know it’s always a huge ask to fix your page speed. But I would recommend that you use the Google PageSpeed Insights and take a look at those easier things to fix. One thing that comes up all the time is images being too big or too heavy, taking too long to load.

So if that’s the case, take a look at your main images and see if you can reduce the size of them. Usually, the images that are the heaviest are the ones that will be on your homepage slider or in the background on your product or solution pages. So just by fixing a few pages on your website, you could improve your page speed by several seconds, and we know it means a lot when you’re a user.

Definitely do those two steps with your competitors, too. 

For example (you can do it with Moz or you can do an on-site crawl for any website), let’s say that all your competitors are missing H1s or are missing meta descriptions or have a lot of 404 errors, then you know those are the top priorities that you need to fix.

Again, think about your competitive advantage. If all your competitors’ websites are really slow, then fix your page speed first. If it’s a horrible user experience because you keep hitting 404 errors, fix your 404 errors first. 

Backlink opportunities

The last part of the competitive audit should be the backlinks opportunities.

So you can use the Moz link discovery tool to find out about everyone’s lost and discovered new links. This makes link building a little more approachable than just saying, “Oh, I will target The New York Times,” because by looking at people’s competitors and lost and discovered websites, you can identify websites that probably know you, or know your competitor, or at least know your industry, and so may be more willing to link to you. Especially if they used to link to your competitor or are currently linking to your competitors. 

Definitely do this for your own website as well, to identify the links that you have recently lost and that you can try to reacquire. I would recommend that you repeat this step on a monthly basis because you have better chances of reacquiring links that you recently lost rather than if you contact someone saying, “Oh, two years ago you used to link to me. Can you please link to me again?”

You’re out of that person’s thoughts. So try to stay on top of it. And you might have a lot of links at the beginning, but if you do it regularly, then it’s much more manageable. 

Also, when we’re talking about backlinks, I would advise you to look at your competitors’ Spam Score and link diversity. For example, I did a competitive analysis recently and I saw that one of the competitor’s Spam Score was 23%, which I had never seen before.

It was so high. It was ridiculously high. So it made me happy in a way, because it seemed unachievable at first to get to the number of external links that they had, but then it turns out that the majority of their links were spammy. And with a Spam Score of 23%, I don’t think they’ll be able to carry on much longer. 

Link diversity is also really important because you don’t want all links coming from blog posts or all links coming from one type of publication. So when you think about new links that you can acquire, definitely make sure that you have different types of websites linking back to you, that they’re using varied anchor text, that sort of thing, so that you don’t look spammy and you don’t end up with a Spam Score of 23%. 

Time management

So I wanted to also talk a little bit about this pie chart over there. It was how much time you’re supposed to spend on each of these steps. So the biggest one, as I mentioned earlier, was the gaps and opportunities audit. That is really where you should spend the majority of your time.

Something that is also really important is the competitor selection as I talked about earlier. If you don’t have the proper competitors to audit, then you won’t get the helpful type of insight that you are looking for. Technical health would be the third most time-consuming, important step of this competitive analysis.

As we talked about, good user experience is very important. And the last two that should take you a little less time are keyword distribution and backlinks. So if you’re really, really pressed for time, you can forgo the backlinks for now and do it later and focus on that part of the on-site SEO.


So to recap, the five stages of the competitive analysis that you should include in your own competitive analysis are selecting the right competitors, auditing the keyword distribution, looking for content and keyword gaps and analysis, performing a technical check on your website and your competitors’ websites, and auditing your backlinks and the competitors’ backlinks.

If I can leave you with one more thing is really to be realistic. That goes back to the competitor selection and even when we’re talking about distribution. Be realistic in your target keywords. Don’t go for keywords that are extremely difficult if you are a website with a lower Domain Authority or you’re just starting with SEO.

And don’t go after those B2B giants if you’re a mid-market B2B company. Know that you can refresh this at any time if you feel like you’ve outgrown your competitors. So thank you again for spending time to talk about competitive analysis with me. Now go and audit those competitors.

Video transcription by

Sign up for The Moz Top 10, a semimonthly mailer updating you on the top ten hottest pieces of SEO news, tips, and rad links uncovered by the Moz team. Think of it as your exclusive digest of stuff you don’t have time to hunt down but want to read!

Reblogged 1 year ago from

Brands need to speak out in support of the Black community

As HubSpot announces new funding for Black economic empowerment, we ask a Black marketing strategist if brands are doing enough.

Please visit Marketing Land for the full article.

Reblogged 1 year ago from

7 of the easiest ways to increase your social media shares

Social media shares are a valuable currency for brands today.

That’s because shares directly signal which messages, campaigns and images engage your audience the most.

And on the flip side, a lack of shares is often a sign of a lackluster content strategy.

However, getting social media shares is easier said than done when your audience is bombarded with so much content across so many platforms these days.

If you feel like there aren’t enough eyes on your content, we hear you. That’s why we’ve put together a list of seven low-hanging strategies you can roll out ASAP to encourage more shares.

Why do you need to track social shares in the first place?

Before we get into the nitty-gritty, let’s briefly break down why social shares matter.

It’s no secret that interactions related to engagement (e.g., shares, “likes” and comments) are among the most important metrics to track. Perhaps that’s why 48% of social marketers use shares as a way to measure the success of their campaigns.

Some critics consider social media shares to be a vanity metric, though.

And those critics aren’t totally wrong. After all, how many shares a post gets isn’t exactly a measure of its quality. Look no further than celebrity Tweets that get shared around or brand Tweets that go viral.

Sure, we want people to share our content. That said, shares don’t mean much if they don’t have an impact on your business.

For example, let’s say you have a post that results in thousands of shares but no long-term engagement, no new followers and no sales. What’s the point?

But let’s say that the same post results in a few press mentions, tons of traffic and a flood of new customers. That’s a win, obviously.

The takeaway here is that for shares to be a meaningful metric, they need to somehow be tied to your social media goals.

If you’re interested in brand awareness or community engagement, shares are a direct indicator of your success.  Brands should also dig deeper than share numbers to understand why followers decided to engage with a particular post.

8 simple tactics to help you score more social media shares

Now, onto the good stuff!

But first, a quick disclaimer.

Keep in mind that social media algorithms are fickle. There’s no secret or guarantee for getting social shares.

Instead, your end-game should be sticking to the best practices of social promotion while building a foundation of shareable content. Any combination of the tactics below can help and are fair game for just about any business.

1. Prioritize the most shareable content formats (video, images and breaking news)

It’s pretty well-documented that visual content is among the most-shared on social media.

Data from the most recent Sprout Social Index drives this point home, with images (68%) and videos (50%) are among the top spots.

Look no further than the popularity of TikTok and Instagram as proof that bite-sized video content is booming right now.

Heck, the term “viral video” exists because the medium is so share-worthy. Whether it’s a brief tutorial or a mini-commercial for your business, videos are ideal for keeping your followers glued to their screens.

Basic with Babish example of "viral video" or social media shares on Facebook

Meanwhile, infographics and visual representations of data also tend to spread quickly on social media. Because infographics are so easy to digest at a glance and don’t require readers to do much reading, they have much higher sharing potential versus a traditional post.

Remember that social media is still a hotbed of news and “did-you-know” pieces. When in doubt, breaking stories and publishing new information is a safe bet for shares.

2. Craft captions that make your posts more visible

For the sake of getting more social shares and staying in the good graces of any social algorithm, you can’t afford to ignore your captions.

Dropping links and expecting engagement is a surefire way to reduce the reach of your content. Simply dropping links to videos and blog posts to your social feed doesn’t do anything to signal that your post is worth clicking, let alone sharing.

Some quick tips to beef up your social captions to make them more share-worthy include:

  • Implementing a hashtag strategy on networks like Twitter, Instagram and LinkedIn (hint: research says that posts coupled with hashtags receive more reach than those without them)
  • Using appropriate call-to-action phrases in your copy (think: “retweet” or “share this”)
  • Take advantage of character limits in your post, giving you an opportunity to include relevant, searchable terms in your copy (particularly on LinkedIn, Pinterest or Twitter)

For example, coupling your Instagram posts with hashtags instantly more likely to be seen and regrammed.

The same rings true for networks like Pinterest where descriptions and tags increase the visibility of your content.

Example of using Pinterest search as a means to boost shares on social media

No, you don’t need to cram your captions with keywords. That said, you should familiarize yourself with character limits on each social network and take advantage of the real estate available to you.

3. Make sure each and every post is mobile-friendly

Fact: the vast majority of social traffic comes from mobile devices.

Thankfully, social platforms do most of the heavy lifting when it comes to mobile optimization. There are some additional steps you can take to ensure that you don’t neglect your mobile audience, including:

  • Double-check that graphics are legible, zoomable and not cut off by image previews (Twitter can be tricky about this sometimes)
  • Include appropriate line breaks and punctuation in your social captions to avoid walls of text or hashtags
  • Add captions to your social videos so they’re accessible to all viewers, including those who have their phones silenced

4. Time your posts to perfection

This might be a no-brainer, but make sure that you’re posting your content when your target audience is most engaged.

We actually have an in-depth guide highlighting the best times to post on social media broken down by network and industry.

Heat map of the best times to post on Facebook to get more social media shares

True, there’s no secret timing trick to squeeze extra shares from users via social. That said, publishing content based on when your followers are most active makes sense for maximum visibility.

5. Piggyback on trending topics and content formats

Social media moves quickly, as does its many trends.

Whether it’s trending hashtags or the latest memes, capitalizing on what folks are already talking about is a proven way to score shares.

Trendjacking might be considered low-effort, but doing so certainly help boost brand awareness and showcase your brand’s personality. Just make sure that you read the room and employ humor or trend-based content when it’s appropriate.

6. Publish content that encourages a response (questions and polls)

So much of getting social media shares boils down to driving conversations.

That’s why question-based posts are so popular. Serving as a sort of call-and-response, questions and polls are a prime for shares as a way for followers to bring new people into the conversation.

The beauty of question-based posts is that they don’t require much in terms of creativity and work for pretty much effort. Through frequent questions, you can build a stronger sense of community with your audience while winning more shares as an added bonus.

7. Make social sharing seamless all other marketing channels

Sharing is easy. Like, really easy.

Or at least it should be.

Your job should be to remove as many steps as possible when it comes time for someone to share your content.

That means no copying-and-pasting or manual typing. Ideal, someone should be able to share your content in a single click or tap.

To wrap things up, make sure that you’ve made it easy for people to share your content and access your brand via social.

This means including social share buttons on your blog posts…

Example of social media share buttons on a blog post

…or embedding tweets within your content that readers can share.

Example of in-line social sharing from a blog post

Beyond your website or blog, social share buttons should also be part of your email footer to transform your eager subscribers into dedicated followers.

Example of including social sharing buttons in an email signature

And when in doubt, don’t be afraid just to ask for shares if you’re particularly proud of a piece of content. The “like, share and subscribe” cliche on YouTube exists for a reason (hint: it actually works).

Screenshot of YouTuber including social media handles and asking for social shares

And with that, we wrap up our guide!

Are you happy with how many social media shares you’re getting?

Getting more social shares is a near-universal goal among marketers.

Sticking to the tips above can definitely help. Meanwhile, brands should be willing to experiment with different types of content and analyze what’s working (and what’s not).

Over time, you can define a content strategy that results in consistent shares from your target audience.

And if you want to learn about what shareable content looks like or how to expand your brand’s reach, make sure you familiarize yourself with what today’s social media algorithms are looking for.

This post 7 of the easiest ways to increase your social media shares originally appeared on Sprout Social.

Reblogged 1 year ago from

Building A Conversational N.L.P Enabled Chatbot Using Google’s Dialogflow

Ever since ELIZA (the first Natural Language Processing computer program brought to life by Joseph Weizenbaum in 1964) was created in order to process user inputs and engage in further discussions based on the previous sentences, there has been an increased use of Natural Language Processing to extract key data from human interactions. One key application of Natural language processing has been in the creation of conversational chat assistants and voice assistants which are used in mobile and web applications to act as customer care agents attending to the virtual needs of customers.

In 2019, the Capgemini Research Institute released a report after conducting a survey on the impact which chat assistants had on users after being incorporated by organizations within their services. The key findings from this survey showed that many customers were highly satisfied with the level of engagement they got from these chat assistants and that the number of users who were embracing the use of these assistants was fast growing!

To quickly build a chat assistant, developers and organizations leverage SaaS products running on the cloud such as Dialogflow from Google, Watson Assistant from IBM, Azure Bot Service from Microsoft, and also Lex from Amazon to design the chat flow and then integrate the natural language processing enabled chat-bots offered from these services into their own service.

This article would be beneficial to developers interested in building conversational chat assistants using Dialogflow as it focuses on the Dialogflow itself as a Service and how chat assistants can be built using the Dialogflow console.

Note: Although the custom webhooks built within this article are well explained, a fair understanding of the JavaScript language is required as the webhooks were written using JavaScript.


Dialogflow is a platform that simplifies the process of creating and designing a natural language processing conversational chat assistant which can accept voice or text data when being used either from the Dialogflow console or from an integrated web application.

To understand how Dialogflow simplifies the creation of a conversational chat assistant, we will use it to build a customer care agent for a food delivery service and see how the built chat assistant can be used to handle food orders and other requests of the service users.

Before we begin building, we need to understand some of the key terminologies used on Dialogflow. One of Dialogflow’s aim is to abstract away the complexities of building a Natural Language Processing application and provide a console where users can visually create, design, and train an AI-powered chatbot.

Dialog Flow Terminologies

Here is a list of the Dialogflow terminologies we will consider in this article in the following order:

  • Agent
    An agent on Dialogflow represents the chatbot created by a user to interact with other end-users and perform data processing operations on the information it receives. Other components come together to form an agent and each time one of these components is updated, the agent is immediately re-trained for the changes to take effect.

    User’s who want to create a full-fledged conversational chatbot within the quickest time possible can select an agent from the prebuilt agents which can be likened to a template which contains the basic intents and responses needed for a conversational assistant.

    Note: A conversational assistant on Dialogflow will now be referred to as an “agent” while someone else asides the author of the assistant who interacts with it would be referred to as an “end-user”.

  • Intent
    Similar to its literal meaning, the intent is the user’s end goal in each sentence when interacting with an agent. For a single agent, multiple intents can be created to handle each sentence within a conversation and they are connected together using Contexts.

    From the intent, an agent is able to understand the end-goal of a sentence. For example, an agent created to process food orders from customers would be to recognize the end-goal of a customer to place an order for a meal or get recommendations on the available meals from a menu using the created intents.

  • Entity
    Entities are a means by which Dialogflow processes and extracts specific data from an end-user’s input. An example of this is a Car entity added to an intent. Names of vehicles would be extracted from each sentence input as the Car entity.

    By default, an agent has some System entities which have predefined upon its creation. Dialogflow also has the option to define custom entities and add values recognizable within this entity.

  • Training Phrase
    The training phrases is a major way in which an agent is able to recognize the intent of an end-user interacting with the agent. Having a large number of training phrases within an intent increases the accuracy of the agent to recognize an intent, in fact Dialogflow’s documentation on training phases recommends that “at least 10-20” training phrases be added to a created intent.

    To make training phrases more reusable, dialogflow gives the ability to annotate specific words within the training phrase. When a word within a phrase is annotated, dialogflow would recognize it as a placeholder for values that would be provided in an end-user’s input.

  • Context
    Contexts are string names and they are used to control the flow of a conversation with an agent. On each intent, we can add multiple input contexts and also multiple output contexts. When the end-user makes a sentence that is recognized by an intent the output contexts become active and one of them is used to match the next intent.

    To understand contexts better, we can illustrate context as the security entry and exit door, while the intent as the building. The input context is used when coming into the building and it accepts visitors that have been listed in the intent while the exit door is what connects the visitors to another building which is another intent.

  • Knowledge base
    A knowledge base represents a large pool of information where an agent can fetch data when responding to an intent. This could be a document in any format such as txt, pdf, csv among other supported document types. In machine learning, a knowledge base could be referred to as a training dataset.

    An example scenario where an agent might refer to a knowledge base would be where an agent is being used to find out more details about a service or business. In this scenario, an agent can refer to the service’s Frequently Asked Questions as its knowledge base.

  • Fulfillment
    Dialogflow’s Fulfillment enables an agent to give a more dynamic response to a recognized intent rather than a static created response. This could be by calling a defined service to perform an action such as creating or retrieving data from a database.

    An intent’s fulfillment is achieved through the use of a webhook. Once enabled, a matched intent would make an API request to the webhook configured for the dialogflow agent.

Now, that we have an understanding of the terminologies used with Dialogflow, we can move ahead to use the Dialogflow console to create and train our first agent for a hypothetical food service.

Using The Dialogflow Console

Note: Using the Dialogflow console requires that a Google account and a project on the Google Cloud Platform is created. If unavailable, a user would be prompted to sign in and create a project on first use.

The Dialogflow console is where the agent is created, designed, and trained before integrating with other services. Dialogflow also provides REST API endpoints for users who do not want to make use of the console when building with Dialogflow.

While we go through the console, we will gradually build out the agent which would act as a customer care agent for a food delivery service having the ability to list available meals, accept a new order and give information about a requested meal.

The agent we’ll be building will have the conversation flow shown in the flow chart diagram below where a user can purchase a meal or get the list of available meals and then purchase one of the meals shown.

Creating A New Agent

Within every newly created project, Dialogflow would prompt the first time user to create an agent which takes the following fields:

  • A name to identify the agent.
  • A language which the agent would respond in. If not provided the default of English is used.
  • A project on the Google Cloud to associate the agent with.

Immediately after we click on the create button after adding the values of the fields above, a new agent would be saved and the intents tab would be shown with the Default fallback and Default Welcome intent as the only two available intents which are created by default with every agent on Dialogflow.

Exploring the Default fallback intent, we can see it has no training phrase but has sentences such as “Sorry, could you say that again?”, “What was that?”, “Say that one more time?” as responses to indicate that the agent was not able to recognize a sentence which has been made by an end-user. During all conversations with the agent, these responses are only used when the agent cannot recognize a sentence typed or spoken by a user.

While the sentences above are sufficient for indicating that agent does not understand the last typed sentence, we would like to aid the end-user by giving them some more information to hint the user on what the agent can recognize. To do this, we replace all the listed sentences above with the following ones and click the Save button for the agent to be retrained.

I didn't get that. I am Zara and I can assist you in purchasing or learning more about the meals from Dialogflow-food-delivery service. What would you like me to do?

I missed what you said. I'm Zara here and I can assist you in purchasing or learning more about the meals from Dialogflow-food-delivery service. What would you like me to do?

Sorry, I didn't get that. Can you rephrase it?  I'm Zara by the way and I can assist you in purchasing or learning more about the meals from Dialogflow-food-delivery service.

Hey, I missed that I'm Zara and I can assist you in purchasing or learning more about the meals from Dialogflow-food-delivery service.  What would you like me to do?

From each of the four sentences above, we see can observe that the agent could not recognize what the last sentence made was and also a piece of information on what the agent can do thus hinting the user on what to type next in order to continue the conversation.

Moving next to the Default Welcome Intent, the first section on the intent page is the Context section and expanding it we can see both the input and output contexts are blank. From the conversation flow of the agent shown previously, we want an end-user to either place a meal order or request a list of all available meals. This would require the two following new output contexts they would each become active when this intent is matched;

  • awaiting_order_request
    This would be used to match the intent handling order requests when an end-user wants to place an order for a meal.

  • awaiting_info_request
    This would be used to match the intent that retrieves data of all the meals when an end-user wants to know the available meals.

After the context section is the intent’s Events and we can see it has the Welcome event type added to the list of events indicating that this intent will be used first when the agent is loaded.

Coming next are the Training Phrases for the intent. Due to being created by default, it already has 16 phrases that an end-user would likely type or say when they interact with the agent for the first time.

When an end-user types or makes a sentence similar to those listed in the training phrases above, the agent would respond using a picked response from the Responses list section shown below:

Each of the responses above is automatically generated for every agent on Dialogflow. Although they are grammatically correct, we would not use them for our food agent. Being a default intent that welcomes an end-user to our agent, a response from the agent should tell what organization it belongs to and also list its functionalities in a single sentence.

We would delete all the responses above and replace them with the ones below to better help inform an end-user on what to do next with the agent.

1.  Hello there, I am Zara and I am here to assist you to purchase or learn about the meals from the Dialogflow-food-delivery service. What would you like me to do?
2. Hi, I am Zara and I can assist you in purchasing or learning more about the meals from the Dialogflow-food-delivery service. What would you like me to do?

From the two responses above, we can see it tells an end-user what the name of the bot is, the two things the agent can do, and lastly, it pokes the end-user to take further action. Taking further action further from this intent means we need to connect the Default Welcome Intent to another. This is possible on Dialogflow using context.

When we add and save those two phrases above, dialogflow would immediately re-train the agent so I can respond using any one of them.

Next, we move on to create two more intents to handle the functionalities which we have added in the two responses above. One to purchase a food item and the second to get more information about meals from our food service.

Creating list-meals intent:

Clicking the + ( add ) icon from the left navigation menu would navigate to the page for creating new intents and we name this intent list-available-meals.

From there we add an output context with the name awaiting-order-request. This output context would be used to link this intent to the next one where they order a meal as we expect an end-user to place an order for a meal after getting the list of meals available.

Moving on to the Training Phrases section on the intent page, we will add the following phrases provided by the end-user in order to find out which meals are available.

Hey, I would like to know the meals available.
What items are on your menu?
Are there any available meals?
I would like to know more about the meals you offer.

Next, we would add just the single fallback response below to the Responses section;

Hi there, the list of our meals is currently unavailable. Please check back in a few minutes as the items on the list are regularly updated.

From the response above we can observe that it indicates that the meal’s list is unavailable or an error has occurred somewhere. This is because it is a fallback response and would only be used when an error occurs in fetching the meals. The main response would come as a fulfillment using the webhooks option which we will set up next.

The last section in this intent page is the Fulfillment section and it is used to provide data to the agent to be used as a response from an externally deployed API or source. To use it we would enable the Webhook call option in the Fulfillment section and set up the fulfillment for this agent from the fulfillment tab.

Managing Fulfillment:

From the Fulfillment tab on the console, a developer has the option of using a webhook which gives the ability to use any deployed API through its endpoint or use the Inline Code editor to create a serverless application to be deployed as a cloud function on the Google Cloud. If you would like to know more about serverless applications, this article provides an excellent guide on getting started with serverless applications.

Each time an end-user interacts with the agent and the intent is matched, a POST) request would be made to the endpoint. Among the various object fields in the request body, only one is of concern to us, i.e. the queryResult object as shown below:

  "queryResult": {
    "queryText": "End-user expression",
    "parameters": {
      "param-name": "param-value"

While there are other fields in the queryResult such as a context, the parameters object is more important to us as it holds the parameter extracted from the user’s text. This parameter would be the meal a user is requesting for and we would use it to query the food delivery service database.

When we are done setting up the fulfillment, our agent would have the following structure and flow of data to it:

From the diagram above, we can observe that the cloud function acts as a middleman in the entire structure. The Dialogflow agent sends the parameter extracted from an end user’s text to the cloud function in a request payload and the cloud function, in turn, queries the database for the document using the received name and sends back the queried data in a response payload to the agent.

To start an implementation of the design system above, we would begin with creating the cloud function locally in a development machine then connect it to our dialogflow agent using the custom webhook option. After it has been tested, we can switch to using the inline editor in the fulfillment tab to create and deploy a cloud function to work with it. We begin this process by running the following commands from the command line:

# Create a new project and ( && ) move into it.
mkdir dialogflow-food-agent-server && cd dialogflow-food-agent-server

# Create a new Node project
yarn init -y

# Install needed packages
yarn add mongodb @google-cloud/functions-framework dotenv

After installing the needed packages, we modify the generated package.json file to include two new objects which enable us to run a cloud function locally using the Functions Framework.

// package.json
  "main": "index.js",
  "scripts": {
    "start": "functions-framework --target=foodFunction --port=8000"

The start command in the scripts above tells the functions Framework to run the foodFunction in the index.js file and also makes it listen and serve connections through our localhost on port 8000.

Next is the content of the index.js file which holds the function; we’ll make use of the code below since it connects to a MongoDB database and queries the data using the parameter passed in by the Dialogflow agent.


exports.foodFunction = async (req, res) => {
  const { MongoClient } = require("mongodb");
  const CONNECTION_URI = process.env.MONGODB_URI;

  // initate a connection to the deployed mongodb cluster
  const client = new MongoClient(CONNECTION_URI, {
    useNewUrlParser: true,

  client.connect((err) => {
    if (err) {
        .send({ status: "MONGODB CONNECTION REFUSED", error: err });
    const collection = client.db(process.env.DATABASE_NAME).collection("Meals");
    const result = [];
    const data = collection.find({});
    const meals = [
        text: {
          text: [
            We currently have the following 20 meals on our menu list. Which would you like to request for?,
      data.forEach((item) => {
        const { name, description, price, image_uri } = item;
        const card = {
          card: {
            title: ${name} at $${price},
            subtitle: description,
            imageUri: image_uri,

      .then((_) => {
        const response = {
          fulfillmentMessages: meals,
      .catch((e) => res.status(400).send({ error: e }));

From the code snippet above we can see that our cloud function is pulling data from a MongoDB database, but let’s gradually step through the operations involved in pulling and returning this data.

  • First, the cloud function initiates a connection to a MongoDB Atlas cluster, then it opens the collection storing the meal category documents within the database being used for the food-service on the cluster.

  • Next, using the parameter passed into the request from the user’s input, we run a find method on the collection to get which then returns a cursor which we further iterate upon to get all the MongoDB documents within the collection containing the data.

  • We model the data returned from MongoDB into Dialogflow’s Rich response message object structure which displays each of the meal items to the end-user as a card with an image, title, and a description.
  • Finally, we send back the entire data to the agent after the iteration in a JSON body and end the function’s execution with a 200 status code.

Note: The Dialogflow agent would wait for a response after a request has been sent within a frame of 5 seconds. This waiting period is when the loading indicator is shown on the console and after it elapses without getting a response from the webhook, the agent would default to using one of the responses added in the intent page and return a DEADLINE EXCEEDED error. This limitation is worth taking note of when designing the operations to be executed from a webhook. The API error retries section within the Dialogflow best practices contains steps on how to implement a retry system.

Now, the last thing needed is a .env file created in the project directory with the following fields to store the environment variables used in the index.js.


At this point, we can start the function locally by running yarn start from the command line in the project’s directory. For now, we still cannot make use of the running function as Dialogflow only supports secure connections with an SSL certificate, and where Ngrok comes into the picture.

Using Ngrok, we can create a tunnel to expose the localhost port running the cloud function to the internet with an SSL certificate attached to the secured connection using the command below from a new terminal;

ngrok http -bind-tls=true 8000

This would start the tunnel and generate a forwarding URL which would be used as an endpoint to the function running on a local machine.

Note: The extra -bind-tls=true argument is what instructs Ngrok to create a secured tunnel rather than the unsecured connection which it creates by default.

Now, we can copy the URL string opposite the forwarding text in the terminal and paste in the URL input field which is found in the Webhook section, and then save it.

To test all that has been done so far, we would make a sentence to the Dialogflow agent requesting the list of meals available using the Input field at the top right section in the Dialogflow console and watch how it waits for and uses a response sent from the running function.

Starting from the center placed terminal in the image above, we can the series of POST requests made to the function running locally and on the right-hand side the data response from the function formatted into cards.

If for any reason a webhook request becomes unsuccessful, Dialogflow would resolve the error by using one of the listed responses. However, we can find out why the request failed by using the Diagnostic Info tool updated in each conversation. Within it are the Raw API response, Fulfillment request, Fulfillment response, and Fulfillment status tabs containing JSON formatted data. Selecting the Fulfillment response tab we can see the response from the webhook which is the cloud function running on our local machine.

At this point, we expect a user to continue the conversation with an order of one of the listed meals. We create the last intent for this demo next to handle meal orders.

Creating Request-meal Intent:

Following the same steps used while creating the first intent, we create a new intent using the console and name it request-meal and add an input context of awaiting_order_request to connect this intent from either the Default Welcome intent or the list-available meals intent.

Within the training phrase section, we make use of the following phrases,

Hi there, I'm famished, can I get some food?

Yo, I want to place an order for some food. 

I need to get some food now.

Dude, I would like to purchase $40 worth of food.

Hey, can I get 2 plates of food?

Reading through the phrases above, we can observe they all indicate one thing — the user wants food. In all of the phrases listed above, the name or type of food is not specified but rather they are all specified as food. This is because we want the food to be dynamic value, if we were to list all the food names we certainly would need to have a very large list of training phrases. This also applies to the amount and price of the food being ordered, they would be annotated and the agent would be able to recognize them as a placeholder for the actual values within an input.

To make a value within a phrase dynamic, dialogflow provides entities. Entities represent common types of data, and in this intent, we use entities to match several food types, various price amounts, and quantity from an end user’s sentence to request.

From the training phrases above, dialogflow would recognize $40 as `@sys.unit-currencywhich is under the amounts-with-units category of the [system entities list]( and **2** as@numberunder the number category of the [system entities list]( However,food` is not a not a recognized system entity. In a case such as this, dialogflow gives developers the option to create a custom entity to be used.

Managing Entities

Double-clicking on food would pop up the entities dropdown menu, at the bottom of the items in the dropdown we would find the Create new entity button, and clicking it would navigate to the Entities tab on the dialogflow console, where we can manage all entities for the agent.

When at the entities tab, we name this new entity as food then at the options dropdown located at the top navigation bar beside the Save button we have the option to switch the entities input to a raw edit mode. Doing this would enable us to add several entity values in either a json or csv format rather than having to add the entities value one after the other.

After the edit mode has been changed, we would copy the sample JSON data below into the editor box.

// foods.json

        "value": "Fries",
        "synonyms": [
            "Fried food"
        "value": "Shredded Beef",
        "synonyms": [
            "Shredded Beef",
            "Shredded Meat"
        "value": "Shredded Chicken",
        "synonyms": [
            "Shredded Chicken",
            "Pieced Chicken"

        "value": "Sweet Sour Sauce",
        "synonyms": [
            "Sweet Sour Sauce",
            "Sweet Sour",
        "value": "Spring Onion",
        "synonyms": [
            "Spring Onion",
        "value": "Toast",
        "synonyms": [
            "Toast Bread",
            "Toast Meal"
        "value": "Sandwich",
        "synonyms": [
            "Sandwich Bread",
            "Sandwich Meal"
        "value": "Eggs Sausage Wrap",
        "synonyms": [
            "Eggs Sausage Wrap",
            "Eggs Sausage",
            "Sausage Wrap",
        "value": "Pancakes",
        "synonyms": [
            "Eggs Pancakes",
            "Sausage Pancakes"
        "value": "Cashew Nuts",
        "synonyms": [
            "Cashew Nuts",
            "Sausage Cashew"
        "value": "Sweet Veggies",
        "synonyms": [
            "Sweet Veggies",
            "Sweet Vegetables"
        "value": "Chicken Salad",
        "synonyms": [
            "Chicken Salad",
            "Sweet Chicken Salad"
        "value": "Crunchy Chicken",
        "synonyms": [
            "Crunchy Chicken",
            "Crunchy Chickens"
        "value": "Apple Red Kidney Beans",
        "synonyms": [
            "Apple Red Kidney Beans",
            "Sweet Apple Red Kidney Beans",
            "Apple Beans Combination"

From the JSON formatted data above, we have 15 meal examples. Each object in the array has a “value” key which is the name of the meal and a “synonyms” key containing an array of names very similar to the object’s value.

After pasting the json data above, we also check the Fuzzy Matching checkbox as it enables the agent to recognize the annotated value in the intent even when incompletely or slightly misspelled from the end user’s text.

After saving the entity values above, the agent would immediately be re-trained using the new values added here and once the training is completed, we can test by typing a text in the input field at the right section.

Responses within this intent would be gotten from our previously created function using the intent’s fulfillment webhook, however, we add the following response to serve as a fallback to be used whenever the webhook is not executed successfully.

I currently can't find your requested meal. Would you like to place an order for another meal?

We would also modify the code of the existing cloud function to fetch a single requested as it now handles requests from two intents.


exports.foodFunction = async (req, res) => {
  const { MongoClient } = require("mongodb");
  const CONNECTION_URI = process.env.MONGODB_URI;

  const client = new MongoClient(CONNECTION_URI, {
    useNewUrlParser: true,

  // initate a connection to the deployed mongodb cluster
  client.connect((err) => {
    if (err) {
        .send({ status: "MONGODB CONNECTION REFUSED", error: err });

    const collection = client.db(process.env.DATABASE_NAME).collection("Meals");
    const { displayName } = req.body.queryResult.intent;
    const result = [];

    switch (displayName) {
      case "list-available-meals":
        const data = collection.find({});
        const meals = [
            text: {
              text: [
                We currently have the following 20 meals on our menu list. Which would you like to request for?,
          data.forEach((item) => {
            const {
            } = item;
            const card = {
              card: {
                title: ${name} at $${price},
                subtitle: description,
                imageUri: image_uri,
        return Promise.all(result)
          .then((_) => {
            const response = {
              fulfillmentMessages: meals,
          .catch((e) => res.status(400).send({ error: e }));

      case "request-meal":
        const { food } = req.body.queryResult.parameters;

        collection.findOne({ name: food }, (err, data) => {
          if (err) {
            res.status(400).send({ error: err });
          const { name, price, description, image_uri } = data;
          const singleCard = [
              text: {
                text: [The ${name} is currently priced at $${price}.],
              card: {
                title: ${name} at $${price},
                subtitle: description,
                imageUri: image_uri,
                buttons: [
                    text: "Pay For Meal",
                    postback: "htts://",



From the highlighted parts above, we can see the following new use cases that the function has now been modified to handle:

  • Multiple intents
    the cloud function now uses a switch statement with the intent’s name being used as cases. In each request payload made to a webhook, Dialogflow includes details about the intent making the request; this is where the intent name is being pulled from to match the cases within the switch statement.
  • Fetch a single meal
    the Meals collection is now queried using the value extracted as a parameter from the user’s input.
  • A call-to-action button is now being added to the card which a user can use to pay for the requested meal and clicking it opens a tab in the browser. In a functioning chat assistant, this button’s postback URL should point to a checkout page probably using a configured third-party service such as Stripe checkout.

To test this function again, we restart the function for the new changes in the index.js file to take effect and run the function again from the terminal by running yarn start.

Note: You don’t have to restart the terminal running the Ngrok tunnel for the new changes to take place. Ngrok would still forward requests to the updated function when the webhook is called.

Making a test sentence to the agent from the dialogflow console to order a specific meal, we can see the request-meal case within the cloud function being used and a single card getting returned as a response to be displayed.

At this point, we can be assured that the cloud function works as expected. We can now move forward to deploy the local function to the Google Cloud Functions using the following command;

gcloud functions deploy "foodFunction" --runtime nodejs10 --trigger-http --entry-point=foodFunction --set-env-vars=[MONGODB_URI="MONGODB_CONNECTION_URL", DATABASE_NAME="DATABASE_NAME"] --allow-unauthenticated

Using the command above deploys the function to the Google Cloud with the flags explained below attached to it and logs out a generated URL endpoint of deployed cloud function to the terminal.

  • NAME
    This is the name given to a cloud function when deploying it and is it required. In our use case, the name of the cloud function when deployed would be foodFunction.

  • trigger-http
    This selects HTTP as the function’s trigger type. Cloud functions with an HTTP trigger would be invoked using their generated URL endpoint. The generated URLs are secured and use the https protocol.

  • entry-point
    This the specific exported module to be deployed from the file where the functions were written.

  • set-env-vars
    These are the environment variables available to the cloud function at runtime. In our cloud function, we only access our MONGODB_URI and DATABASE_NAME values from the environment variables.

    The MongoDB connection string is gotten from a created MongoDB cluster on Atlas. If you need some help on creating a cluster, the MongoDB Getting started section provides great help.

  • allow-authenticated
    This allows the function to be invoked outside the Google Cloud through the Internet using its generated endpoint without checking if the caller is authenticated.

Dialogflow Integrations

Dialogflow gives developers the feature to integrate a built agent into several conversational platforms including social media platforms such as Facebook Messenger, Slack, and Telegram. Asides from the two integration platforms which we used for our built agent, the Dialogflow documentation lists the available types of integrations and platforms within each integration type.

Integrating With Google Actions

Being a product from Google’s ecosystem, agents on Dialogflow integrate seamlessly with Google Assistant in very few steps. From the Integrations tab, Google Assistant is displayed as the primary integration option of a dialogflow agent. Clicking the Google Assistant option would open the Assistant modal from which we click on the test app option. From there the Actions console would be opened with the agent from Dialogflow launched in a test mode for testing using either the voice or text input option.

Integrating a dialogflow agent with the Google Assistant is a huge way to make the agent accessible to millions of Google Users from their Smartphones, Watches, Laptops, and several other connected devices. To publish the agent to the Google Assistant, the developers docs provides a detailed explanation of the process involved in the deployment.

Integrating With A Web Demo

The Web Demo which is located in the Text-based sections of the Integrations Tab in the Dialogflow console allows for the use of the built agent in a web application by using it in an iframe window. Selecting the web Demo option would generate a URL to a page with a chat window that simulates a real-world chat application.

Note: Dialogflow’s web demo only supports text responses and does not support the display of Rich messages and images. This worth noting when using a webhook that responds with data in the Rich response format.


From several surveys, we can see the effect of chat assistants on customer satisfaction when incorporated by organizations into their services. These positive metrics are expected to grow up in the next coming years thus placing greater importance on the use of these chat assistants.

In this article, we have learned about Dialogflow and how it is providing a platform for organizations and developers to build Natural Language processing conversational chat assistants for use in their services. We also moved further to learn about its terminologies and how these terminologies apply when building a chat assistant by building a demo chat assistant using the Dialogflow console.

If a chat assistant is being built to be used at a production level, it is highly recommended that the developer(s) go through the Dialogflow best practices section of the documentation as it contains standard design guidelines and solutions to common pitfalls encountered while building a chat assistant.

The source code to the JavaScript webhook built within this article has been pushed to GitHub and can be accessed from this repository.


Reblogged 1 year ago from

Making Websites Easier To Talk To

A website without a screen doesn’t sound right does it. Like a book without pages, or a car without a steering wheel. Yet there are audiobooks, hand-free vehicles. And increasingly websites are being used without even being looked at — at least by humans.

Phone assistants and home speakers are a growing part of the Internet ecosystem. In the article, I will try to break down what that means for websites going forward, what designers can do about it, and why this might finally be a leap forward to accessibility. More than two thirds of the web is inaccessible to those with visual impairments, after all. It’s time to make websites easy to talk to.

Invasion Of The Home Speakers

Global smart speaker sales topped 147 million in 2019 and pandemic or no pandemic the trend is going up. Talking is faster than typing, after all. From Google Home to Alexa to smartphone assistants, cars, and even fridges, more and more people are using programmes to search the web on their behalf.

Putting aside the rather ominous Big Brother Inc undertones of this trend, it’s safe to say hundreds of millions of people are already exploring the web each day without actually looking at it. Screens are no longer essential to browsing the web and sites ought to adapt to this new reality. Those that don’t are cutting themselves off from hundreds of millions of people.

Developers, designers and writers alike should be prepared for the possibility that their work will not be seen or clicked at all — it will be heard and spoken to.

Designing Invisibility

There are two main prongs to the topic of website talkiness — tech and language. Let’s start with tech, which runs the gauntlet all the way from basic content structure to semantic markup and beyond. I’m as keen on good writing as anyone, but it’s not the place to start. You could have website copy worthy of a Daniel Day-Lewis performance, but if it isn’t arranged and marked up properly it won’t be worth much to anyone.

Age Old Foundations

The idea of websites being understood without being seen is not a new one. Screen readers have been around for decades, with two-thirds of users choosing speech as their output, with the final third choosing braille.

The focus of this article goes further than this, but making websites screen reader friendly provides a rock solid foundation for the fancier stuff below. I won’t linger on this too long as others have written extensively on the topic (links below) but below are things you should always be thinking about:

  • Clear navigation in-page and across the site.
  • Align DOM structure with visual design.
  • Alt text, no longer than 16 words or so, if an image does not need alt text (if it’s a background for example) have empty alt text, not no alt text.
  • Descriptive hyperlinks.
  • ‘Skip to content links’.

Visual thinking actually blinds us to many design failings. Users can and often do put the pieces together themselves, but that doesn’t do much for machine-readable websites. Making websites easy to talk to starts with making them text-to-speech (TTS) friendly. It’s good practice and it massively improves accessibility. Win win.

Further Reading On TTS Design And Accessibility

Fancier Stuff

As well as laying a strong foundation, designing for screen readers and accessibility is good for its own sake. That’s reason enough to mention it first. However, it doesn’t quite provide for the uptick of ‘hands-free’ browsing I spoke about at the start of this piece. Voice user interfaces, or VUIs. For that we have to dig into semantic markup.

Making websites easy to talk to means labelling content at a much more granular level. When people ask their home assistant for the latest news, or a recipe, or whether that restaurant is open on Tuesday night, they don’t want to navigate a website using their voice. They want the information. Now. For that to happen information on websites needs to be clearly labelled.

I’ve rather tumbled down the Semantic Web rabbit hole this year, and I don’t intend to repeat myself here. The web can and should aspire to be machine readable, and that includes talkiness.

Semantic markup already exists for this. One is called ‘speakable’, a property currently in beta which highlights the parts of a web page which are ‘especially appropriate for text-to-speech conversion.’

For example, I and two friends review an album a week as a hobby. We recently redesigned the website with semantic markup integrated. Below is a portion of a page’s structured data showing speakable in action:

  "@context": "",
  "@type": "Review",
  "reviewBody": "It's breathless, explosive music, the kind of stuff that compels listeners to pick up an instrument or start a band. Origin of Symmetry listens like a spectacular jam — with all the unpolished, patchy, brazen energy that entails — and all in all it's pretty rad, man.",
  "datePublished": "2015-05-23",
  "author": [
      "@type": "Person",
      "name": "André Dack"
      "@type": "Person",
      "name": "Frederick O'Brien"
      "@type": "Person",
      "name": "Andrew Bridge"
  "itemReviewed": {
    "@type": "MusicAlbum",
    "name": "Origin of Symmetry",
    "@id": "",
    "image": "",
    "albumReleaseType": "",
    "byArtist": {
      "@type": "MusicGroup",
      "name": "Muse",
      "@id": ""
  "reviewRating": {
    "@type": "Rating",
    "ratingValue": 26,
    "worstRating": 0,
    "bestRating": 30
  "speakable": {
    "@type": "SpeakableSpecification",
    "cssSelector": [

So, if someone asks their home speaker assistant what Audioxide thought of Origin of Symmetry by Muse, speakable should direct it to the album name, the artist, and the bite-sized summary of the review. Convenient and to the point. (And spares people the ordeal of listening to our full summaries.) Nothing’s there that wasn’t there before; it’s just labelled properly. You’ll notice as well that choosing a CSS class is enough. Easy.

This kind of functionality lends itself better so certain types of sites than others, but possibilities are vast. Recipes, news stories, ticket availability, contact information, grocery shopping… all these things and more can be made better if only we get into the habit of making websites easier to talk to, every page packed with clearly structured and labelled information ready and waiting to answer queries when they come their way.

Beyond that the big brains at places like Google and Mozilla are hard at work on dedicated web speech APIs, allowing for more sophisticated user interactions with things like forms and controls. It’s early days for tech like this but absolutely something to keep an eye on.

The rise of home speakers means old and new worlds are colliding. Providing for one provides for the other. Let’s not forget websites are supposed to have been designed for screen readers for decades.

Further Reading

Writing For Speaking

You’ve taken steps to make your website better understood by screen readers, search engines, and all that good stuff. Congratulations. Now we get to the fuzzier topics of tone and personality.

Designing a website to speak is different to designing it to be read. The nature of user interactions is different. A major point to keep in mind is that where voice queries are concerned websites are almost always responsive — answering questions, giving recipes, confirming orders.

An Open NYT study found that for household users ‘interacting with their smart speakers sometimes results in frustrating, or even funny, exchanges, but that feels like a better experience than being tethered to a phone that pushes out notifications.’

In other words, you can’t and shouldn’t force the issue. The look-at-me ethos of pop ups and ads and endless engagement has no place here. Your task is having a good site that gives information on command as clearly and succinctly as possible. A virtual butler, if you will.

What this means in linguistic terms is:

  • Succinct sentences,
  • Plain, simple language,
  • Front-loaded information (think inverted pyramid)),
  • Phrasing answers as complete sentences.

Say what you write out loud, have free text-to-speech systems like TTSReacher say it back to you. Words can sound very different out loud than they do written down, and visa versa. I have my reservations about readability algorithms, but they’re useful tools for gauging clarity.

Further Reading

HAL, Without The Bad Bits

Talking with websites is part of a broader shift towards channel-agnostic web experiences. The nature of websites is changing. From desktop to mobile, and from mobile to smart home systems, they are becoming more fluid. We all know about ‘mobile-first’ indexing. How long until it’s ‘voice-first’?

Moving away from rigid constraints is daunting, but it is liberating too. We look at websites, we listen to them, we talk to them. Each one is like a little HAL, with as much or little personality and/or murderous intent as we see fit to design into it.

Here are steps we can take to make websites easier to talk to, whether building from scratch or updating old projects:

  • Navigate your site using screen readers.
  • Try vocal queries via phone/home assistants.
  • Use semantic markup.
  • Implement speakable markup.

Designing websites for screenless situations improves their accessibility, but it also sharpens their personality, their purpose, and their usefulness. As Preston So writes for A List Apart, ‘it’s an effective way to analyze and stress-test just how channel-agnostic your content truly is.’

Making your websites easy to talk to prepares them for the channel-agnostic web, which is fast becoming a reality. Rather than text and visuals on a screen, sites must be abstract and flexible, ready to interact with an ever growing range of devices.

Reblogged 1 year ago from