GithubHelp home page GithubHelp logo

knowit / federales Goto Github PK

View Code? Open in Web Editor NEW

This project forked from edmellum/federales

0.0 10.0 0.0 86 KB

Google Analytics helpers to hunt down and track links that aren't automatically tracked by Google Analytics.

License: MIT License

JavaScript 100.00%

federales's Introduction

Federales

Google Analytics helpers to hunt down and track links that aren't automatically tracked by Google Analytics.

Development of this project has been sponsored by Knowit

Installation

Include jQuery and federales.js in your site.

Examples

// Track elements with a specific selector providing a label.
track('Thing', 'Special thing', '.special', 'Some value');

// Leave out label to get one automatically depending on element type.
track('Thing', 'E-mail', '.email');

// Curry if tracking a bunch of similar things.
var trackThings = track.bind(track, 'Things');
trackThings('subthing', '.thing', 'Value');

Methods

track('Thing', 'Special thing', '.special', 'Some value');

track(prefix, category, selector, [label])

Track all elements matching selector sending prefix and category to Google Analytics as a category in the format prefix - category. If label isn't supplied one will be taken from the element based on the type IE mailto links will have the target email address as a label.

Todo

  • Docs for label generating
  • Tests
  • Automatic link discovery

License

Copyright 2012 Knowit

MIT

federales's People

Contributors

edmellum avatar

Watchers

Tobias K Torrissen avatar Knut Martin Tornes avatar James Cloos avatar Vidar Waagbø avatar Ernst W. Hosmann avatar Flemming Lauritzen avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.