Hi Everyone
I am getting Javascript errors in v9 and v10 arising from the Google tracking code.
The original code from Google is>>
<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("UA-xxxxxxxx-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
If I replace the Google analytis code code in the Library with this code with the analytics number in place the error goes.
If I use this code but use 'GoogleAnalyticsNumber' the error comes back.
If I use the Actinic version of the code >>
<actinic:block if="%3cactinic%3avariable%20name%3d%22IsGoogleAnalyticsEnabled%22%20%2f%3e%20%3d%3d%20true" >
<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">
var pageTracker = _gat._getTracker("<actinic:variable name="GoogleAnalyticsNumber" />");
pageTracker._initData();
pageTracker._trackPageview(<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Receipt%22">"/receipt.html"</actinic:block>);
</script>
</actinic:block>
I get the error. If I hard code the number instead of the variable as before, I still get the error. If I hard code the number and replace the two lines>
pageTracker._initData();
pageTracker._trackPageview(<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Receipt%22">"/receipt.html"</actinic:block>);
with>
pageTracker._trackPageview();
} catch(err) {}
The error goes.
Anyone still with me? Any ideas?
The solution in http://community.actinic.com/showthread.php?t=40048 does not solve the problem.
Thanks
Jonathan
I am getting Javascript errors in v9 and v10 arising from the Google tracking code.
The original code from Google is>>
<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("UA-xxxxxxxx-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
If I replace the Google analytis code code in the Library with this code with the analytics number in place the error goes.
If I use this code but use 'GoogleAnalyticsNumber' the error comes back.
If I use the Actinic version of the code >>
<actinic:block if="%3cactinic%3avariable%20name%3d%22IsGoogleAnalyticsEnabled%22%20%2f%3e%20%3d%3d%20true" >
<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">
var pageTracker = _gat._getTracker("<actinic:variable name="GoogleAnalyticsNumber" />");
pageTracker._initData();
pageTracker._trackPageview(<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Receipt%22">"/receipt.html"</actinic:block>);
</script>
</actinic:block>
I get the error. If I hard code the number instead of the variable as before, I still get the error. If I hard code the number and replace the two lines>
pageTracker._initData();
pageTracker._trackPageview(<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Receipt%22">"/receipt.html"</actinic:block>);
with>
pageTracker._trackPageview();
} catch(err) {}
The error goes.
Anyone still with me? Any ideas?
The solution in http://community.actinic.com/showthread.php?t=40048 does not solve the problem.
Thanks
Jonathan
Comment