Skip to content

Simple javascript file for adding Google Analytics to a site. Includes download, external link and email event tracking.

Notifications You must be signed in to change notification settings

open-city/google-analytics-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Google Analytics Library

Simple javascript file for adding Google Analytics to a site.

Features

  • one javascript file for all Google Analytics tracking code

  • download, email and external link event tracking

Dependencies

Setup

  1. 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)

  2. Replace ‘UA-xxxxxxxx-1’ in analytics_lib.js with your Google Analytics tracking code

  3. 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>

More detail needed?

Contact me via email! Derek Eder derek.eder@opencityapps.org

Errors / Bugs

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

Note on Patches/Pull Requests

  • 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

About

Simple javascript file for adding Google Analytics to a site. Includes download, external link and email event tracking.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages