/** * Tags outbound, mailto, cross-domain, anchor, and download links for UTM in * anchor, form, and iframe tags. * * ****************************************************** * Usage * ****************************************************** * * var linkTagger = new _olt("ga.js/urchin.js", [pageTracker objects]); * * linkTagger Methods: * * getCodeVersion - Gets the UTM code version * * setDownloadExtensions("doc|docx|...") default: doc|docx|pdf|xls|ppt|zip|gz|bz2|rar|txt|vsd|vxd|js|css|exe|wma|mov|avi|wmv|mp3|mp4 * appendDownloadExtensions("pdf|xls|...") * * setVirtualDirectoryOutgoing("/outgoing/") default: /outgoing/ * setVirtualDirectoryDownloads("/downloads/") default: /downloads/ * setVirtualDirectoryMailto("/mailto/") default: /mailto/ * setAnchorQueryName("anchor") default: anchor * getVirtualDirectoryOutoing() * getVirtualDiectoryDownloads() * getVirtualDirectoryMailto() * getAnchorQueryName() * * setTagDownloads(true/false) * setTagMailto(true/false) * setTagOutbound(true/false) * setTagAnchors(true/false) * * setOutboundExcludeDomains("mysite.com|yoursite.com|...") NOTES: no www. set to "" to exclude none * setCrossDomains("mysite.com|yoursite.com|...") NOTES: no www. set to "" to NOT automatically link cross-domains * * setTestMode(true/false) - Shows an alert box instead of making an actual urchinTracker or trackPageview call * * tag() * * ****************************************************** * Static Methods * ****************************************************** * hash2Query(queryName) - Converts a hash in the URL to a query parameter with name queryName * getHashInURL() - Gets the index location of the hash in the URL. -1 if none exists. * * ****************************************************** * Cross Domain Tracking with Forms * ****************************************************** * 1. Insert the following JavaScript BEFORE any code in the form's onsubmit event: createLinkerUrl(this); * 2. Insert the following JavaScript AT THE END of the form's onsubmit event: return formLinker(this); * * For example, if the form looked like this: