Link to home
Start Free TrialLog in
Avatar of sabecs
sabecs

asked on

WordPress website not working after adding Google Tracking Code?

WordPress website not working after adding Google Tracking Code?
I have tried adding code via a plugin and also by manually editing header.php file, but still same issue.

This page isn’t working
www.mywebsite.com.au redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS


<!-- Google Tag Manager  head code-->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-DGSRS556');</script>
<!-- End Google Tag Manager -->


<!-- Google Tag Manager body code (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-DGSRS556"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
ASKER CERTIFIED SOLUTION
Avatar of Britt Thompson
Britt 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
Avatar of Scarlett Whitehouse
Scarlett Whitehouse

This problem is not occurring by adding Google Tracking Code. It is your website redirection problem, which can occur due to some modification has been done to your .htaccess file. Changes in .htaccess file can happen due to some redirection plugins which you have installed. So I would suggest you the same as Britt Thompson said disable plugins one by one then add Google Tracking Code to check the issue is resolve or not.