AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
3.3K members online now
3.3K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Can't get Google Analytics to work on my website

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I'm having trouble implementing the Google Analytics code to my website.  I have pasted the following code into my site (www.thirdcoasttrolley.com) in the <head></head> section as instructed:

 

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-89238658-1', 'auto');
ga('send', 'pageview');

</script>

 

 

On the Tag Assistant, I'm getting the following errors:

 

An error occured while the tag was fired: net::ERR_CONNECTION_REFUSED

Error while sending request: net::ERR_CONNECTION_REFUSED

 

I also cannot connect manually to https://www.google-analytics.com/analytics.js in my chrome (and IE) browser. I get the same refusal to connect error.  I had adblock on my chrome browser, but I have uninstalled it. I also disabled my windows firewall, and the firewall on my router. I am not using any sort of proxy server that should complicate this either.  Any assistance anyone can provide would be appreciated.  Thank you.

 

Regards,

  Mark D

1 Expert replyverified_user

Can't get Google Analytics to work on my website

Top Contributor
# 2
Top Contributor

Hi :-)
Atm i am seeing the page tracked twice for GA Property UA-89238658-1.
If it's a shared hosting plan, and you have not done so, you may want to have a read of hostgator's analytics instructions, as they seem to have some instructions that are specific to their hosting in regards to setup.
You may not need to actually add the tracking code itself, they may add it dynamically for you.

http://support.hostgator.com/articles/specialized-help/google-analytics-integration

 

You may do best to contact their support 

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here