jQuery plug-in to provide custom analytics. For those of us who can not use Google Analytics at work or just want to dork with something else.

Bryan Allred c05a55ce00 Merge pull request #5 from bmallred/master 11 年之前
.gitignore ad96b2cb6d Added example 11 年之前
MIT.license d790cf03f0 updated license 11 年之前
README.md b30001ffbf updated readme to mirror gh-pages 11 年之前
example.html 2bf5105f62 Updated exclusion to work with nested levels 11 年之前
jquery-analytics.js d790cf03f0 updated license 11 年之前
jquery-analytics.min.js e855e8416d refreshed minified file 11 年之前
minify.sh 2bf5105f62 Updated exclusion to work with nested levels 11 年之前

README.md

jquery-analytics

Description

jQuery plug-in to provide custom analytics. For those of us who can not use Google Analytics at work or just want to dork with something else.

Easy to use

With just a few lines of code you can easily configure your own web page analytics. Just specify the URI you would like to communicate with and everything is a go.

$(function () {
	$(".trace").analytics({
		url: "http://localhost/trace"
	});
});

Custom tags supported out-of-the-box

Often you want to track more meaningful information instead of just page hits. Simply apply any number of custom attributes prefixed with data-analytics- and we will take care of the rest!

<a id="myLink" href="#" data-analytics-outfit="pajamas" data-analytics-shoes="slippers">My link</a>

This will send the following information back:

{
	id: "myLink",
	outfit: "pajamas",
	shoes: "slippers"
}

Determining the flow

It is also possible to track the flow of users while they visit your site by specifying their unique identifier. This can be done during initialization like so:

$(function () {
    $(".trace").analytics({
        url: "http://localhost/trace",
        client: "unique identifier"
    });
});