{"id":232,"date":"2020-02-16T12:48:46","date_gmt":"2020-02-16T12:48:46","guid":{"rendered":"https:\/\/webnus.net\/kata\/documentation\/?p=232"},"modified":"2026-10-13T08:11:32","modified_gmt":"2026-10-13T08:11:32","slug":"how-to-set-a-google-analytic-tool","status":"publish","type":"post","link":"https:\/\/webnus.net\/kata\/documentation\/how-to-set-a-google-analytic-tool\/","title":{"rendered":"How to Set Up Google Analytics 4 (GA4) in Kata"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">You can add Google Analytics 4 (GA4) to a Kata website without an extra plugin. You create a GA4 property, copy its Google tag, and paste the tag into Kata\u2019s Custom Codes option. The old Universal Analytics \u201cTracking ID\u201d (UA-XXXX) no longer collects data, so use a GA4 Measurement ID that starts with <strong>G-<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Create a GA4 property and web data stream<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to <a href=\"https:\/\/analytics.google.com\/\" target=\"_blank\" rel=\"noopener\">Google Analytics<\/a> and sign in with your Google account.<\/li>\n\n\n\n<li>Open <strong>Admin<\/strong> and click <strong>Create<\/strong> &gt; <strong>Property<\/strong>. If you don\u2019t have an account yet, Google asks you to create one first.<\/li>\n\n\n\n<li>Enter a property name, your reporting time zone and currency, then answer the business questions.<\/li>\n\n\n\n<li>When asked to choose a platform, select <strong>Web<\/strong>, enter your website URL and a stream name, and click <strong>Create stream<\/strong>.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Copy your Google tag<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In the web stream details, click <strong>View tag instructions<\/strong> and choose <strong>Install manually<\/strong>.<\/li>\n\n\n\n<li>Copy the whole snippet. It starts with <code>&lt;!-- Google tag (gtag.js) --&gt;<\/code> and contains your Measurement ID (G-XXXXXXXXXX).<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Paste the tag into Kata<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In your WordPress dashboard, go to <strong>Kata &gt; Options<\/strong> (Customizer).<\/li>\n\n\n\n<li>Open <strong>Custom Codes<\/strong> and paste the snippet into the <strong>Before &lt;\/head&gt; tag<\/strong> field.<\/li>\n\n\n\n<li>Click <strong>Publish<\/strong>.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Check that data is coming in<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Open your website in a new tab, then go to <strong>Reports &gt; Realtime<\/strong> in Google Analytics. Your visit should appear within a minute or two. If it doesn\u2019t, clear your site and CDN cache and check that the tag is not blocked by an ad blocker.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Tip:<\/strong> add the tag in one place only. If a plugin such as Site Kit already adds Google Analytics, don\u2019t paste the snippet in Kata as well, or every visit will be counted twice. If your site needs visitor consent before tracking, set this up together with Kata\u2019s GDPR option or your consent tool.<\/p>\n\n\n\r\n<figure class=\"wp-block-image size-large\"><\/figure>\r\n<p><a href=\"https:\/\/webnus.net\/kata\/documentation\/wp-content\/uploads\/2020\/02\/kata-how-to-set-a-google-analytic-tool.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-2428\" src=\"https:\/\/webnus.net\/kata\/documentation\/wp-content\/uploads\/2020\/02\/kata-how-to-set-a-google-analytic-tool.jpg\" alt=\"Kata Customizer Custom Codes panel for adding a Google Analytics code on a hotel demo\" width=\"1024\" height=\"933\" srcset=\"https:\/\/webnus.net\/kata\/documentation\/wp-content\/uploads\/2020\/02\/kata-how-to-set-a-google-analytic-tool.jpg 1024w, https:\/\/webnus.net\/kata\/documentation\/wp-content\/uploads\/2020\/02\/kata-how-to-set-a-google-analytic-tool-300x273.jpg 300w, https:\/\/webnus.net\/kata\/documentation\/wp-content\/uploads\/2020\/02\/kata-how-to-set-a-google-analytic-tool-768x700.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>You can add Google Analytics 4 (GA4) to a Kata website without an extra plugin. You create a GA4 property, copy its Google tag, and paste the tag into Kata\u2019s Custom Codes option. The old Universal Analytics \u201cTracking ID\u201d (UA-XXXX) no longer collects data, so use a GA4 Measurement ID that starts with G-. Step [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":867,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-232","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-faq"],"_links":{"self":[{"href":"https:\/\/webnus.net\/kata\/documentation\/wp-json\/wp\/v2\/posts\/232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webnus.net\/kata\/documentation\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webnus.net\/kata\/documentation\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webnus.net\/kata\/documentation\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/webnus.net\/kata\/documentation\/wp-json\/wp\/v2\/comments?post=232"}],"version-history":[{"count":2,"href":"https:\/\/webnus.net\/kata\/documentation\/wp-json\/wp\/v2\/posts\/232\/revisions"}],"predecessor-version":[{"id":4160,"href":"https:\/\/webnus.net\/kata\/documentation\/wp-json\/wp\/v2\/posts\/232\/revisions\/4160"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webnus.net\/kata\/documentation\/wp-json\/wp\/v2\/media\/867"}],"wp:attachment":[{"href":"https:\/\/webnus.net\/kata\/documentation\/wp-json\/wp\/v2\/media?parent=232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webnus.net\/kata\/documentation\/wp-json\/wp\/v2\/categories?post=232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webnus.net\/kata\/documentation\/wp-json\/wp\/v2\/tags?post=232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}