Track views of rss feeds in newsreaders?

主宰稳场 提交于 2019-12-11 05:20:08

问题


Is there a way to track if a blog post has been viewed but not clicked on in a newsreader? For example, when I read through my rss feeds in Google Reader, I generally read the entire article in Google Reader so I never click on the link to the article and therefore it is not tracked in Google Analytics. We use feedburner to track rss clicks.


回答1:


No, it's not possible, unfortunately, because you can't embed the JavaScript needed to trigger the pageview into a newsfeed.




回答2:


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



来源:https://stackoverflow.com/questions/5117958/track-views-of-rss-feeds-in-newsreaders

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!