Changeset 924763
- Timestamp:
- 06/01/2014 05:14:35 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
boostsuite-tracking-code/trunk/BoostSuiteWP-tracking.php
r924041 r924763 15 15 /* 16 16 * Boostsuite Tracker JS widget 17 * @version 0.3 17 * CloudFront URL: http://dh05donu16isw.cloudfront.net/tracker/tracker.js 18 * @version 0.4 18 19 */ 19 20 20 (function(){ 21 21 /** … … 51 51 **/ 52 52 this.ready = function() { 53 if (isReady) return; 53 if (isReady) { 54 return; 55 } 54 56 55 57 isReady = true; … … 157 159 } 158 160 159 /* Tracking pixel*/161 /* Get any heading tests for this page */ 160 162 boost.onDocumentReady(function(){ 161 163 if (typeof _bsc == "undefined") { 162 164 _bsc = {}; 163 165 } 164 var imageUrl = boost.getBaseUrl() + "/widget/tracker/tracker.gif?url="+escape(window.location.toString())+"&referrer="+escape(document.referrer) + (_bsc.suffix ? "&"+_bsc.suffix : ""),165 img = document.createElement('img');166 167 img.src = imageUrl;168 img.width = 1;169 img.height = 1;170 img.onload = function(){171 document.getElementsByTagName("body")[0].removeChild(img);172 }173 img.onerror = img.onload;174 document.getElementsByTagName("body")[0].appendChild(img);175 });176 /* Heading test */177 boost.onDocumentReady(function(){178 166 headingScript = document.createElement("script"); 179 headingScript.src = boost.getBaseUrl() + "/widget/headings/get?url="+escape(window.location.toString()) ;167 headingScript.src = boost.getBaseUrl() + "/widget/headings/get?url="+escape(window.location.toString())+"&referrer="+escape(document.referrer) + (_bsc.suffix ? "&"+_bsc.suffix : ""); 180 168 document.getElementsByTagName("head")[0].appendChild(headingScript); 181 169 });
Note: See TracChangeset
for help on using the changeset viewer.