cancel
Showing results for 
Search instead for 
Did you mean: 

Google Analytics Broke - No HTTP response detected

SOLVED

Google Analytics Broke - No HTTP response detected

Out of the blue, our google analytics, stopped working and now I get this error:

No HTTP response detected

I tried updating extensions, removing the script and adding the new one provided by Google, without any luck. Anyone has the same issue?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Google Analytics Broke - No HTTP response detected

So the problem was due to Magento Cookies Consent .js. This caused an error in javascript which blocked Google Analytics.

After removing the consent popup, everything works as should. 

View solution in original post

8 REPLIES 8

Re: Google Analytics Broke - No HTTP response detected

Hi @leokan23 


Try once after removing all google script from code.

And use magento default:

Admin->System->Configuration->Sales->Google API
Configure it and check after clean cache.


PFA for the reference.

Screenshot from 2019-06-14 16-51-55.png

Re: Google Analytics Broke - No HTTP response detected

I have tried removing all the extensions, disabling everything, using only the default one, adding the script at the header. I get the same result.

I tried enabling debugging for analytics and all I get is this:

analytics-error.PNG

Re: Google Analytics Broke - No HTTP response detected

Then could you check once in Google analytics account settings, may be there are some issue.

Or try Google Tag Manger, you can manage lot of things including analytics as well.

For google tag manager you need to add some script on the website.

for more info:
https://docs.magento.com/m1/ee/user_guide/marketing/google-tag-manager.html
https://marketplace.magento.com/chapagain-chapagain-googletagmanager.html

Re: Google Analytics Broke - No HTTP response detected

I have the google tag already, but doesn't look like working either. 

This happened after upgrading to the latest cPanel (80.0.0.18). Not sure if it is related.

Re: Google Analytics Broke - No HTTP response detected

May be server end issue..
You can also check with server support guys.

Or you can also try same Analytics script in custom file on your local server or different server, so you will sure that issue with script or the server.

Re: Google Analytics Broke - No HTTP response detected

I tried analytics (the new gtag.js) in a custom file and everything works perfectly. So it looks like this is a magento related issue. Can robot.txt or htaccess cause this?

Re: Google Analytics Broke - No HTTP response detected

Hi @leokan23,

robots.txt is definitely not.  It is used only when search engine (google) crawl our website.

".htaccess" you can try after replacing default one once. 
https://github.com/magento/magento2/blob/2.3-develop/.htaccess

I think it is server related issue. You can ask your server support once.

Re: Google Analytics Broke - No HTTP response detected

So the problem was due to Magento Cookies Consent .js. This caused an error in javascript which blocked Google Analytics.

After removing the consent popup, everything works as should.