Question

I am looking to track a Pop-Over page that appears when the forum is submitted at:

http://www.xebra.com/salesAssistance.html

I tried adding the urchin/google analytics code to the page that is displayed in the pop-over window, but whenever I do so the status bar displays "Read http://www.google-analytics.com/" and the entire form page goes blank.

It is important to track the page in the popover because that page is the conversion goal (the page we are trying to direct people to).

How do I stop Google Analytics from destroying my window, while still tracking that a user has been there?


Thank you,
Andrew J. Leer

Was it helpful?

Solution

You could separate your google analytics code into two bits:

one that goes on top of the page:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." :"http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
    var pageTracker = _gat._getTracker("#########");
} catch(err) {}
</script>

and the other just before the "end body" tag

<script>
   pageTracker._trackPageview();
</script>

And the call the pageTracker._trackPageview(); method in the ajaxComplete callback of the "pop-up" window.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top