• I have been trying to add Google Analytics for the past day and nothing seems to work. Built my whole site in HTML and CSS and then imported the code to make a custom theme in WordPress so I am quite familiar with code. But nothing is working. I tried to just add it to Header.php in the Appearance/Editor Tab But There is no <body> section in my Header.php file. So I just posted the JavaScript that Google provides for tracking before </head> and after But when I checked Google Analytics site it always said “Status: Tracking Not Installed”

    I deleted the script from header.php and then opened up index.php which started with <body> so I stuck the Script code before that. Still nothing. I then went the plugin route, even though I didn’t want to The Yoast plugin just straight up didnt work the Authenticate with Google Acount button just didnt do anything… So I got the Google Analytics Dashboard for WP by Alin Marcu was able to connect to the UA code and everything. It popped up in the Dashboard, It had no data but I understand that takes 12-24 hours. But I went back to the Google Analytics site and it still said that Tracking Not Installed!!!!

    I let it sit over night to see if maybe there was a delay. Now morning, I checked Google and still the status is not installed. So I deactivated that plugin and installed Insert Headers and Footers Because of this Tutorial (https://www.wpbeginner.com/beginners-guide/how-to-install-google-analytics-in-wordpress/) And I put the script in both the header and footer (at sperate times of course) And still nothing! I am out of ideas now. I am thinking something is just wrong with my analytics account or something.

    I did create a property in Analytics for my mobile app. I haven’t installed it yet. Is that somehow screwing it up? One other note is only my homepage is ran through WordPress. The rest of the pages in my site are just straight uploads of html pages I made. And I added the script directly to their file and uploaded them and still nothing from Google Analytics. Help me please! lol!

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Trouble adding Google Analytics to my site’ is closed to new replies.