Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Registers a click handler for all mailto links on the page and fires
- * an Infinity Tracking custom trigger when clicked
- * We use 'live' for mailto links loaded after the DOM is ready
- * @author Chris Sedlmayr <chris.sedlmayr@infinity-tracking.com>
- */
- // copy of initialise the infinity var
- var _ictt = _ictt || [];
- $(document).ready(function() {
- // find 'a' elements that have an href starting with mailto:
- $('a[href^="mailto:"]').live('click', function() {
- // ensure the infinity variable is available
- if (typeof _ictt != 'undefined') {
- // track this, using the mailto location as the title
- _ictt.push([
- '_customTrigger',
- 'MAILTOCLICK',
- {
- 't':this.href.replace(/^mailto\:/i, '')
- }
- ]);
- };
- });
- });
Add Comment
Please, Sign In to add comment