Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Live Monitor Tracker 1 pixel image

Vote:
 

Live monitor is switched on but causing design layout issue as it is always rendered after body tag.

 

The JavaScript is not possible to change as it’s in a compiled dll.

<script type="text/javascript">

void(function(){var tUrl = "/TrackerHandler.ashx?pageId=4&languageId=en-GB";tUrl += (tUrl.indexOf("?") > 0 ? "&" : "?") + "r=" + Math.random(); tUrl += "&referrer=" + escape(document.referrer);document.write("<img src='" + tUrl + "' alt='' width='1' height='1'/>");  }());

</script>

This will then render the following example mark-up

<body>
<img width="1" height="1" alt="" src="/TrackerHandler.ashx?pageId=4&languageId=en-GB&r=0.9895143173015609&referrer=http%3A//local.site.co.uk/etc/etc">

 

I really need a class on the image tag or something else, I could write some custom JavaScript to look for body > image and src attribute with /TrackerHandler but this would be an expensive DOM request.

Does anyone know another solution or away to position elsewhere?

 

#69131
Mar 22, 2013 11:30
Vote:
 

I'm having the same issue with this. Has anyone figured out a workaround or a way to modify this?

#70009
Apr 11, 2013 0:14
Vote:
 

You can hide via jQuery, this is what I have coded for now.

jQuery(document).ready(function () {
jQuery.fn.exists = function () { return this.length > 0; };
attachEvents();
});

// Attach events to DOM
function attachEvents() {
hideTrackerHandler();
}

// Hide Tracker Handler
function hideTrackerHandler() {
var trackerHandler = jQuery('body img:first');
if (trackerHandler.exists()) {
if (/TrackerHandler.ashx/i.test(trackerHandler.attr('src')))
{
trackerHandler.hide();
}
}
}

#70041
Apr 11, 2013 10:32
Vote:
 

I think it should be possible to solve using pure CSS, something like this:

img[src*="TrackerHandler.ashx"]  
{
    width: 0px; 
    height: 0px;
}

    

#70060
Apr 11, 2013 11:05
Vote:
 

In my opinion, using a CSS declaration is currently the best workaround.

For my case, I needed to use this in order for it to not show:

img[src*="TrackerHandler.ashx"]
{ 
    display: none; 
}

I did open up a ticket with EPiServer support for either a better workaround or a patch. If I hear anything from them, I'll update this thread.

 

#70095
Apr 11, 2013 16:50
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.