a:17:{s:9:"#provides";s:22:"dojox.analytics.Urchin";s:9:"#resource";s:19:"analytics/Urchin.js";s:22:"dojox.analytics.Urchin";a:7:{s:4:"type";s:8:"Function";s:7:"summary";s:153:"initialize this Urchin instance. Immediately starts the load sequence, so defer construction until (ideally) after onLoad and potentially widget parsing.";s:11:"description";s:835:"A small class object will allows for lazy-loading the Google Analytics API at any point during a page lifecycle. Most commonly, Google-Analytics is loaded via a synchronous script tag in the body, which causes `dojo.addOnLoad` to stall until the external API has been completely loaded. The Urchin helper will load the API on the fly, and provide a convenient API to use, wrapping Analytics for Ajaxy or single page applications. The class can be instantiated two ways: Programatically, by passing an `acct:` parameter, or via Markup / dojoType and defining a djConfig parameter `urchin:` IMPORTANT: This module will not work simultaneously with the core dojox.analytics package. If you need the ability to run Google Analytics AND your own local analytics system, you MUST include dojox.analytics._base BEFORE dojox.analytics.Urchin";s:8:"examples";a:3:{i:0;s:108:" // create the tracker programatically: var tracker = new dojox.analytics.Urchin({ acct:"UA-123456-7" });";i:1;s:194:" // define the urchin djConfig option: var djConfig = { urchin: "UA-123456-7" }; // and in markup:
// or code: new dojox.analytics.Urchin();";i:2;s:117:" // create and define all analytics with one tag. ";}s:10:"parameters";a:1:{s:4:"args";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:66:" this.tracker = null; dojo.mixin(this, args); this._loadGA();";s:9:"classlike";b:1;}s:27:"dojox.analytics.Urchin.acct";a:3:{s:9:"prototype";s:22:"dojox.analytics.Urchin";s:4:"type";s:6:"String";s:7:"summary";s:66:"your GA urchin tracker account number. Overrides `djConfig.urchin`";}s:35:"dojox.analytics.Urchin.loadInterval";a:3:{s:9:"prototype";s:22:"dojox.analytics.Urchin";s:4:"type";s:7:"Integer";s:7:"summary";s:62:"Time (in ms) to wait before checking for a ready Analytics API";}s:28:"dojox.analytics.Urchin.decay";a:3:{s:9:"prototype";s:22:"dojox.analytics.Urchin";s:4:"type";s:5:"Float";s:7:"summary";s:269:"Multipler for the interval loadInterval to ensure timer does not run amok in the event our _gat object is never defined. This is multiplied against the last `loadInterval` and added, causing the interval to continuosly become longer, until a `timeout` limit is reached.";}s:30:"dojox.analytics.Urchin.timeout";a:3:{s:9:"prototype";s:22:"dojox.analytics.Urchin";s:4:"type";s:7:"Integer";s:7:"summary";s:181:"Time (in ms) for the load interval to reach before giving up all together. Note: this isn't an overall time, this is the time of the interval being adjusted by the `decay` property.";}s:30:"dojox.analytics.Urchin._loadGA";a:5:{s:9:"prototype";s:22:"dojox.analytics.Urchin";s:4:"type";s:8:"Function";s:6:"source";s:272:" var gaHost = ("https:" == document.location.protocol) ? "https://ssl." : "http://www."; dojo.create('script', { src: gaHost + "google-analytics.com/ga.js" }, dojo.doc.getElementsByTagName("head")[0]); setTimeout(dojo.hitch(this, "_checkGA"), this.loadInterval);";s:7:"summary";s:52:"load the ga.js file and begin initialization process";s:7:"private";b:1;}s:31:"dojox.analytics.Urchin._checkGA";a:5:{s:9:"prototype";s:22:"dojox.analytics.Urchin";s:4:"type";s:8:"Function";s:6:"source";s:182:" if(this.loadInterval > this.timeout){ return; } setTimeout(dojo.hitch(this, !window["_gat"] ? "_checkGA" : "_gotGA"), this.loadInterval); this.loadInterval *= (this.decay + 1);";s:7:"summary";s:93:"sniff the global _gat variable Google defines and either check again or fire onLoad if ready.";s:7:"private";b:1;}s:29:"dojox.analytics.Urchin._gotGA";a:6:{s:9:"prototype";s:22:"dojox.analytics.Urchin";s:4:"type";s:8:"Function";s:6:"source";s:113:" this.tracker = _gat._getTracker(this.acct); this.tracker._initData(); this.GAonLoad.apply(this, arguments);";s:7:"summary";s:22:"initialize the tracker";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:13:"this.GAonLoad";}}s:7:"private";b:1;}s:31:"dojox.analytics.Urchin.GAonLoad";a:7:{s:9:"prototype";s:22:"dojox.analytics.Urchin";s:4:"type";s:8:"Function";s:6:"source";s:23:" this.trackPageView();";s:7:"summary";s:45:"Stub function to fire when urchin is complete";s:11:"description";s:206:"This function is executed when the tracker variable is complete and initialized. The initial trackPageView (with no arguments) is called here as well, so remeber to call manually if overloading this method.";s:8:"examples";a:1:{i:0;s:282:"Create an Urchin tracker that will track a specific page on init after page load (or parsing, if parseOnLoad is true) dojo.addOnLoad(function(){ new dojox.ananlytics.Urchin({ acct:"UA-12345-67", GAonLoad: function(){ this.trackPageView("/custom-page"); } }); });";}s:9:"classlike";b:1;}s:36:"dojox.analytics.Urchin.trackPageView";a:7:{s:9:"prototype";s:22:"dojox.analytics.Urchin";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"url";a:2:{s:4:"type";s:6:"string";s:7:"summary";s:82:"String A location to tell the tracker to track, eg: "/my-ajaxy-endpoint"";}}s:6:"source";s:53:" this.tracker._trackPageview.apply(this, arguments);";s:7:"summary";s:94:"A public API attached to this widget instance, allowing you Ajax-like notification of updates.";s:8:"examples";a:1:{i:0;s:292:"Track clicks from a container of anchors and populate a `ContentPane` // 'tracker' is our `Urchin` instance, pane is the `ContentPane` ref. dojo.connect(container, "onclick", function(e){ var ref = dojo.attr(e.target, "href"); tracker.trackPageView(ref); pane.attr("href", ref); });";}s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:27:"this.tracker._trackPageview";}}}s:30:"dojox.analytics.Urchin.tracker";a:2:{s:8:"instance";s:22:"dojox.analytics.Urchin";s:7:"summary";s:0:"";}s:15:"djConfig.urchin";a:1:{s:7:"summary";s:0:"";}s:4:"this";a:2:{s:6:"mixins";a:1:{s:6:"normal";a:1:{i:0;s:4:"args";}}s:7:"summary";s:0:"";}s:15:"dojox.analytics";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}