Solved

RSS tracking?

Posted on 2007-03-20
3
315 Views
Last Modified: 2013-11-18
How to track views and clicks on a RSS feed? Our feed is created using PHP and is running on our own server, but we are looking for a way to get some analytics on it. It's no option to use a solution like feedburner... We want to build something of our own or use a 3th party tool that we can plug in on the existing feed.
0
Comment
Question by:topevents
3 Comments
 
LVL 11

Expert Comment

by:JamesCssl
ID: 18757081
0
 

Author Comment

by:topevents
ID: 18757150
Javascript is no solution for RSS feeds... We don't want to track the actual subscription process, but the active users, clicks on items in RSS,...
0
 
LVL 8

Accepted Solution

by:
jawahar_prasad earned 500 total points
ID: 18757616
Its simple:

TRACKING IMPRESSIONS:

You can track which webpage is requesting your feed or you can track the number of Impressions your feed is receiving like this:

1. Assuming that your .php page generates the .XML feed.
2. In the PHP page that generates the XML feed example, generatefeed.php add the following code,

if INSTR(trim(Request.ServerVariables("HTTP_REFERER")),"")=false then
 set fs=Server.CreateObject("Scripting.FileSystemObject")
 set f=fs.OpenTextFile(Server.MapPath("RSSREFERER.txt"),8,true)
 f.WriteLine "Requested Page: " & Request.ServerVariables("HTTP_REFERER") & "Time: " & now()
 f.Close
 set f=Nothing
 set fs=Nothing
end if

With the above code you can track which page is requesting your feed and the time. The above code uses txt file, you can use database if you want.

TRACKING CLICKS:

Similarly to track clicks in the URL displayed in the feed, you should update the database count whenever the user visits that page through the feed by passing the tracking id in the URL querystring.

Example:

<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
 <channel>  <title>Ajax Tutorials</title>
  <link>http://www.expertsforge.com/rss-feeds/rss-feeds.asp</link>
  <description>This Feed brings you the Tutorials and Solutions found at Expertsforge.com for the category : Ajax</description>
  <pubDate>Tue, 20 Mar 2007 21:45:57 GMT</pubDate>
  <generator>Expertsforge.com XML Generator</generator>
  <copyright>Expertsforge.com</copyright>
  <managingEditor>contact@expertsforge.com</managingEditor>
  <webMaster>contact@expertsforge.com</webMaster>
 <item>
 <item>
  <title>Creating RSS Reader using AJAX with Code</title>
  <link>http://www.expertsforge.com/Web-Development/Tutorial-140.asp</link>
  <description>Ajax</description>
  <pubDate>Mon, 29 Jan 2007 14:06:43 GMT</pubDate>
  </item>
  </channel>
  </rss>

In the above feed, you can find the <link> item.... In that you must pass the tracking id which can be

<link>http://www.expertsforge.com/Web-Development/Tutorial-140.asp?from=feed</link>

In the above code a new tracking id(from=feed) is added,
so, in the Tutorial-140.asp page you can find if it is "from=feed" then update the database count corresponding to that feed.


THATS IT!!!!!!!!!!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Before we dive into the marketing strategies involved with creating an effective homepage, it’s crucial that EE members know what a homepage is. In essence, a homepage is the introductory, or default page, of a website that typically highlights the …
Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now