Getting page views from google analytics via. xstl
Woah, i sure am making a lot of posts, sorry for that, just working on an imense project and the firm set a crazy deadline.
Anyway, i need to have a list of, say 5, articles (documents) that is the most viewed. I thought that it was so simple it wouldnt be a problem. But for some odd reason umbraco doesnt have anything standard to track pageviews.
so after some searching, ive found many posts regarding this, and the answer almost always pointed at Google Analytics. Which seems to be what im looking for, but none of the posts mentioned actually HOW you use it. I couldnt find any relevant help or information at the plug-ins page, neither official documentation, neither did any of the forum posts mention how to use it, just that you had to. I know GA has some sort of api, but i guess thats only accesible with C# or something, and at this time i wont get access to visual studio in a long time, worse yet until AFTER the deadline.
So how do i use GA with XSLT? It SOUNDS simple enough, but i cant find anything.
@Nigel: Really, really, really bad idea, updating a document for each page load (whether only a single page or any page), you'll be hitting the db quite frequently because you need to update a property, publish the document to have the data in the cache. Even worse, all caching you've built-in will be lost as all cached macro output is invalidated for each publish.
Haha, didn't mean to be soooo rude, apologies for that, I just wanted to make sure the OP didn't make the wrong decision and would complain about performance issues because of that choice.
Thank you for your reply, but my question was more HOW i use GA. As i can find zero documentation or examples of how i can get pageviews and use them, or just using any data from GA. All i get is "yes you can do it", but how?
Again, sorry for bumping, but it seems like someone has done this before, but i cant find any sort of documentation about it and its very important i get it working.
Thijs, as far as I can tell there isn't an XML API for Google Analytics, but it seems like you should be able to pull it off via their Javascript API. Check out the example called "Top Pages By Pageviews" here:
Getting page views from google analytics via. xstl
Woah, i sure am making a lot of posts, sorry for that, just working on an imense project and the firm set a crazy deadline.
Anyway, i need to have a list of, say 5, articles (documents) that is the most viewed. I thought that it was so simple it wouldnt be a problem. But for some odd reason umbraco doesnt have anything standard to track pageviews.
so after some searching, ive found many posts regarding this, and the answer almost always pointed at Google Analytics. Which seems to be what im looking for, but none of the posts mentioned actually HOW you use it.
I couldnt find any relevant help or information at the plug-ins page, neither official documentation, neither did any of the forum posts mention how to use it, just that you had to. I know GA has some sort of api, but i guess thats only accesible with C# or something, and at this time i wont get access to visual studio in a long time, worse yet until AFTER the deadline.
So how do i use GA with XSLT? It SOUNDS simple enough, but i cant find anything.
Sorry if this is a trivial question.
Hi there
An option might be:
Cheers
Nigel
@Nigel: Really, really, really bad idea, updating a document for each page load (whether only a single page or any page), you'll be hitting the db quite frequently because you need to update a property, publish the document to have the data in the cache. Even worse, all caching you've built-in will be lost as all cached macro output is invalidated for each publish.
@Frederik: Go with GA. Period!
Cheers,
/Dirk
Nigel thinks to himself "I think I have just been told off" as he crawls back under his rock...
;-)
Good point Dirk - hadn't thought through the consequences...
Haha, didn't mean to be soooo rude, apologies for that, I just wanted to make sure the OP didn't make the wrong decision and would complain about performance issues because of that choice.
Anyway, we all have our bad moments :D
Cheers and have a nice weekend
/Dirk
Thank you for your reply, but my question was more HOW i use GA. As i can find zero documentation or examples of how i can get pageviews and use them, or just using any data from GA. All i get is "yes you can do it", but how?
Sorry for bumping this, but i reall need some help with this.
Again, sorry for bumping, but it seems like someone has done this before, but i cant find any sort of documentation about it and its very important i get it working.
I need this also in my project. Did you ever got this working?
Thijs
Thijs, as far as I can tell there isn't an XML API for Google Analytics, but it seems like you should be able to pull it off via their Javascript API. Check out the example called "Top Pages By Pageviews" here:
http://code.google.com/apis/analytics/docs/gdata/gdataInteractiveSamples.html
is working on a reply...