Solved

RSS tracking?

Posted on 2007-03-20
3
322 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
listing all the respondents to a twitter feed - Java 5 49
PHP processing webform 25 45
Change background images after 5 seconds. 12 48
Can't Find The Code 15 22
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
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 …

710 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