Link to home
Start Free TrialLog in
Avatar of jaisonshereen
jaisonshereen

asked on

How to add google analyics in my blogger?

I have the code below which i got from google analytics for site tracking ..how to add it in my blogger website?

<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-69*****2-1");
pageTracker._trackPageview();
} catch(err) {}</script>

Open in new window

SOLUTION
Avatar of Jason Thompson
Jason Thompson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jaisonshereen
jaisonshereen

ASKER

Some problem after adding the code :

Analytics is not detecting the website


Below ins the code i have added !

i went to edit template > pasted the code above </body> tag.

There is differencing in google analytics ....

please see the error snapshot !



<b:widget id='HTML1' locked='false' title='Excellent Blogs' type='HTML'/>
<b:widget id='AdSense3' locked='false' title='' type='AdSense'/>
</b:section>
    </div>
 
  </div></div> <!-- end outer-wrapper -->
<script type='text/javascript'>
var gaJsHost = ((&quot;https:&quot; == document.location.protocol) ? &quot;https://ssl.&quot; : &quot;http://www.&quot;);
document.write(unescape(&quot;%3Cscript src=&#39;&quot; + gaJsHost + &quot;google-analytics.com/ga.js&#39; type=&#39;text/javascript&#39;%3E%3C/script%3E&quot;));
</script>
<script type='text/javascript'>
try {
var pageTracker = _gat._getTracker(&quot;UA-69***52-1&quot;);
pageTracker._trackPageview();
} catch(err) {}</script>
</body>
</html>
                

Open in new window

Error.JPG
How long has it been since you added the code?  Sometimes it takes a few hours to detect.
When you go to your site in a browser and "View Source", do you see the code you added?
 
yes ..google says 24 hours ..i am waiting !
I added two new sites to analytics wednesday.  One (hosted on HostGator) showed up in 2 minutes the other one (hosted on GoDaddy) took until the end of the day.
its detected ..but everything zero

even visitors also zero!

i just give some test clicks .. but still zero :-(
Data is not in realtime.
Are you viewing the current date or the weekly stat summary?
Everything fine ..i can view date wise as well as weekly wise .. thanks for the support!