Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

jQuery Omniture plugin: Allows developers to conveniently add Omniture tracking to their sites.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 css
Octocat-spinner-32 js
Octocat-spinner-32 tests
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 about.html
Octocat-spinner-32 index.html
Octocat-spinner-32 register.html
README.md

jQuery Omniture Plugin

Provides a convenient way for developers to add SiteCatalyst/Omniture tracking to pages and DOM elements.

jQuery Omniture Plugin API

omniture.view()

Provides the capability to apply pageview metrics to a particular route. This is a facade for s.t().

  • { String } route - A human readable string representing the location you want tracked. This is a string but gets transformed into a regex.
  • { Function } callback - The callback you want executed that returns the metrics properties and sends them off to SiteCatalyst (Omniture).

omniture.link()

Provides the capability to execute pseudo synchronous requests (img) to Omniture. This is a facade for s.tl().

  • { String | DOM Element } element - The targeted node you want to listen to. eg/ $("button") or "#btn-register"
  • { String } event - The event you want to listen to on a particular node. eg/ "click", "hover", "mouseup", "keydown"
  • { Function} callback - The callback you want executed that returns the metrics properties and sends them off to SiteCatalyst (Omniture).

Tutorial and Example Code

$(document).ready(function() {
    var config = {
      pageName: "DunderMifflin:Home"
    };

    var omniture = $(document).Omniture(config);

    //sinatra-style + express-style routing!

    omniture.view("index.html", function() {
      return { pageName: "DunderMifflin:Home", eVar1: "This is eVar1",eVar2: "This is eVar2" };
    });
    omniture.view("about", function() {
      return { pageName: "DunderMifflin:About", eVar1: "This is eVar1",eVar2: "This is eVar2" };
    });
    omniture.view("register", function() {
      return { pageName: "DunderMifflin:Register", eVar1: "This is eVar1",eVar2: "This is eVar2" };
    });

    omniture.link($("a"), "click", function(element) {
      return { event2: "login", prop3: element.attr('title'), eVar4: "evar4" };
    });
});

MIT Licence

jQuery Omniture Plugin

Copyright (c) 2013 Jaime Bueza

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Something went wrong with that request. Please try again.