Wordpress google analytic plugin


I just added my code in the wordpress google analytic plugin settings. But I have this message:

(function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();

Any suggestions , Thanks!
Who is Participating?
gwkgConnect With a Mentor Commented:
I meant to paste that into your other question.
Jason C. LevineNo oneCommented:
Hi speedtofly,

Where is that message showing up?  That's the actual js code for GA...
speedtoflyAuthor Commented:
Totally on the top here on the picture
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Jason C. LevineNo oneCommented:

Did you include the <script></script> tags when you pasted the code in the plugin config screen?
speedtoflyAuthor Commented:
Yes I copy the complete code from google analytic web site
Jason C. LevineNo oneCommented:
What theme are you using on your site?  It's possible the GA plugin is not fully compatible with the theme and is writing stuff in the wrong place, causing the error.
Maybe you don't need to add the <script> tags, as I would think a plugin would add those for you.

Actually, I would think for a plugin all you would need to do is add your account number and it would do the rest.  What's the point of the plugin if you have to add the entire code?  You could just put the code in the header.php file through that admin editor.

I would recommend the plugin from Yoast...

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.