I am trying to setup Google Analytics on my site, however it will not detect that it is being tracked.
I have placed the code they provided in my header.php right b
That's their new tracking code, I wouldn't be surprised if their detector isn't set up to find it yet. Go into the Google Analytics real-time dashboard and see if your pageviews are showing up - if they are, don't worry about the incorrect flagging.
I fix this by using the asynchronous script first, then visiting a page on the site, refreshing the GA screen to check if the status has been changed, then replacing the GA script with the Universal script once the status has been updated. It works every time. It makes my clients happy.
It took a day or two after I put the tracking code on each of my pages for the status on my Google Analytics Tracking Info tab to be updated from "Tracking Not Installed" to "Universal Analytics is enabled for this property". During this time I was seeing regular activity in my tracking reports.
If you're brand new to Google Analytics, the default reports only include data up to the previous day. If you want to check for activity on the same day that you added the tracking code, you have to adjust the date range to include the current day's activity.