{"id":76906,"date":"2025-07-21T12:50:15","date_gmt":"2025-07-21T12:50:15","guid":{"rendered":"https:\/\/www.awardspace.com\/?p=76906"},"modified":"2025-08-11T11:00:03","modified_gmt":"2025-08-11T11:00:03","slug":"where-to-set-google-analytics-code","status":"publish","type":"post","link":"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/","title":{"rendered":"Where to Set Google Analytics 4 Code"},"content":{"rendered":"<p><a href=\"\/help\/web-analytics-why-they-matter\/\" target=\"_blank\" rel=\"noopener\">Google Analytics<\/a> is a handy tool that conveniently tracks visitors&#8217; behaviour on your website. It not only does that, but it can also help you segment your visitors on different criteria &#8211; demographics, purchase preferences, geographical location, and many more. To benefit from such a tool, you need to set it up. We have covered the entire process in a dedicated article, and if you are a complete beginner in the field of setting up analytics on your website, then definitely check it out:<\/p>\n<p><a href=\"\/help\/set-up-google-analytics-4-website\/\" target=\"_blank\" rel=\"noopener\">How to Set Up Google Analytics 4 On Your Website<\/a><\/p>\n<p>Also read: <a href=\"\/help\/how-to-navigate-google-analytics-4\/\" target=\"_blank\" rel=\"noopener\">How to Navigate Google Analytics 4<\/a><\/p>\n<p>In this article, we share where to set Google Analytics 4 code. Keep reading!<\/p>\n<p>&nbsp;<\/p>\n<h2>What is the Google Analytics 4 Code<\/h2>\n<p>The Google Analytics code is a small JavaScript snippet that you add to your website, so Google can collect and present data about how website visitors interact with your website and its content.<\/p>\n<p>In short, this code connects your website to your Google Analytics account and therefore allows you to monitor different analytics metrics such as page views,<a href=\"\/help\/how-to-find-bounce-rate-in-google-analyitcs-4\/\" target=\"_blank\" rel=\"noopener\"> bounce rate<\/a>, session duration, traffic sources, user demographics, purchases, and many more. If you are interested in the topic, then find out more about <a href=\"\/help\/important-website-metrics-google-analytics-4\/\" target=\"_blank\" rel=\"noopener\">the most important website metrics<\/a>.<\/p>\n<p>The Google Analytics code includes a unique measurement ID that identifies your own Google account and the particular website you are working on, so GA4 knows to which account to send the specific data gathered from a specific website.<\/p>\n<p>&nbsp;<\/p>\n<h2>Where to Get the Google Analytics 4 Code From<\/h2>\n<p>When you are <a href=\"\/help\/set-up-google-analytics-4-website\/\" target=\"_blank\" rel=\"noopener\">setting up your Google Analytics account<\/a>, you will stumble upon your unique code. If you have already set up your account, then you can access the code by doing the following:<\/p>\n<p>First, log in to your GA4 account.<\/p>\n<p>Then, within the GA4 dashboard, head to the <strong>Admin<\/strong> button (the gear icon) at the bottom right of the screen:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-77092\" src=\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/1-where-to-set-google-analytics-4-code-GA4-admin-page.jpg\" alt=\"Acces your Google Analytics 4 admin page\" width=\"1000\" height=\"486\" srcset=\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/1-where-to-set-google-analytics-4-code-GA4-admin-page.jpg 1000w, https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/1-where-to-set-google-analytics-4-code-GA4-admin-page-980x476.jpg 980w, https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/1-where-to-set-google-analytics-4-code-GA4-admin-page-480x233.jpg 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1000px, 100vw\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>After that, via the Admin page, head to<strong> Data Streams<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-77093\" src=\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/2-where-to-set-google-analytics-4-code-access-data-streams.jpg\" alt=\"Head to Data Streams to find your GA4 code\" width=\"1000\" height=\"916\" srcset=\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/2-where-to-set-google-analytics-4-code-access-data-streams.jpg 1000w, https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/2-where-to-set-google-analytics-4-code-access-data-streams-980x898.jpg 980w, https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/2-where-to-set-google-analytics-4-code-access-data-streams-480x440.jpg 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1000px, 100vw\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Once you access the<strong> Data Streams<\/strong> page, click on the GA4 property for which you wish to get the link:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-77094\" src=\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/3-where-to-set-google-analytics-4-code-select-GA4-property.jpg\" alt=\"Select a Google Analytics 4 property\" width=\"1000\" height=\"436\" srcset=\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/3-where-to-set-google-analytics-4-code-select-GA4-property.jpg 1000w, https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/3-where-to-set-google-analytics-4-code-select-GA4-property-980x427.jpg 980w, https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/3-where-to-set-google-analytics-4-code-select-GA4-property-480x209.jpg 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1000px, 100vw\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Then, head to the <strong>View tag instructions<\/strong> at the bottom of the new window that opened:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-77095\" src=\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/4-where-to-set-google-analytics-4-code-view-tag-instructions.jpg\" alt=\"View Tag Instructions panel\" width=\"1000\" height=\"714\" srcset=\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/4-where-to-set-google-analytics-4-code-view-tag-instructions.jpg 1000w, https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/4-where-to-set-google-analytics-4-code-view-tag-instructions-980x700.jpg 980w, https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/4-where-to-set-google-analytics-4-code-view-tag-instructions-480x343.jpg 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1000px, 100vw\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>From there, click on<strong> Install Manually<\/strong> to see the Google code:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-77096\" src=\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/5-where-to-set-google-analytics-4-code-view-GA4-code.jpg\" alt=\"Access the GA4 code\" width=\"959\" height=\"735\" srcset=\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/5-where-to-set-google-analytics-4-code-view-GA4-code.jpg 959w, https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/5-where-to-set-google-analytics-4-code-view-GA4-code-480x368.jpg 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 959px, 100vw\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Now, copy this code. In the next paragraphs, we share where to set it, so you can gather data from Google Analytics 4.<\/p>\n<p>&nbsp;<\/p>\n<h2>Where to Set Google Analytics 4 Code<\/h2>\n<p>In short, regardless of whether you are using a CMS such as <a href=\"\/wordpress-tutorials\/\" target=\"_blank\" rel=\"noopener\">WordPress<\/a>, <a href=\"\/kb\/design-tools\/joomla\/\" target=\"_blank\" rel=\"noopener\">Joomla<\/a>, <a href=\"\/kb\/design-tools\/mediawiki\/\" target=\"_blank\" rel=\"noopener\">MediaWiki<\/a>, or another platform, or you are building a website completely on HTML, in all cases, you should place the Google Analytics code within the <strong>&lt;Head&gt;<\/strong> section of your website. This is due to the fact that this particular section is present on all your web pages, and therefore, the code will be present on all of them. This is important because doing so allows Google Analytics to gain data from the entirety of your website, and not only from specific pages.<\/p>\n<p>If you are interested in more technical details, then check out <a href=\"\/help\/how-do-websites-work\/\" target=\"_blank\" rel=\"noopener\">how do websites work<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<h2>How to Set the Google Analytics Code<\/h2>\n<p>There are various ways you can use to set the Google Analytics code, depending on how you built your website. In the following paragraphs, we share the two most common ways you can add the code to your website:<\/p>\n<ul>\n<li>Using an HTML code.<\/li>\n<li>Using a WordPress plugin.<\/li>\n<\/ul>\n<p>Keep in mind that other CMS platforms also support plugin installation, so in many cases, the process is similar to the WordPress one.<\/p>\n<p>&nbsp;<\/p>\n<h3>Set Google Analytics Code via HTML Code<\/h3>\n<p>The first approach is more technical and revolves around the idea to manually add the GA4 tracking code to your website pages. The process is simple and comprises only a few steps:<\/p>\n<p>&nbsp;<\/p>\n<h4>Step 1: Copy the GA4 Code from the GA4 Property<\/h4>\n<p>Log in to your Google Analytics account and head to <strong>Admin -&gt; Data Streams -&gt; Your Website property -&gt; Install Manually<\/strong>, where you will see the tracking code. Once you do, copy it.<\/p>\n<p>&nbsp;<\/p>\n<h4>Step 2: Paste the Code in the HTML Head Section<\/h4>\n<p>Now that the code is copied, it is time to place it within the HTML string of your website. To do so, access your website&#8217;s source HTML code and add the GA4 snippet within the &lt;head section. Adding it precisely there is important, as this will help GA4 track visitor behaviour on all of your pages:<\/p>\n<p>&lt;html&gt;<br \/>\n&lt;head&gt;<br \/>\n&lt;title&gt;Your Website&lt;\/title&gt;<br \/>\n<span style=\"text-decoration: underline;\"><strong>&lt;!&#8211; Google Analytics code goes here &#8211;&gt;<\/strong><\/span><br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n&#8230;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<\/p>\n<p>Now, save the file, so the changes take place.<\/p>\n<p>&nbsp;<\/p>\n<h3>Set Google Analytics Code via a Plugin<\/h3>\n<p>The second most popular way of setting your GA4 tracking code is by installing a plugin that adds the GA4 code to your website. This method works when you use a CMS such as WordPress and Joomla for your website.<\/p>\n<p>For this example, we will be using WordPress. Keep in mind that the process is similar to all CMS platforms.<\/p>\n<p>First, log in to the <a href=\"\/kb\/log-in-wordpress\/\" target=\"_blank\" rel=\"noopener\">WordPress dashboard<\/a>.<\/p>\n<p>Then, download and <a href=\"\/kb\/install-a-wordpress-plugin\/\" target=\"_blank\" rel=\"noopener\">install a WordPress plugin <\/a>such as <a href=\"https:\/\/wordpress.org\/plugins\/google-site-kit\/\" target=\"_blank\" rel=\"noopener\">Google Site Kit<\/a>,<a href=\"https:\/\/wordpress.org\/plugins\/wp-headers-and-footers\/\" target=\"_blank\" rel=\"noopener\"> Insert Headers and Footers<\/a>, and <a href=\"https:\/\/wordpress.org\/plugins\/ga-google-analytics\/\" target=\"_blank\" rel=\"noopener\">GA Google Analytics<\/a>, or any other that fits your needs.<\/p>\n<p>&nbsp;<\/p>\n<h2>Conclusion<\/h2>\n<p>Understanding where to set Google Analytics code can help you gain more detailed tracking data and therefore, help you understand your site visitors and buyers even better, so as to make your website even more engaging.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Analytics is a handy tool that conveniently tracks visitors&#8217; behaviour on your website. It not only does that, but it can also help you segment your visitors on different criteria &#8211; demographics, purchase preferences, geographical location, and many more. To benefit from such a tool, you need to set it up. We have covered [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[168],"tags":[],"class_list":["post-76906","post","type-post","status-publish","format-standard","hentry","category-getting-traffic"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Where to Set Google Analytics 4 Code - AwardSpace.com<\/title>\n<meta name=\"description\" content=\"Learn where to set Google Analytics 4 Code for optimal results, so you can get the most out of your website project.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Where to Set Google Analytics 4 Code - AwardSpace.com\" \/>\n<meta property=\"og:description\" content=\"Learn where to set Google Analytics 4 Code for optimal results, so you can get the most out of your website project.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/\" \/>\n<meta property=\"og:site_name\" content=\"AwardSpace.com\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/AwardSpace\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-21T12:50:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-11T11:00:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/1-where-to-set-google-analytics-4-code-GA4-admin-page.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"486\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"George Boychev\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@awspace\" \/>\n<meta name=\"twitter:site\" content=\"@awspace\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"George Boychev\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/\"},\"author\":{\"name\":\"George Boychev\",\"@id\":\"https:\/\/www.awardspace.com\/#\/schema\/person\/c34b380be18b6fb9d891474cdb991ed6\"},\"headline\":\"Where to Set Google Analytics 4 Code\",\"datePublished\":\"2025-07-21T12:50:15+00:00\",\"dateModified\":\"2025-08-11T11:00:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/\"},\"wordCount\":942,\"publisher\":{\"@id\":\"https:\/\/www.awardspace.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/1-where-to-set-google-analytics-4-code-GA4-admin-page.jpg\",\"articleSection\":[\"Getting traffic\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/\",\"url\":\"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/\",\"name\":\"Where to Set Google Analytics 4 Code - AwardSpace.com\",\"isPartOf\":{\"@id\":\"https:\/\/www.awardspace.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/1-where-to-set-google-analytics-4-code-GA4-admin-page.jpg\",\"datePublished\":\"2025-07-21T12:50:15+00:00\",\"dateModified\":\"2025-08-11T11:00:03+00:00\",\"description\":\"Learn where to set Google Analytics 4 Code for optimal results, so you can get the most out of your website project.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/#primaryimage\",\"url\":\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/1-where-to-set-google-analytics-4-code-GA4-admin-page.jpg\",\"contentUrl\":\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/1-where-to-set-google-analytics-4-code-GA4-admin-page.jpg\",\"width\":1000,\"height\":486,\"caption\":\"Acces your Google Analytics 4 admin page\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.awardspace.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Help\",\"item\":\"https:\/\/www.awardspace.com\/help\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Getting traffic\",\"item\":\"https:\/\/www.awardspace.com\/help\/getting-traffic\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Where to Set Google Analytics 4 Code\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.awardspace.com\/#website\",\"url\":\"https:\/\/www.awardspace.com\/\",\"name\":\"AwardSpace.com\",\"description\":\"Free Web Hosting with PHP, MySQL, Email Sending, No Ads\",\"publisher\":{\"@id\":\"https:\/\/www.awardspace.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.awardspace.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.awardspace.com\/#organization\",\"name\":\"AwardSpace.com\",\"url\":\"https:\/\/www.awardspace.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.awardspace.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2018\/08\/awardspace_logo.png\",\"contentUrl\":\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2018\/08\/awardspace_logo.png\",\"width\":1759,\"height\":176,\"caption\":\"AwardSpace.com\"},\"image\":{\"@id\":\"https:\/\/www.awardspace.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/AwardSpace\/\",\"https:\/\/x.com\/awspace\",\"https:\/\/www.instagram.com\/awardspace\/\",\"https:\/\/www.quora.com\/profile\/Award-Space\",\"https:\/\/www.linkedin.com\/company\/19214384\/\",\"https:\/\/www.reddit.com\/user\/AwardSpace\",\"https:\/\/www.pinterest.com\/awardspace\/\",\"https:\/\/www.youtube.com\/user\/AwardspaceWebHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.awardspace.com\/#\/schema\/person\/c34b380be18b6fb9d891474cdb991ed6\",\"name\":\"George Boychev\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.awardspace.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/38eee395e1a7ebda2c2264156cddd9100a8aea7989c1f0d198eadfb4433bcea2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/38eee395e1a7ebda2c2264156cddd9100a8aea7989c1f0d198eadfb4433bcea2?s=96&d=mm&r=g\",\"caption\":\"George Boychev\"},\"url\":\"https:\/\/www.awardspace.com\/author\/georgeb\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Where to Set Google Analytics 4 Code - AwardSpace.com","description":"Learn where to set Google Analytics 4 Code for optimal results, so you can get the most out of your website project.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/","og_locale":"en_US","og_type":"article","og_title":"Where to Set Google Analytics 4 Code - AwardSpace.com","og_description":"Learn where to set Google Analytics 4 Code for optimal results, so you can get the most out of your website project.","og_url":"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/","og_site_name":"AwardSpace.com","article_publisher":"https:\/\/www.facebook.com\/AwardSpace\/","article_published_time":"2025-07-21T12:50:15+00:00","article_modified_time":"2025-08-11T11:00:03+00:00","og_image":[{"width":1000,"height":486,"url":"https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/1-where-to-set-google-analytics-4-code-GA4-admin-page.jpg","type":"image\/jpeg"}],"author":"George Boychev","twitter_card":"summary_large_image","twitter_creator":"@awspace","twitter_site":"@awspace","twitter_misc":{"Written by":"George Boychev","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/#article","isPartOf":{"@id":"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/"},"author":{"name":"George Boychev","@id":"https:\/\/www.awardspace.com\/#\/schema\/person\/c34b380be18b6fb9d891474cdb991ed6"},"headline":"Where to Set Google Analytics 4 Code","datePublished":"2025-07-21T12:50:15+00:00","dateModified":"2025-08-11T11:00:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/"},"wordCount":942,"publisher":{"@id":"https:\/\/www.awardspace.com\/#organization"},"image":{"@id":"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/#primaryimage"},"thumbnailUrl":"https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/1-where-to-set-google-analytics-4-code-GA4-admin-page.jpg","articleSection":["Getting traffic"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/","url":"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/","name":"Where to Set Google Analytics 4 Code - AwardSpace.com","isPartOf":{"@id":"https:\/\/www.awardspace.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/#primaryimage"},"image":{"@id":"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/#primaryimage"},"thumbnailUrl":"https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/1-where-to-set-google-analytics-4-code-GA4-admin-page.jpg","datePublished":"2025-07-21T12:50:15+00:00","dateModified":"2025-08-11T11:00:03+00:00","description":"Learn where to set Google Analytics 4 Code for optimal results, so you can get the most out of your website project.","breadcrumb":{"@id":"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/#primaryimage","url":"https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/1-where-to-set-google-analytics-4-code-GA4-admin-page.jpg","contentUrl":"https:\/\/www.awardspace.com\/wp-content\/uploads\/2025\/07\/1-where-to-set-google-analytics-4-code-GA4-admin-page.jpg","width":1000,"height":486,"caption":"Acces your Google Analytics 4 admin page"},{"@type":"BreadcrumbList","@id":"https:\/\/www.awardspace.com\/help\/where-to-set-google-analytics-code\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.awardspace.com\/"},{"@type":"ListItem","position":2,"name":"Help","item":"https:\/\/www.awardspace.com\/help\/"},{"@type":"ListItem","position":3,"name":"Getting traffic","item":"https:\/\/www.awardspace.com\/help\/getting-traffic\/"},{"@type":"ListItem","position":4,"name":"Where to Set Google Analytics 4 Code"}]},{"@type":"WebSite","@id":"https:\/\/www.awardspace.com\/#website","url":"https:\/\/www.awardspace.com\/","name":"AwardSpace.com","description":"Free Web Hosting with PHP, MySQL, Email Sending, No Ads","publisher":{"@id":"https:\/\/www.awardspace.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.awardspace.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.awardspace.com\/#organization","name":"AwardSpace.com","url":"https:\/\/www.awardspace.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.awardspace.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.awardspace.com\/wp-content\/uploads\/2018\/08\/awardspace_logo.png","contentUrl":"https:\/\/www.awardspace.com\/wp-content\/uploads\/2018\/08\/awardspace_logo.png","width":1759,"height":176,"caption":"AwardSpace.com"},"image":{"@id":"https:\/\/www.awardspace.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/AwardSpace\/","https:\/\/x.com\/awspace","https:\/\/www.instagram.com\/awardspace\/","https:\/\/www.quora.com\/profile\/Award-Space","https:\/\/www.linkedin.com\/company\/19214384\/","https:\/\/www.reddit.com\/user\/AwardSpace","https:\/\/www.pinterest.com\/awardspace\/","https:\/\/www.youtube.com\/user\/AwardspaceWebHosting"]},{"@type":"Person","@id":"https:\/\/www.awardspace.com\/#\/schema\/person\/c34b380be18b6fb9d891474cdb991ed6","name":"George Boychev","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.awardspace.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/38eee395e1a7ebda2c2264156cddd9100a8aea7989c1f0d198eadfb4433bcea2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/38eee395e1a7ebda2c2264156cddd9100a8aea7989c1f0d198eadfb4433bcea2?s=96&d=mm&r=g","caption":"George Boychev"},"url":"https:\/\/www.awardspace.com\/author\/georgeb\/"}]}},"_links":{"self":[{"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/posts\/76906","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/comments?post=76906"}],"version-history":[{"count":13,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/posts\/76906\/revisions"}],"predecessor-version":[{"id":77097,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/posts\/76906\/revisions\/77097"}],"wp:attachment":[{"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/media?parent=76906"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/categories?post=76906"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/tags?post=76906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}