I am 100% sure that I have installed the Google Analytics tracking code successfully because when I visit the site where I installed it, I can see my visit as an online active user in the "REAL-TIME" section.
I am trying to use Google Experiments for split testing. I go to the "Experiments" section in Google Analytics:
I am configuring a new experiment and in the last step, when I try to validate my configuration by using the "Experiment Code Validation" option, I see this error: "No Google Analytics tracking code found."
The help Google provides, or hint to fix this error is: "Install Google Analytics tracking code on your experiment pages, then check them again.
We scan only the first 256KB of a page looking for scripts. If your code appears after the first 256KB, you see this error." My Google Analytics tracking code appears immediately after the <head>
line in my code. Also, Google Analytics reports have been working correctly for me for months, reporting traffic and visits to my site. I do not understand why I get this "No Google Analytics tracking code found" error. See the error in the image below:
I found at https://developers.google.com/analytics/solutions/experiments-client-side this:
A name and URL is required for each variation but you can use any value you want for the URL of the variation since it is not applicable for this type of implementation... The URL is required but not applicable or used for this type of implementation... Note: Because URLs are not applicable to this implementation but are required to configure an experiment you can ignore any errors or notifications such as "We could not find the URL you entered".
I simply ignored that error and moved on with my tests.