{"id":678,"date":"2014-02-10T19:59:22","date_gmt":"2014-02-11T03:59:22","guid":{"rendered":"http:\/\/www.ultimatewb.com\/blog\/?p=678"},"modified":"2014-02-10T20:07:17","modified_gmt":"2014-02-11T04:07:17","slug":"where-should-you-place-the-google-analytics-code","status":"publish","type":"post","link":"https:\/\/www.ultimatewb.com\/blog\/678\/where-should-you-place-the-google-analytics-code\/","title":{"rendered":"Where should you place the Google Analytics code?"},"content":{"rendered":"<p>    <picture>\n                <img src=\"https:\/\/www.ultimatewb.com\/blog\/wp-content\/uploads\/google-analytics.jpg\" \n              \n             width=\"286\" \n             height=\"176\" \n             alt=\"Google Analytics\" \n             loading=\"lazy\" \n             decoding=\"async\" \n             class=\"alignnone size-full wp-image-681\" >\n    <\/picture>\n    <\/p>\n<p>If you want to use Google Analytics to track your website traffic, <span style=\"text-decoration: underline;\">hopefully you are using a good website builder that lets you do this easily in seconds, or you have coded your website with &#8220;php includes<\/span>&#8221; &#8211; because you will need to include this on every webpage that you want traffic statistics for! \u00a0This can be very tedious otherwise &#8211; and just think you will have to repeat the process whenever Google upgrades the coding! \u00a0No worries if you are using Ultimate Web Builder software&#8230;<strong>You can do this with one easy step on UltimateWB, using the <a href=\"https:\/\/www.ultimatewb.com\/adds-app\/adding-google-ads-media-plugins-analytics\" target=\"_blank\">Ad(d)s app<\/a>.<\/strong><\/p>\n<p>Ok, so now onto the title question, <strong>where should you put the Google Analytics code?<\/strong> \u00a0Google now recommends you place the code before the &#8220;&lt;\/head&gt;&#8221; tag. \u00a0The recommendation used to be to place it before the &#8220;&lt;\/body&gt;&#8221; tag, due to \u00a0possible issues of the javascript coding stalling your webpage to load. \u00a0But they have changed their coding since. \u00a0You can really copy\/paste the Google Analytics code anywhere on your webpage that you want &#8211; in its own section, not in the middle of text or other coding block, of course.<\/p>\n<p><strong>Using UltimateWB software<\/strong>, to place the Google Analytics code right before the &#8220;&lt;\/head&gt;&#8221; section as recommended by Google, just copy\/paste the code into the Ad(d) named &#8220;In head section, right before end head tag&#8221;. Then the software does the rest.\u00a0 If you are using the WordPress blog app integrated in UltimateWB, then you can take care of the Google Analytics code placement in both your website and WordPress easier and faster by placing the code in a new <a href=\"https:\/\/www.ultimatewb.com\/adds-app\/adding-google-ads-media-plugins-analytics\" target=\"_blank\">Ad(d)s<\/a>\u00a0on your UltimateWB website admin panel. \u00a0Then copy\/paste the generated Placeholder Text into your header file or footer file (List Pages &gt; Edit Page) &#8211; both of these page sections are incorporated in your UltimateWB integreated WordPress blog. \u00a0Otherwise, you would have to follow separate instructions for incoporating it in your WordPress blog pages.<\/p>\n<p><strong>Does it make a difference where you put the Google Analytics code?<\/strong> The higher up in the page you put the Google Analytics code, the sooner the traffic statistics program gets the visitor hit. \u00a0If the website visitor quickly leaves the page before the Google Analytics code is loaded, their visit won&#8217;t be counted by Google. \u00a0&#8230;Probably don&#8217;t want to count that anyways, right?!<\/p>\n<p>Related:\u00a0<a title=\"Permalink to Google Analytics vs Awstats \u2013 which is better, more accurate, useful?\" href=\"https:\/\/www.ultimatewb.com\/blog\/674\/google-analytics-vs-awstats-which-is-better-more-accurate-useful\/\" rel=\"bookmark\">Google Analytics vs Awstats \u2013 which is better, more accurate, useful?<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to use Google Analytics to track your website traffic, hopefully you are using a good website builder that lets you do this easily in seconds, or you have coded your website with &#8220;php includes&#8221; &#8211; because you &hellip; <a href=\"https:\/\/www.ultimatewb.com\/blog\/678\/where-should-you-place-the-google-analytics-code\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[558],"tags":[561,330,331],"class_list":["post-678","post","type-post","status-publish","format-standard","hentry","category-traffic-statistics-2","tag-adds-app","tag-google-analytics","tag-traffic-statistics"],"_links":{"self":[{"href":"https:\/\/www.ultimatewb.com\/blog\/wp-json\/wp\/v2\/posts\/678"}],"collection":[{"href":"https:\/\/www.ultimatewb.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ultimatewb.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ultimatewb.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ultimatewb.com\/blog\/wp-json\/wp\/v2\/comments?post=678"}],"version-history":[{"count":4,"href":"https:\/\/www.ultimatewb.com\/blog\/wp-json\/wp\/v2\/posts\/678\/revisions"}],"predecessor-version":[{"id":684,"href":"https:\/\/www.ultimatewb.com\/blog\/wp-json\/wp\/v2\/posts\/678\/revisions\/684"}],"wp:attachment":[{"href":"https:\/\/www.ultimatewb.com\/blog\/wp-json\/wp\/v2\/media?parent=678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ultimatewb.com\/blog\/wp-json\/wp\/v2\/categories?post=678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ultimatewb.com\/blog\/wp-json\/wp\/v2\/tags?post=678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}