How to track RSS feed useage / views? - rss

What's the best way to track how many times items in your RSS have been accessed?

Assuming your RSS is served from a webserver, the server logs would be the obvious place to gather statistics from. There are numerous packages for parsing and interpreting webserver logs.
AWStats is a popular (free) package, and Wikipedia keeps a fairly comprehensive list.

If you serve your feeds through something like FeedBurner then you can also get stats from there including clicks

You could use Google Analytics, but you would need a service to make the correct requests to the Google Analytics API or redirect to it. There are two APIs you can use:
the __utm.gif "API"
the Measurement Protocol API
To use the later (you need Universal Analytics), which is way better in my opinion, you would need to make a request or redirect to something like:
http://www.google-analytics.com/collect?z=<randomnumber>&t=pageview&dh=<domainname>&cid=<unique-client-uuid>&tid=<propertyid>&v=1dp=<path>
Where:
<randomnumber> is a random number to avoid caches (especially if you do redirects)
<domainname> is the domain name you see in your tracking code
<propertyid> is the property id you see in your tracking code (eg: UA-123456)
<path> is the path to the page you want to register the pageview for. Note that it must be quoted. Eg, for /path/to/page you would need to send %2Fpath%2Fto%2Fpage
I've implemented a simple redirector service that does exactly that here (explained at length here)
If you're stuck with the Classic Analytics then you would need to use nojsstats or the older implementation

Related

How can I use Google Analytics without its gtag.js library

I am having some pages where I need to track page views and get data for reports. So I need to use some tracking events without using gtag.js.
I have tried solutions like GIF Request Parameters
But this solution was there in ga.js and its a legacy
The format used in your linked documentation is deprecated since Google introduced Universal Analytics in 2012.
However the current solution to send requests to Googke Analytics without a library, the Measurement Protocol, works broadly the same way. You have an endpoint (google-analytics.com/collect) and add the necessary parameters as described in the reference, depending on what kind of interaction you want to track. The endpoint returns a 200 http status and a gif (no matter if the request has actually been logged in analytics, this just confirms that you actually hit the server).

Can you implement google analytics with no domain binding?

We have a web service which is installed on different stations. Each has a different ip and domain. we want all of them to report to the same suite.
Can this be done?
The JavaScript tracker for Google Analytics can be used if you allow calls to the Google Servers, if you allow your clients to execute JS and either can set cookies or provide a client id in some other way (must not be personally identifiable data).
If you cannot use Javascript then you could still collect data via the measurement protocol, although this might require substantial development effort.
The domain setting in the Google Analytics interface does not affect data collection, it is used in the (soon to be removed) in-page analytics feature and as base url for the "open document" feature in the behavior reports.
Google Analytics does not collect by domain, but by property ID (UA-XXXXXXX-X), else cross-domain tracking would not be possible (it is actually a documented feature).
Cross domain tracking would be important if somebody could hop from one of your stations/domains to the other and you wanted this to be tracked as a single session. This does not seem to be your use case.
The only pitfall is that the reports display page paths, not full URIs. So if you have similar paths on all your stations the metrics for the page paths will be lumped together unless you do a breakdown by hostname. A common workaround is to add a filter to your data view that prepends the hostname to the path, or to provide custom paths in the first place.
But basically this is not a problem. If you do not need cross domain tracking you'll be okay if you dump the same tracking code in all your sites.

Can Google Analytics distinguish multiples requests using methods such POST, PUT, DELETE on a single URL?

I'm working on a web application that uses node.js + express. Our team has decided that all related pages must use a single URL and be distinguished only by its method.
So, for example: we have a group edition page. GET /groups gets the html, which includes the edition form, and POST /groups saves the changes.
The issue is that I only desire to track the POST /groups request. However, on the Google Analytics configurations, I only found URL-related tracking, nothing about specific HTTP methods.
Can this be done?
If you have implemented GA via the standard client-side tracking code then no, GA will not be aware of the http method (JavaScript has no access to http headers). It should however be trivial to render a Javascript if condition into the code depending on the request method.

How can I create a tracking JavaScript code like google analytics based on Javascript?

all I am trying to create Google Analytic clone. I know how to get information about the browser location IP and other similar things in PHP
What I want to know is how to create a java-script which sends this information from any website where my code is placed on my server ???
What is the minimum security requirement to create a tracking JavaScript code like google analytics?
redirect users to different pages based on session data in PHP?
Or in other words, do I have to send an ajax request to my server?
Is there any available solution already available subject to java-script?
Most analytics tools generate a url with query string parameters attached to it and then output a 1x1 image pixel, with the img src as the url. Your server would then receive and store the data. The only thing returned is the actual 1x1 pixel. This is the common method because in the event a site does not have js enabled, you wrap a hardcoded img to your server in noscript tags and still get basic info like page view.
But is there a reason why you are wanting to build your own analytics script instead of use an existing one? There are a number of 3rd party ones available, including free ones. Alternatively there is Piwik, which is a free and open source solution if you want to build off it and not have to start from scratch.

Google Analytics question, how do I know the number of my own visits?

I have a web app that I deployed in AppHarbor with Google Analytics. Development is still ongoing and I test it very often live to checkout for example stuffs I did with the CSS, etc.
Everything is working fine but I'd like to know how many times I am accessing the website apart from the rest of the visitors who visits it. When checking the reports in Google Analytics it only shows me the ISPs of the visitors. I'll need something more drilled down like an IP address, but this seems to go against Google Analytic's policy and I do not know if this is even possible still.
Like right now I have 72 visits. But I have been testing so a lot of those could just be me. Would be good to know the actual visitor count.
I know this is probably a little late but you can set a filter to ingore your own traffic from reports. Here is how you do it.
In addition for adding a deprecated variable and using filters, you can build the code so that it only prints the tracking code if e.g. an identifier cookie is not found. Other common option is a URL parameter.
You can then set this cookie for your browser and be excluded from traffic.

Resources