42 posts
  • Has been part of the Envato Community for over 6 years
  • Has collected 50+ items on Envato Market
  • Located in United States
cmF says

Hey so I came across this article – https://support.google.com/analytics/answer/1008080?hl=en and many other Google articles like it that say your tracking code should go immediately before the </head> tag.

I thought traditionally, this has always been done in the footer, right before the tag? In fact, many Wordpress Themes allow you to insert your tacking code into the WP Backend and it’s automatically placed at the bottom of the page before the tag.

Can anyone explain if there is a difference, and which one if any is better? Thanks.

1162 posts
  • Has been a beta tester for an Envato feature
  • Has sold $10,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Has referred 1+ members
+6 more
greenline says

Google requires the tracking code to be in the HEAD tag to be able to use it to verify your website ownership via the Google Webmaster Tools: https://support.google.com/webmasters/answer/185871?hl=en

Google Webmaster Tools is a set of tools for SEO and site analysis, especially useful when you wish to find the search keywords, etc

Otherwise, if you don’t use the Google Webmaster Tools, then you can place the code before the ending BODY tag.

42 posts
  • Has been part of the Envato Community for over 6 years
  • Has collected 50+ items on Envato Market
  • Located in United States
cmF says

Thanks! I was actually trying to verify ownership which is why I came across this discrepancy. It’s such a minor detail but I’m glad you noticed.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by