How to design analytics solution (Django stack) - javascript

I need to add analytics feature to our web service so we can provide our customers a way to understand their own content. I was wondering if anybody can provide some pointers, guidelines on designing such solutions. I know this is a little too open-end. Here is a list of concrete questions, and I have a vague idea on some of them but I would like to see more references or best practices:
How to organize the database for analytics data so it won't hurt site performance and scalability?
How to implement the tracking code? JavaScript?
We allow people to embed the content in other web sites, using iframe. How do we track web analytics for that? For example, how to we track the traffic source?
How do we track the "mentioning" on social media? Like, somebody blogged about a piece of content, or twittered/facebook'ed the content.
Thanks!

Are you absolutely sure you want to build your own analytics rather than use Google Analytics?
If you want to mash up the data to add value for your clients, you can use the Analytics Data Export API -- that way, your time is spent on that end of the deal, rather than reinventing the analytics wheel

Related

How Do I Do Analytics on a Website That Has Rasters, Not the Normal DOM Elements

I want to be able to use Google Analytics to analyze an educational/mathematical gaming site that uses rasters for graphics.  I am trying to figure out what technology they are using.  I don't know how to see the source code.  It almost looks like Flash, but its not flash.  Can someone give me some guidance as to how I can start doing analytics on a site that uses rasters and not the normal DOM elements.  Does that make sense?
 The website is m.polyup.com

How would you access the users history using javascript as seen on other websites?

How would you access the users history using javascript as seen on other websites?
I am trying to access user history and view it to help me with search engine optimization. I want to see what users view before an after visiting my site. Is this possible or can it not be done just with javsascript? Any positive help would be appreciated. I know others have tried asking this question but no answer was helpful. I know there is a function that makes this possible called window.history!
The only thing you can use is
document.referrer
Which will only return the URL of the previously visited page.
EDIT: I also might add that Google Analytics is generally used for this type of stuff, and will allow you to view what keywords are searched to get to your page.
It's not possible to grab the history using JS. You can use window.history to navigate forwards/backwards in history (or push a different state to it) but you're not able to grab all the pages previously visited.
You can also use document.referrer to grab the website that linked to your site. This is used for analytics and such but cannot do what you're asking.
This is not possible using JS. If you're thinking about doing something like what the big websites (facebook, google, etc.) do to target ads to you, they are using tracking cookies and mining all sorts of data from what you do on their websites (some of which is pretty creepy).

Sharing google chrome extension information across users

My problem is simple : I would like to do some statistics on a website my friends and I visit.
So I would like to find a way to connect each instance of my info-gathering google chrome extension in order to gather them in a common place for analysis.
As a first thougt, one ideal solution would be to get read-write access to a shared google drive spreadsheet, but I am open to other solutions.
Is it feasible ? Can anyone point me to the good direction ?
Thanks a lot
A spreadsheet is easy and works well for few users and rows, however the easiest way is to use google analytics, extensions support them and there are samples for custom events.
If you go the spreadsheet route use appendrow to avoid concurrency issues.
You would need to use oauth for spreadsheet access or set sharing to public write.
For a more sophisticated solution with total control of the data and scalability use Google bigquery.

Does google analytics slow down my website? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I am at the final stages of my website, and currently I need to find a suitable statistics application/tool.
I have looked into webalizer, but it seems outdated.
Also, I have looked into Google analytics, but I am afraid that if I implement it, my website will go slow. It is already pretty heavy with database material being displayed which is dynamic btw.
I have read I can put the GA js code at the bottom of the page and thus the page will load first, but I still don't want a slow down.
You are all much more experienced in statistics than I am, so I believe you can give me some good advice.
I have my own private server (Linux) and I have root access as well (offcourse).
Do you think I should have a statistics app on the server, without interferring with my website, or should I go the Google way and use analytics?
Please give me good application names which you have tested etc...
Thanks
Any additional calls to scripts will slow down your site. However, Google Analytics instructs you to place it in a specific place so that it isn't loaded until the page has loaded. (It used to be before the </body> tag but I believe it's now supposed to be the last <script> in the <head> tag.) Don't worry about it too much; the benefits of analytics will far outweigh the extra call to a remote file.
Focus on other optimizations (database queries, CSS sprites, fewer HTTP requests). Analytics is necessary in today's site market and is indispensable; IMO it is not an option to forgo it.
As far as having your own "statistics app," I assume you're talking about building your own proprietary statistics codebase? I would discourage that, because it takes a lot of time and effort and in the end you will not have the same optimizations that Google has employed an entire project's worth of software engineers to make. Remember that while it's always great to create your own product, you don't have to reinvent the wheel, especially when it comes to things like this that have many sensible drop-in solutions that are widely available for free.
With respect to non-Google analytics solutions, one other of note is Clicky. I'm not as experienced with it as I am with GA, but I've heard many reviews that it is more precise and more informative than GA. However, just as an end-user browsing the web I've noticed a lot of times that its calls to Clicky's website do tend to slow down pages, and noticeably so; I cannot really say that I have seen the same effect with GA.
One last thing I would caution against is this: Do not employ more than one analytics solution unless you are trying to find the best one to suit your needs. It's just overkill to run two remotely-hosted analytics solutions on every single one of your pages, so what I would encourage you to do is try out a few for the first few weeks or so of your site (yes, pages will slow down during this trial phase) and then simply stick with the one that you like best. That will also give you the added benefit of being able to see first-hand what the speed implications are on your unique hosting environment for each script.
Here's some other analytics solutions that you might check out:
Piwik
Webtrends
GoingUp!
Yahoo! Web Analytics
Straight from Google's analytic sign up page (https://www.google.com/analytics/provision/)
"The appearance of your website will never be affected by your use of Google Analytics - we don't place any images or text on your pages. Likewise, the performance of your pages won't be impacted, with the possible exception of the very first page-load after you have added the tracking code. This first pageview calls the JavaScript on Google's servers, which may take slightly longer than a regular page load. Subsequent pageviews will use cached data and will not be affected."
Use the Asynchronous Snippet of Analytics:
http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html
People focus to much on total load times when what is important is render times and in particular progressive rendering. If you use Google Analytics properly, it will load after the page has shown to the user. So yes, it will add a small overhead to every request but because the user can see the page already they probably won't even notice. Just go for it.
Webalizer runs on server side after apache logs doesn't it? That's why it appears outdated, it can't collect as much info as JS can. But it doesn't slow the user down any. You could run Webalizer and Google together for a bit and see what serves your needs best.
We decided to work around the possibility of google's servers appearing to slow our site down. Instead of our users downloading the ga.js file from google's servers we store it locally. The only problem with that approach is that our local copy becomes outdated. So we wrote an application that periodically compares our local file to google's and updates our file accordingly.
Andrew
Google Analytics is javascript based and does not tun on your server. All processing and storage is done on Google servers, so it's ideal if you are worrying about local resources.

JavaScript to gather visitor information/stats

I am looking for a piece of code, or even a list of all browsers' properties JavaScript can access so I can prepare my own stats system.
I'm not looking for anything that server-side parser can get (e.g. Agent, referrer, etc.).
I am not interested in external solutions like Google Analytics.
The reason for this is that I want to run it within company's Intranet and I require it to be internal solution.
Updated Answer...
You can run Google Analytics on your intranet too: http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55510
Original Answer...
Have you considered using Google Analytics?
It's got an impressive list of features, and even a Narrated Tour.
"Installation" is simple. Just copy/paste a small block of javascript into your website template.
(source: sizlopedia.com)
I believe I've found a solution:
Piwik
It looks very, very promising...
For Intranets, you might find some benefit in AwStats, or a similar application.
Piwik
Unica NetTracker (Online Demo)
Affinium NetInSight (Flash Demo | Online Demo)
AwStats
Webalizer

Categories