Will Critchlow recently did a post detailing how to create a tool with Google Alerts, App Engine, and a bit of Python to help discover some new link opportunities.Β I wanted to follow up with another way to achieve almost the same thing, but in a different way that’s a little bit easier.Β It involves Yahoo Pipes, an incredibly awesome tool that you can use to identify new link opportunities as well as many other things.Β The end result will be a Yahoo Pipe that shows the number of links from each item in a specified Google Alert (in this case one for βSEOmozβ).Β Β
What Iβm about to do is show how to create a custom rss feed that shows web sites that mention SEOmoz (or any keywords), but do not link to seomoz.org (or your site).Β You can easily clone this Yahoo Pipe, replace the Google Alert with an alert for your brand and update the regex expression with your domain name. If you’re not familiar with Yahoo Pipes, it is a feed aggregator that allows you to manipulate content from around the web.
Before we begin, make sure to save your pipe each step of the way. As cool as Yahoo Pipes is, it is kind of buggy and you will lose some work along the way. Β Go to http://pipes.yahoo.com/pipes/ and click βCreate a Pipeβ.Β This will bring you to the pipe development area: Β
Start by dragging a source from the left navbar to the grid. In this case we are going to use the source βFetch Feedβ, so drag it to the grid.Β I am using the same Google Alert rss feed Will used for his tool: http://www.google.com/alerts/feeds/02091889458087148316/10137124638087203861 for the url field. Β Β
Next, I need to loop through each item in the alert and check to see how many (if any) links to SEOmoz are present. I need two loops to accomplish this: one to create the YQL statement and the other to execute it. In the first loop I use the String Builder inside the loop to create the YQL.Β Drag the String Builder to the inside of the loop. Β
The string is broken down into three parts.
- select * from html where url=”
- item.link (this is the actual variable containing the url of the site in the Google Alert)
- ” and xpath=”//a[starts-with(@href,’https://moz.com’)]” Β
This will build the string to match the exact YQL Will created in his post: Β
select * from html where url=”
Assign the results to a new variable, item.yql for this purpose. Now create another loop where we can call the YQL for each item in the alert. Connect the loops and select item.yql in the YQL popup window. Β
Assign all results of this loop to a new variable. I used item.yql.yql. Make sure to check the βDiagnostics and Resultsβ radio button in the YQL query to get the variable containing the count for the number of links. Β
It would be nice to have each itemβs title tell me directly how many links are present, so I need to overwrite the item title in another loop. The result will look like this:
Insert the String Builder in your 3rd loop and start adding the parts to the string:
- item.yql.yql.0.count (the variable containing the number of links returned from the YQL query)
- Links Found @ (note: begin and end with a space or the sting will run together.
- item.link (the variable containing the url of an item in the alert) Β
Assign the string to the item (item.title). Lastly, sort the items in the feed by number of links in ascending order so that the sites without any links come up first:Β Β
Now you can save the pipe and run it! Β Β Β Β Β Β Β Β Β
You can then subscribe to the feed and add it to your feed reader.Β You can clone the feed and replace the SEOmoz alert with your siteβs alert as well as edit the YQL to include your URL in the xpath statement.Β To make it even easier, I created a similar feed that uses user inputs for the Google Alert URL and your domain name to check to see if the link is present, check it out. Β Β Β Β
Β
James Charlesworth is the Senior SEO Specialist for NeboWeb, an interactive marketing and web design company in Atlanta, Ga.