Simple javascript file for adding Google Analytics to a site.
-
one javascript file for all Google Analytics tracking code
-
download, email and external link event tracking
-
Google Analytics
-
jQuery hashchange by Ben Alman (benalman.com/projects/jquery-hashchange-plugin/)
-
Create a Google Analytics account for your site (here’s a good tutorial: support.google.com/analytics/bin/answer.py?hl=en&answer=1008015&topic=1726909&ctx=topic)
-
Replace ‘UA-xxxxxxxx-1’ in analytics_lib.js with your Google Analytics tracking code
-
Link to the file from your page
<script type="text/javascript" src="javascripts/jquery.js"></script> <script type="text/javascript" src="javascripts/jquery.ba-hashchange.js"></script> <script type="text/javascript" src="javascripts/analytics_lib.js"></script>
Contact me via email! Derek Eder derek.eder@opencityapps.org
If something is not behaving intuitively, it is a bug, and should be reported. Report it here: github.com/open-city/google-analytics-lib/issues
-
Fork the project.
-
Make your feature addition or bug fix.
-
Commit, do not mess with rakefile, version, or history.
-
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
-
-
Send me a pull request. Bonus points for topic branches.
Copyright © 2012 Nick Rougeux and Derek Eder of Open City. Released under the MIT License.
See LICENSE for details github.com/open-city/google-analytics-lib/wiki/License