Top Keywords — Yahoo! Pipes
In my last post, I described a way to extract data from Google Analytics into an XML document for consumption by Yahoo! Pipes. Now I’d like to take this to it’s logical conclusion and create an RSS feed from this XML document.
1) XML Attachment from Google Groups
This is the module that takes an XML attachment from Google Groups. I created it in the previous post. This is another thing I love about Pipes. You can create a custom pipe, wrap it up, and use it in other pipes. It’s a great way to practice the art of DRY (Don’t Repeat Yourself). Every time you see you’re doing something more than once, just create a separate pipe for it for the process and use it over and over again. But, I digress. The output of the “XML Attachment” process is a data feed containing whatever information is in the last XML document in your Google Groups thread.

2) Fetch Data Loop
I’m going to take this attachment and go straight to the list of keywords. It’s down a couple of levels in the XML document as you can see when I put “Report.Table.Row” in the “Path to item list.” Here’s a little better picture of the data I’ll be getting:

This process returns a list of the rows in the XML attachment.

3) Sub-element
There’s a lot of extraneous data that comes along with the keyword. I’m going to ignore it and just grab the keyword. It happens to be tagged as “PrimaryKey” in the feed:
After this process runs, I’ll have a list of only the keywords.

4) String Builder Loop
The sub-element process outputs the keyword with the key “item.content.” This isn’t correctly formatted for RSS readers so I’m going to change item.content to item.title. RSS readers should be able to pick up the feed now.

There you go, an RSS feed of the top keywords that result in traffic to your site.
Leave a Reply