That Time I Tricked Google With Its Own Data

Once upon a time SEO was easy

Exact match keyword domain? Boom.
Pages for every keyword? Done.
Ridiculous internal link building? Easy.
Paid link building? Cheap.
Link Pyramids? Get me more shared hosting.
Link Stuffing? Count me in.
Scraping? Now we’re talking.

Back in 2007, I was working on one of the first Online Reputation Management (ORM) systems out there. Like Google did for the web, I built a spider/crawl program. But in my case, it was for a very young ecosystem – social media. It was so old school I launched it via text message on


The essence of the app was that a brand could enter a few keywords they wanted to track and the system would aggregate results from across the social web. Those keywords would likely be your brand or product. This was before Twitter had search functionality. Before they had purchased Summize (that $15M would have been nice though). So if you were Nike, you could see how people were talking about you online. Back then, this was new.

Soon after I built the foundation for this, Google made an interesting move with their Zeitgeist. You see, for a couple years, they released a so-called Zeitgeist of the top searches on Google for the year. This eventually turned into the Google Trends that we know today. It was mostly a marketing tool for them but then they released an RSS-based API. And that’s when the lightbulb moment happened.


I then took the platform I had built to monitor brands on social media and turned its focus on Google Trends. Instead of humans entering keywords to monitor, what if it was automated from data via Google Trends? Interesting.

So I hooked up the Google Trends RSS feed to the Fresh Feeds product I had built and called it Fresh Trends. This was cool. It was kinda like Techmeme for popular topics (I went on to create many verticals like Techmeme using this product as a backend).

The final product was a WordPress website. Each Google Trend was automatically created as a category in WordPress and then I searched my Fresh Feeds platform for content based on that keyword. The system would post an excerpt from the article along with the keyword-rich title. This happened hourly via a cron job. So in the end, I had the most content available for a trending topic on Google search. As Google pumped out trending search topics, I would take that data, search my Fresh Feeds system, and post relevant content to a separate WordPress website creating a highly optimized website based on the most popular searches for that hour. Repeat.

It got indexed by Google as top results for very high traffic, trending search terms. It was shown on top of Google News results with trending topics. It was awesome. Alas, it didn’t last forever.


And that’s the story of me tricking Google (the first time) with gray-hat techniques – in 2007.

Building Public Slack Communities – Slackvite Launch

I had the urge to build and ship something since I gave Hey Kramer to the world.

Bot Slack RTM API

Something … useful.

Since I was already elbows deep in the Slack API, I decided to build a thing that lets you “launch and manage public Slack communities in 30 seconds”. I say “manage” liberally because at this point it does none of that (the ideas list is already getting long).

But, you can launch a fancy pants landing page that pulls beautiful background photos from Unsplash to gather invites for your public Slack community. So, that’s a start I suppose.

Public Slack Community Invite

Is this a new idea? No.

There are a couple excellent solutions for building a public Slack community platform. For instance if you are reading this you’ve probably already stumbled on Slackin. It’s a great solution, however I built Slackvite for those of you that get scared away by landing on a Github page. If seeing ‘.travis.yml’ and ‘app.json’ files frightens you then you might like this.

There’s also the also very capable and popular Typeform hack for creating a Slack community. But again – if code scares you it’s not for you.

With Slackvite you just 1) register 2) connect with Slack 3) select your team 4) launch your public invite landing page to the world. Here’s a demo for an Iowa State Cyclones Slack community.

Slackvite Public Slack Community Invite Landing Page

WordPress .gitignore

Updated May 2016. I wrote the original version of this in 2014 and have since change how I work, thus the update. Unfortunately there is no *right* answer.

Wondering how git fits into your WordPress dev workflow? Here’s a great little file to help you get started – WordPress gitignore. Don’t know what a gitignore file is for? Read up on the gitignore file on the git manual.

The contents of your .gitignore file will vary depending on your style of versioning your work. Some devs keep their entire WordPress sites under version control… including WordPress core and plugins/themes from the .org repo. Others only store custom plugins and themes while ignoring any code that’s not custom. I currently manage code/workflow in all these ways as it varies by project and requirements.

Basic WordPress .gitignore

However in any case, you should ALWAYS ignore the wp-config.php file and the file uploads. You shouldn’t store wp-config.php in git because it is generally unique to the environment it is in (dev, test prod) and it potentially exposes your database username and password. The file uploads (wp-content/uploads) directory should be ignore because it should be handle like content in a database. You don’t wan to store file uploads in version control for the same reason you don’t want to keep your database rows in version control. File uploads should be treated the same way and synchronized with a tool for different environments.


Other WordPress .gitignore Considerations

There are many other types of files you don’t want to clutter up your nice clean repo. There are many type of files found in the wp-content folder that you want to ignore. In most cases it’s easier to tell git what to look for (ie themes and plugins) than it is to list all the things to explicitly ignore. For instance, one will often find backups and cache stored in wp-content. These things can easily be generated and are often environment specific. These are others to often ignore…



Building A Slack Bot With Node.js And WordPress REST API

Some of my first experiments in the world of building a slack bot was to develop a basic Slash command using the WordPress REST API as a backend. If you or your team are the only users that intend to use it, you can just set it up as a simple integration. However if you wish to distribute it for others to use you can package it into a Slack bot.

An advantage of building a Slack bot versus a slash command is the additional features of the Slack API you can leverage – in this example, the RTM (Real Time Messaging) API. That allows you to listen and respond to messages in real-time. I started out building this layer as a WordPress plugin so anyone could install the plugin and build a WP powered bot. Not only was that out of scope for a fun side project, Node is really the right tool for the job – asynchronous, great packages for the Slack API, easy to deploy and scale (because who doesn’t wan’t a Kramer bot).

Bot Slack RTM API
Kramer Bot using Slack RTM API

Continue reading Building A Slack Bot With Node.js And WordPress REST API

Slack Slash Command With WordPress REST API Backend

I’ve spent the last several weeks building Slack bots and other custom integrations. One of the simplest types of Slack integration to build is the Slash Command – which can be a way for a user to interact with a bot or to provide functionality to a team or channel. Slack provides built in commands (like /topic and /remind) or you can develop custom commands either through a Slack app or just a one off implementation.

Setting up a slash command is pretty easy, because all you need to provide is a RESTful endpoint that returns data to post to a channel.

Slack Slash Command
Hey Kramer bot slash command integration

Slack will do a POST or GET to your endpoint with either JSON or query string parameters giving you information about the command that was given.

Slash Command POST Data
Slash Command POST Data

And your endpoint can simply return a string to send back to the user who initiated the slash command. Or you can send back a formatted message which is essentially a JSON package with the message to send back and some options along with it.

Kramer Slack Bot

This is where WordPress and its REST API come in. This is also where WordPress starts to become a platform. I’m not designing a theme or even building a website with WordPress. I’m creating a RESTful API with a nice simple way for users to enter data. In less than 5 minutes you can have a fully functional API outputting JSON via RESTful URLs backed by an easy to use and extend CMS.

Out of the box you have access to all data in your WP backend with a simple URL schema…. ie ‘/posts’ get a paged list of posts, ‘/posts/{id}’ to get a specific post. Here is an example from the Seinfeld API I am developing for the Kramer bot. Notice the URL structure:

WordPress REST API JSON Output
WordPress REST API JSON Output

Great! But not so fast … Slack is expecting something specific back. Well thankfully the REST API is easily extendible. Below is an example plugin I created to show how easy it is to extend the WP REST API to provide Slack what it needs back. (here it is on Github

To extend WP REST API, I register a custom endpoint and define a callback function to execute when that URL is requested. In this instance we are expecting a GET request with query string parameters from Slack. It expects one of two commands: gif or image. Based on the command, it will query different categories of content on WP backend and return one random result to be posted in the Slack channel where the slash command was initiated.

Kramer Bot Responds To Slash Command

Next up – building out a full Slack bot on NodeJS with a WordPress backend…