/** * Arrowtracker * * @copyright (c) 2010 ArrowMedia * @version 0.3 */ var arrowtracker = { gc: null, ga_source: null, ga_campaign: null, ga_medium: null, ga_term: null, ga_content: null, ga_gclid: null, // Custom referers referrers: [], // Custom sources sources: [], token: null, error: false, useInterval: false, intervalTime: 100, intervalObj: null, language: 'ru', translations: { ru: { YD: 'Вы пришли к нам из Яндекс.Директа.', YO: 'Вы пришли к нам с Яндекса.', GA: 'Вы пришли к нам по объявлению в Google AdWords.', GO: 'Вы пришли к нам с Гугла.', MO: 'Вы пришли к нам с Mail.ru.', RO: 'Вы пришли к нам с Рамблера.', BG: 'Вы пришли к нам из контекстной сети Бегуна.', BN: 'Вы пришли к нам из контекстной сети Бегуна.', OO: 'Вы пришли к нам с поисковика.', OT: 'Вы пришли к нам по ссылке с другого сайта.', TI: 'Вы набрали адрес нашего сайта прямо в адресной строке браузера или пришли с закладок.' } }, /** * Initialization * * @return void */ init: function(){ if (true == this.useInterval) { /** * @todo Replace object name */ this.intervalObj = setInterval("arrowtracker.process()", this.intervalTime); return; } this.process(); }, /** * Parse GA cookies * * @return void */ process: function() { if (null != this.intervalObj) { clearInterval(this.intervalObj); } var z = this._uGC(document.cookie, '__utmz=', ';'); this.ga_gclid = this._uGC(z, 'utmgclid=', '|'); this.ga_source = this._uGC(z, 'utmcsr=', '|'); this.ga_campaign = this._uGC(z, 'utmccn=', '|'); this.ga_medium = this._uGC(z, 'utmcmd=', '|'); this.ga_term = this._uGC(z, 'utmctr=', '|'); this.ga_content = this._uGC(z, 'utmcct=', '|'); if (this.ga_gclid != "-") { this.ga_source = 'google'; this.ga_medium = 'cpc'; } // Custom sources for(i=0;i -1) { i2=l.indexOf(s,i); if (i2 < 0) { i2=l.length; } c=l.substring((i+i3),i2); } return c; } }; /* playback timings (ms): LoadShardBlock: 277.92 (3) esindex: 0.012 captures_list: 301.114 CDXLines.iter: 12.033 (3) PetaboxLoader3.datanode: 103.188 (4) exclusion.robots: 0.473 exclusion.robots.policy: 0.448 RedisCDXSource: 7.181 PetaboxLoader3.resolve: 181.878 (3) load_resource: 43.551 */