pwnall / pwnalytics_js Goto Github PK
View Code? Open in Web Editor NEWOpen-source Web analytics
License: MIT License
Open-source Web analytics
License: MIT License
Pwnalytics is an open-source Web analytics solution. This project contains the two JavaScript pieces loaded by Website users. REQUIREMENTS The Pwnalytics JS has been tested and works against the following browsers: * Chromium / Google Chrome 6.0+ * Firefox 3.6+ * Mobile Safari in iOS 3+ * Internet Explorer 6+ Patches for extending compatibility are always welcome. USAGE The deployment process is heavily inspired from Google Analytics. Tracked pages should include the script in bin/insert.min.js in a <script type="text/javascript"> tag at the end of their <head> tag. Find/replace the following strings: * AA123456 -- the property ID * bin/p.min.js -- a URL that serves the main JS file at bin/p.min.js The analytics server should serve bin/p.min.js, after find-replacing the following: * bin/p.gif -- URL that receives GETs with analytics data The analytics server should serve bin/p.gif in response to analytics data GETs, to keep browsers happy. The analytic data GETs parameters follow these conventions: * __ is the event name ('page' is a pageview, everything else is user-defined) * Params that start with __ are session parameters ** __pid is the property ID ** __uid is a user ID that persists across visits from the same browser * All other params are user-defined. The client-side JavaScript is provided the following API for posting analytics data to the server. * _paq.push('eventName') sends an event with nothing but a name * _paq.push(['eventname', {param: 'value'}]) sends an event with metadata * _paq.push(function() { ... }) calls a function after Pwnalytics is loaded * _paq.push({property: 'value'}) sets a session property * _paq.length counts events posted by _paq.push but not processed by the server After Pwnalytics is loaded, _paq is extended with a few more features. These should always be used in a function passed to _paq.push, to ensure that Pwnalytics has loaded. * _paq.reset() resets the session; the user UID will change as a consequence BUILDING Pwnalytics requires RubyGems, Jasmine, and Juicer with the YUI Compressor and JSLint extensions. Once dependencies are installed, the following command will build and test both the development and production versions of the library. rake The dependencies can be downloaded from the following locations: * RubyGems -- http://rubygems.org/ * Jasmine -- gem install jasmine * Juicer -- gem install juicer * Juicer extensions -- juicer install jslint; juicer install yui_compressor TESTING Testing is fully automated using Jasmine. All patches should add tests for the changed functionality in the spec/ directory. For maximum iterating speed, keep a Jasmine testing server running. 1. Start the server by running rake jasmine 2. Make some changes to the source code, then rebuild rake build 3. Load or refresh http://localhost:8888 in your browser.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.