What's new
USCHO Fan Forum

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • The USCHO Fan Forum has migrated to a new plaform, xenForo. Most of the function of the forum should work in familiar ways. Please note that you can switch between light and dark modes by clicking on the gear icon in the upper right of the main menu bar. We are hoping that this new platform will prove to be faster and more reliable. Please feel free to explore its features.

Google Analytics

Eagles

Seguin!
I'm hoping someone here can give me a hand with Google analytics code. I'm trying to put it into a blog but every time I place it into the code it turns the background white. I am placing the code in the right spot. Any idea whats going on?
 
Re: Google Analytics

Where are you placing it? and do you have the snippet you are putting in (you can edit out your number if you want)?

example:
Code:
< 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-xxxxxxx-x");
pageTracker._trackPageview();
} catch(err) {}< /script >
 
Last edited:
Re: Google Analytics

Where are you placing it? and do you have the snippet you are putting in (you can edit out your number if you want)?

example:
Code:
< 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-xxxxxxx-x");
pageTracker._trackPageview();
} catch(err) {}< /script >

What you posted is pretty much exactly it. I tried to post the code but it didnt work, I didn't think about using the quote feature. There doesn't appear to be any thing within the code that would change the color to white. Any ideas?
 
Re: Google Analytics

What you posted is pretty much exactly it. I tried to post the code but it didnt work, I didn't think about using the quote feature. There doesn't appear to be any thing within the code that would change the color to white. Any ideas?

No. Did you put the code between the < / head > and < body > tag?

Also I would make sure all of your tags are opened and closed properly. That is the most likely cause of the page changing.
 
Re: Google Analytics

I have mine as the very first thing in the body. Works there for me.

What type of blog are you using? Is it a Wordpress or other point-and-click?
 
Re: Google Analytics

It's recommended that you put it in the footer - if you put it up top, it can record visits that don't really happen while in the footer, the page has to fully load before it will kick in.
 
Re: Google Analytics

No. Did you put the code between the < / head > and < body > tag?

Also I would make sure all of your tags are opened and closed properly. That is the most likely cause of the page changing.

I put it right before the body tag. I am guessing there has to be some sort of code that isnt closed or right. If I can't find the bad code then I will paste the google analytics code in another spot and see what happens.

I have mine as the very first thing in the body. Works there for me.

What type of blog are you using? Is it a Wordpress or other point-and-click?


I'm just doing the blog through Blogger with a couple of friends. Feel free to click on the link in my signature....but not until I get the google analytics code in ;)
 
Back
Top