Tracking media coverage of your company in Slack with Google Alerts — for free

Źmicier Žaleźničenka
Picnic Engineering
Published in
7 min readNov 23, 2017

--

Mentions, mentions, never enough

Just like every growing company that is proud of its achievements, we at Picnic want to track media coverage in the news outlets. Our online supermarket has already grown out of its baby pants — we deliver groceries in 30 cities across the Netherlands and consider it a pretty big deal. So do Dutch retail news websites and our competitors, some of which keep an eye on us while others focus on different things — thus giving us nice popcorn moments.

Apart from the obvious fun, it’s important for customer service and other departments to know what journalists, competitors, and customers write about our business. Sometimes this feedback can even be useful to hardcore backend developers. If we get praised, we want to celebrate with the team. If we get critical comments, we consider it a learning opportunity and try to improve processes to address the critique. Furthermore, tracking web mentions helps to deal with certain processes we have, such as keeping our Wikipedia page updated.

What if we miss something important? 🤔

Until recently, we weren’t giving this too much thought. We used to hunt Twitter for new links in our free time, and share them with others in various Slack channels. This worked fine, and everyone was happy about it… except me. As a control freak and latent librarian, I had the feeling that this process should be more organised, because what if we miss something important? When you have this feeling, it’s difficult to let go.

So, I decided to automate the discovery of company mentions, and optimise the process of publishing them on Slack in a visually-appealing format. Here’s how it went.

Ready-to-cook Slack integrations

Firstly, I decided to check Slack’s apps directory to see whether I wasn’t the only one bothered by this problem. At least two services offer something similar, and these had the potential to solve my problem. Unfortunately, after giving them a try, I rejected both.

The first service that I found is called Mention.com. This is a powerful dashboard with many features that are great for a dedicated PR team, but it seemed overkill for the task of aggregating web mentions in Slack. The paid plan is too expensive for our needs.

To skip ahead of the narrative slightly, we do use Mention’s free plan to get extra results not captured by Google Alerts. However, our free monthly quota ends just days after renewing, and paying $100 per month for fully enabling this service isn’t something that can be justified for our particular purpose.

The second service I played with is called Alertsy. Unfortunately, I had to discard it because their pricing page includes the AI word eight times (if you count the URL input field). Soon after realising this, I got scared and closed the page… never to return again.

Luckily for us all, there is still one company which does its uncanny AI business without letting you know you’re on the hook; up until the point you’re on the table, sliced, steamed, and ready to be served. Of course, I’m talking about Google.

I never needed this before, but it’s possible to create highly customisable news alerts, directly from Google’s search interface. This is very handy. All you need to do is write a search request, select “News” in results filtering, and scroll to the bottom of the page. Google will then suggest you create an alert, based on your search terms.

Google Alerts

Google Alerts allows you to filter the results by source types (news, blogs, videos, etc.), languages, regions, and popularity. In contrast to the services mentioned previously, Google Alerts is completely free and doesn’t impose any limitations on the number of alerts you can create, or on their complexity. However, it comes with a different kind of price; the Google Alerts configuration pages don’t have any fancy animations whatsoever.

When a new link matching the alert criteria appears on the internet and gets indexed by Google, the alert triggers to inform you about the update. These updates can be delivered via email, or through an RSS feed. As we hoped the mentions would eventually appear on Slack, the RSS feed looked to be the best route. Slack has an RSS app, which can subscribe to such feeds and post messages to a channel of your choice when it’s updated with a new link.

A Google Alert configured to track Picnic web mentions in the English language.

So far, so good. We could now configure alerts to track pertinent mentions on the web, subscribe to the feeds in the Slack RSS app, and expect to be done with it.

Well, we weren’t quite there yet!

Prettifying Google Alerts output

Unfortunately, Slack has a hard time parsing the messages from Google feeds. Slack, Facebook, and other communication tools pre-process the links they find and convert them into good-looking widgets with page information and an article image.

For Google feed links, this doesn’t happen. The links are not direct. After a Slack user taps the link, it’ll first be handled by Google. Only after this stage will the browser make a redirect to a target page, and this is what confuses Slack.

In the screenshot below, you can see a raw output of a Google feed inside Slack.

Raw output of a Google feed in Slack

As you can see, the message title is autogenerated. The <b> tags are not stripped, and page widgets are not created. Whilst it’s still possible to work with these results, we can make the output significantly better.

I’ve written a tiny formatter, which can be installed on one of your servers to prettify the output of feeds you see in Slack. This formatter sneaks in-between Google and the Slack RSS client, and formats the Google feeds in a way that Slack can understand.

You’ll need to add raw Google feed URLs to the formatter configuration, and point the Slack RSS client to the proxied URLs. Each time Slack will ask the RSS feeds to update, it will trigger the formatter. This, in turn, will trigger Google Alerts servers, receive raw feeds, re-format them, and forward to Slack. As a result, you’ll see much better-looking responses, as shown below.

The same Google feed after extra formatting. Notice the custom feed title, bold Google mentions and correctly generated page widgets.

You can find all the details about the formatter proxy installation and configuration on its GitHub page. Feel free to fork it and modify the script for your purposes as needed.

Search quality

In general, we are satisfied with the quality of mentions that we get from Google. However, our feeds sometimes require manual intervention.

Here are the quirks that are important to know before starting to track your mentions.

  • Inevitably the feeds will contain some irrelevant links. The name of our company, Picnic, is a common English word. We often receive “picnic” mentions that have no relevance to us. To improve the quality of alerts, we had to switch from All results to Only the best results in our English feed, and added narrowing search terms (Dutch OR Supermarket) to the search request.
  • Google doesn’t really give you all results. It depends on the value of the Sources setting in Google Alerts configuration, but you’ll always miss some mentions. For us, it helps to use Mention.com and Twitter as extra sources of information. Sometimes we find relevant results that Google doesn’t show us. When we stumble on a link that wasn’t auto-posted by the RSS app, we add it to the channel manually.

A note on the above point: I didn’t explain how to configure integration between Twitter and Slack in this article, but it’s easy to do with IFTTT.

  • To delete irrelevant articles posted by the RSS app from the feed, you’ll need admin permissions in Slack. Unfortunately, Slack doesn’t support per-channel permissions, so this won’t work for everyone. If you want to maintain a nice clean feed of mentions but don’t have admin permissions, you can forward the RSS feeds to a temporary channel and manually review the links. Thereafter, you can copy the relevant ones to the public channel. It’s likely possible to create a bot that deletes irrelevant links (e.g. when marked with an emoticon), but I haven’t explored this option yet.
  • It takes time for Google to index new web pages and update Google Alerts. Usually, our feeds update once or twice per day.
One of the irrelevant links marked for manual deletion. Still nicely formatted, but totally useless.

Summary

In this article, I have discussed ways to track web mentions of your company, competitors, and other search terms. The integration of Google Alerts with Slack requires an initial setup and regular maintenance, but still provides a very convenient mechanism which allows us to stay updated, respond to changes quickly, and better understand the public image of Picnic.

Still not convinced that it’s something for you? But…

…what if you miss something important? 🤔

Think about it.

--

--