how can i fix this

  • 1
  • Question
  • Updated 9 years ago
  • Answered
google analytics code is showing in the web page before and after it is published.

how can i fix this
Photo of mchl

mchl

  • 7 Posts
  • 0 Reply Likes
  • ok

Posted 9 years ago

  • 1
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hi mchl

How are you adding your google analytics code? Please be sure to add your code inside an HTML widget and that you're copying the entire code.

You may be interested in this tutorial as well:
http://www.yola.com/tutorials/analytics

If you need further assistance, please post your site url where you have this code so that we can take a look at what's happening. Thanks.
Photo of Connor McCarra

Connor McCarra, Champion

  • 944 Posts
  • 47 Reply Likes
Hi Mchl,
<!--
I take it your site is acooksrecipe.yolasite.com? If it is your missing a 't' in type.

Here is the code you have:

<script ype="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>

It should be:

<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>

-->
Connor
Photo of jeremy

jeremy, Employee

  • 1349 Posts
  • 90 Reply Likes
Thanks Littleus and Connor,

Mchl, Littleus is right - you need to be adding your code in a HTML widget.



You then shouldn't see anything when it is added.

Please let us know if you need any more assistance with this.