<p>{"id":17458,"date":"2026-05-07T11:48:31","date_gmt":"2026-05-07T11:48:31","guid":{"rendered":"https:\/\/siteskyline.com\/?p=17458"},"modified":"2026-05-08T06:17:00","modified_gmt":"2026-05-08T06:17:00","slug":"add-google-analytics-wordpress-no-plugin","status":"publish","type":"post","link":"https:\/\/siteskyline.com\/ru\/add-google-analytics-wordpress-no-plugin\/","title":{"rendered":"</p><p>\u041a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c Google Analytics \u0432 WordPress \u0431\u0435\u0437 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 (\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c)&lt;\/p&gt;"},"content":{"rendered":"</p><p class='\"wp-block-paragraph\"'>\u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e <a href="%5C%22https:%5C/%5C/siteskyline.com%5C/ru%5C/optimize-wordpress-speed-without-plugins%5C/%5C%22">\u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e WordPress&lt;\/a&gt; start the same way: adding &ldquo;just one more plugin&rdquo; for a basic task.&lt;\/p&gt;<p class='\"wp-block-paragraph\"'>When you install a Google Analytics plugin&mdash;even the popular ones like MonsterInsights or Site Kit&mdash;you aren&rsquo;t just getting tracking. You&rsquo;re injecting extra database tables, dashboard widgets, marketing popups, and sometimes dozens of additional database queries into your WordPress backend.&lt;\/p&gt;</p><p class='\"wp-block-paragraph\"'>\u0418 \u0432\u0441\u0435 \u044d\u0442\u043e \u0440\u0430\u0434\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 73 \u041a\u0411, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430 3 \u043c\u0438\u043d\u0443\u0442\u044b.&lt;\/p&gt;</p><p class='\"wp-block-paragraph\"'>\u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0432\u043e\u043b\u043d\u0443\u044e\u0442 <a href="%5C%22https:%5C/%5C/siteskyline.com%5C/ru%5C/wordpress-technical-seo-guide%5C/%5C%22">Core Web Vitals&lt;\/a&gt;, \u0432\u0440\u0435\u043c\u044f \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0431\u0430\u0439\u0442\u0430 (TTFB) \u0438 \u0447\u0438\u0441\u0442\u043e\u0442\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430, \u0440\u0443\u0447\u043d\u043e\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 Google Analytics \u2014 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u0435\u0440\u043d\u044b\u0439 \u043f\u0443\u0442\u044c.&lt;\/p&gt;<p class='\"wp-block-paragraph\"'>\u042d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0432\u0430\u043c, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c Google Analytics 4 (GA4) \u043d\u0430 \u0432\u0430\u0448 <a href="%5C%22https:%5C/%5C/siteskyline.com%5C/ru%5C/wordpress-org-vs-wordpress-com%5C/%5C%22">\u0441\u0430\u0439\u0442 \u043d\u0430 WordPress&lt;\/a&gt; \u0431\u0435\u0437 \u043f\u043b\u0430\u0433\u0438\u043d\u0430, \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u044f, \u0447\u0442\u043e \u043e\u043d \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043c\u043e\u043b\u043d\u0438\u0435\u043d\u043e\u0441\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u043c.&lt;\/p&gt;<hr class='\"wp-block-separator' has-alpha-channel-opacity><h2 class='\"wp-block-heading\"'>\u041f\u043e\u0447\u0435\u043c\u0443 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438? \u0426\u0435\u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438&lt;\/h2&gt;</h2><p class='\"wp-block-paragraph\"'>Before we look at the code, let&rsquo;s look at the data. Why go through the trouble of manual installation?&lt;\/p&gt;</p><ol class='\"wp-block-list\"'>\n<li><strong>\u0420\u0430\u0437\u0434\u0443\u0432\u0430\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445:&lt;\/strong&gt;&nbsp;\u041f\u043b\u0430\u0433\u0438\u043d\u044b \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0447\u0430\u0441\u0442\u043e \u0445\u0440\u0430\u043d\u044f\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043a\u044d\u0448\u0438\u0440\u0443\u044e\u0442 \u043e\u0442\u0447\u0435\u0442\u044b \u0432 \u0432\u0430\u0448\u0435\u0439&nbsp;<code data-no-translation='\"\"' data-no-auto-translation='\"\"'>wp_options&lt;\/code&gt;&nbsp;\u0442\u0430\u0431\u043b\u0438\u0446\u0435. \u0421\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u044d\u0442\u043e \u0437\u0430\u043c\u0435\u0434\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.&lt;\/li&gt;\n\n\n\n<li><strong>\u041d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430:&lt;\/strong&gt;&nbsp;\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f WordPress \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0412\u0430\u0448\u0430 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430, \u0430 \u043d\u0435 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0430\u043d\u0435\u043b\u044c Google Analytics.&lt;\/li&gt;\n\n\n\n<li><strong>\u041d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434:&lt;\/strong&gt;&nbsp;\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442 \u0441\u0432\u043e\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 CSS \u0438\u043b\u0438 JS \u0444\u0430\u0439\u043b\u044b \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043a\u043e\u0434\u043e\u043c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f Google, \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u0432\u043e\u0438\u0445 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0439.&lt;\/li&gt;\n\n\n\n<li><strong>\u041f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044c \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438:&lt;\/strong&gt;&nbsp;\u041a\u0430\u0436\u0434\u044b\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u043c\u0438 \u043f\u043b\u0430\u0433\u0438\u043d \u2014 \u044d\u0442\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0438\u0441\u043a \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.&lt;\/li&gt;\n&lt;\/ol&gt;<p class='\"wp-block-paragraph\"'>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0440\u0443\u0447\u043d\u043e\u0439 \u043c\u0435\u0442\u043e\u0434, \u0432\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0440\u043e\u0432\u043d\u043e&nbsp;<strong>\u043d\u043e\u043b\u044c&lt;\/strong&gt;&nbsp;\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440.&lt;\/p&gt;<hr class='\"wp-block-separator' has-alpha-channel-opacity><h2 class='\"wp-block-heading\"'>\u0428\u0430\u0433 1: \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0432\u0430\u0448 \u043a\u043e\u0434 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f GA4&lt;\/h2&gt;</h2><p class='\"wp-block-paragraph\"'>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 WordPress, \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0432\u0430\u0448 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u0433 Google.&lt;\/p&gt;</p><ol class='\"wp-block-list\"'>\n<li>\u0412\u043e\u0439\u0434\u0438\u0442\u0435 \u0432 \u0441\u0432\u043e\u0439&nbsp;<a href="%5C%22https:%5C/%5C/analytics.google.com%5C/%5C%22" target='\"_blank\"' rel='\"noreferrer' noopener nofollow>Google Analytics&lt;\/a&gt;&nbsp;\u0430\u043a\u043a\u0430\u0443\u043d\u0442.&lt;\/li&gt;\n\n\n\n<li>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443&nbsp;<strong>\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440&lt;\/strong&gt;&nbsp;\u0437\u043d\u0430\u0447\u043e\u043a \u0448\u0435\u0441\u0442\u0435\u0440\u0435\u043d\u043a\u0438 \u0432 \u043b\u0435\u0432\u043e\u043c \u043d\u0438\u0436\u043d\u0435\u043c \u0443\u0433\u043b\u0443.&lt;\/li&gt;\n\n\n\n<li>\u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430&nbsp;<strong>\u041f\u043e\u0442\u043e\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445&lt;\/strong&gt;.&lt;\/li&gt;\n\n\n\n<li>Select your website&rsquo;s data stream.&lt;\/li&gt;\n\n\n\n</li><li>\u041f\u0440\u043e\u043a\u0440\u0443\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u0437 \u0434\u043e&nbsp;<strong>\u0422\u0435\u0433 Google&lt;\/strong&gt;&nbsp;\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435&nbsp;<strong>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0442\u0435\u0433\u0430&lt;\/strong&gt;.&lt;\/li&gt;\n\n\n\n<li>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443&nbsp;<strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e&lt;\/strong&gt;&nbsp;\u0432\u043a\u043b\u0430\u0434\u043a\u0430.&lt;\/li&gt;\n&lt;\/ol&gt;<p class='\"wp-block-paragraph\"'>\u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:&lt;\/p&gt;</p><pre class='\"wp-block-code\"' data-no-translation='\"\"' data-no-auto-translation='\"\"'><code data-no-translation='\"\"' data-no-auto-translation='\"\"'>&amp;lt;!-- Google tag (gtag.js) --&amp;gt;\n&amp;lt;script async src=\"https:\/\/www.googletagmanager.com\/gtag\/js?id=G-XXXXXXXXXX\"&gt;&amp;lt;\/script&gt;\n&amp;lt;script&gt;\n  window.dataLayer = window.dataLayer || [];\n  function gtag(){dataLayer.push(arguments);}\n  gtag('js', new Date());\n\n  gtag('config', 'G-XXXXXXXXXX');\n&amp;lt;\/script&gt;\n&lt;\/code&gt;&lt;\/pre&gt;<p class='\"wp-block-paragraph\"'>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0432\u0435\u0441\u044c \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0430.&lt;\/p&gt;</p><hr class='\"wp-block-separator' has-alpha-channel-opacity><h2 class='\"wp-block-heading\"'>\u0428\u0430\u0433 2: \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f&nbsp;<code data-no-translation='\"\"' data-no-auto-translation='\"\"'>functions.php&lt;\/code&gt;)&lt;\/h2&gt;<p class='\"wp-block-paragraph\"'>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0430 \u0432\u0430\u0448 \u0441\u0430\u0439\u0442. \u041c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434&nbsp;<strong>functions.php&lt;\/strong&gt;&nbsp;method.&lt;\/p&gt;<p class='\"wp-block-paragraph\"'><em>\u041f\u043e\u0447\u0435\u043c\u0443?&lt;\/em&gt;&nbsp;\u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u044f\u043c\u043e\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0430\u0448\u0435\u0433\u043e&nbsp;<code data-no-translation='\"\"' data-no-auto-translation='\"\"'>header.php&lt;\/code&gt;&nbsp;\u0444\u0430\u0439\u043b\u0430 \u043d\u0435\u043d\u0430\u0434\u0435\u0436\u043d\u043e. \u0415\u0441\u043b\u0438 \u0432\u044b \u0441\u043c\u0435\u043d\u0438\u0442\u0435 \u0442\u0435\u043c\u0443 \u0438\u043b\u0438 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0435\u0435, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u043e\u0447\u0435\u0440\u043d\u044e\u044e \u0442\u0435\u043c\u0443, \u0432\u0430\u0448 \u043a\u043e\u0434 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0435\u043d.&lt;\/p&gt;<p class='\"wp-block-paragraph\"'>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0445\u0443\u043a\u043e\u0432 WordPress \u0432 \u0432\u0430\u0448\u0435\u043c&nbsp;<code data-no-translation='\"\"' data-no-auto-translation='\"\"'>functions.php&lt;\/code&gt;&nbsp;\u0444\u0430\u0439\u043b\u0435 \u2014 \u044d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0447\u0438\u0441\u0442\u044b\u0439, \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0434\u043b\u044f \u0438\u043d\u0434\u0443\u0441\u0442\u0440\u0438\u0438 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430.&lt;\/p&gt;<p class='\"wp-block-paragraph\"'><strong>\u0412\u0430\u0436\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435:&lt;\/strong&gt;&nbsp;\u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0447\u0435\u0440\u043d\u044e\u044e \u0442\u0435\u043c\u0443. \u0415\u0441\u043b\u0438 \u0432\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u044d\u0442\u043e \u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u0442\u0435\u043c\u0443, \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u043d \u043f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0442\u0435\u043c\u044b.&lt;\/p&gt;<ol class='\"wp-block-list\"'>\n<li>\u0412\u043e\u0439\u0434\u0438\u0442\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c WordPress.&lt;\/li&gt;\n\n\n\n</li><li>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b&nbsp;<strong>Appearance &gt; Theme File Editor&lt;\/strong&gt;.&lt;\/li&gt;\n\n\n\n<li>On the right-hand side under &ldquo;Theme Files&rdquo;, select&nbsp;<strong>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0442\u0435\u043c\u044b (<code data-no-translation='\"\"' data-no-auto-translation='\"\"'>functions.php&lt;\/code&gt;)&lt;\/strong&gt;.&lt;\/li&gt;\n\n\n\n<li>\u041f\u0440\u043e\u043a\u0440\u0443\u0442\u0438\u0442\u0435 \u0434\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0438\u0437\u0430 \u0444\u0430\u0439\u043b\u0430.&lt;\/li&gt;\n\n\n\n</li><li>\u0412\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 PHP-\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442, \u0437\u0430\u043c\u0435\u043d\u0438\u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439-\u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c \u043d\u0430 \u0432\u0430\u0448 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 GA4:&lt;\/li&gt;\n&lt;\/ol&gt;<pre class='\"wp-block-code\"' data-no-translation='\"\"' data-no-auto-translation='\"\"'><code data-no-translation='\"\"' data-no-auto-translation='\"\"'>\/**\n * Add Google Analytics to WordPress header safely.\n *\/\nadd_action('wp_head', 'insert_custom_google_analytics', 20);\n\nfunction insert_custom_google_analytics() ?&amp;gt;\n    &amp;lt;!-- PASTE YOUR GOOGLE TAG CODE HERE --&amp;gt;\n    &amp;lt;!-- Google tag (gtag.js) --&amp;gt;\n    &amp;lt;script async src=\"https:\/\/www.googletagmanager.com\/gtag\/js?id=G-XXXXXXXXXX\"&gt;&amp;lt;\/script&gt;\n    &amp;lt;script&gt;\n      window.dataLayer = window.dataLayer || [];\n      function gtag(){dataLayer.push(arguments);}\n      gtag('js', new Date());\n\n      gtag('config', 'G-XXXXXXXXXX');\n    &amp;lt;\/script&gt;\n&amp;lt;?php }\n&lt;\/code&gt;&lt;\/pre&gt;<h3 class='\"wp-block-heading\"'>Let&rsquo;s Break Down Why This Snippet is Optimized:&lt;\/h3&gt;<ul class='\"wp-block-list\"'>\n<li><code data-no-translation='\"\"' data-no-auto-translation='\"\"'>add_action('wp_head', ...)&lt;\/code&gt;: This hooks into WordPress right before the&nbsp;&nbsp;&amp;lt;\/head&amp;gt; tag closes, ensuring the script loads early enough to track bounces, but doesn&rsquo;t break your page structure.&lt;\/li&gt;\n\n\n\n<li><code data-no-translation='\"\"' data-no-auto-translation='\"\"'>20&lt;\/code&gt;: \u042d\u0442\u043e \u043d\u043e\u043c\u0435\u0440 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0430. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432 \u0435\u0433\u043e \u043d\u0430 20 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 10), \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c WordPress \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u044d\u0442\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e&nbsp;<em>\u043f\u043e\u0437\u0436\u0435&lt;\/em&gt;&nbsp;\u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430, \u043e\u0442\u0434\u0430\u0432\u0430\u044f \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0432\u0430\u0448\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c CSS \u0438 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u044b\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c \u0442\u0435\u043c\u044b.&lt;\/li&gt;\n\n\n\n<li><code data-no-translation='\"\"' data-no-auto-translation='\"\"'>async&lt;\/code&gt;: \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442&nbsp;<code data-no-translation='\"\"' data-no-auto-translation='\"\"'>async&lt;\/code&gt;&nbsp;\u0432 \u0442\u0435\u0433\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 Google. \u042d\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0443 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0432 \u0444\u043e\u043d\u043e\u0432\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0443 \u0432\u0430\u0448\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.&lt;\/li&gt;\n&lt;\/ul&gt;<p class='\"wp-block-paragraph\"'>\u041f\u043e\u0441\u043b\u0435 \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435&nbsp;<strong>\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0444\u0430\u0439\u043b&lt;\/strong&gt;.&lt;\/p&gt;<hr class='\"wp-block-separator' has-alpha-channel-opacity><h2 class='\"wp-block-heading\"'>Step 3: Verify It&rsquo;s Working (Without Waiting 24 Hours)&lt;\/h2&gt;</h2><p class='\"wp-block-paragraph\"'>You don&rsquo;t need to wait a day to see if you installed it correctly.&lt;\/p&gt;</p><ol class='\"wp-block-list\"'>\n<li>Open a new &ldquo;Incognito&rdquo; or &ldquo;Private Browsing&rdquo; window.&lt;\/li&gt;\n\n\n\n</li><li>Go to your website&rsquo;s homepage and click around a few pages.&lt;\/li&gt;\n\n\n\n</li><li>\u0412\u0435\u0440\u043d\u0438\u0442\u0435\u0441\u044c \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Google Analytics.&lt;\/li&gt;\n\n\n\n</li><li>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b&nbsp;<strong>Reports &gt; Realtime&lt;\/strong&gt;.&lt;\/li&gt;\n&lt;\/ol&gt;<p class='\"wp-block-paragraph\"'>\u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c&nbsp;<code data-no-translation='\"\"' data-no-auto-translation='\"\"'>1&lt;\/code&gt;&nbsp;active user on your site. If you do, congratulations&mdash;you&rsquo;ve successfully implemented GA4 with zero plugin bloat.&lt;\/p&gt;<hr class='\"wp-block-separator' has-alpha-channel-opacity><h2 class='\"wp-block-heading\"'>\u0418\u0442\u043e\u0433: \u0431\u043e\u043b\u0435\u0435 \u043b\u0435\u0433\u043a\u0438\u0439 WordPress&lt;\/h2&gt;</h2><p class='\"wp-block-paragraph\"'>Adding Google Analytics without a plugin isn&rsquo;t just about saving a few bytes; it&rsquo;s an architectural mindset. By keeping third-party marketing tools out of your WordPress database and admin panel, you maintain a cleaner, faster, and more secure website.&lt;\/p&gt;</p><p class='\"wp-block-paragraph\"'>\u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442\u0435 \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0438\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u0447\u0438\u0441\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0438\u0437 10 \u0441\u0442\u0440\u043e\u043a, \u0432\u0430\u0448 \u0441\u0430\u0439\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u0410 \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c SEO \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u2014 \u044d\u0442\u043e \u0432\u0441\u0435.&lt;\/p&gt;","protected":false},"excerpt":{"rendered":"</p><p>Most WordPress performance issues start the same way: adding &ldquo;just one more plugin&rdquo; for a basic task. When you install a Google Analytics plugin\u2014even the popular ones like MonsterInsights or Site Kit\u2014you aren&rsquo;t just getting tracking. You&rsquo;re injecting extra database tables, dashboard widgets, marketing popups, and sometimes dozens of additional database queries into your WordPress [&hellip;]&lt;\/p&gt;\n","protected":false},"author":2,"featured_media":17461,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_sky_seo_title":"Add Google Analytics to WordPress Without a Plugin (Fast)","_sky_seo_description":"Learn how to safely add Google Analytics to WordPress without a plugin. Avoid\n  database bloat, keep your site fast, and easily install GA4 in minutes.","_sky_seo_og_title":"","_sky_seo_og_description":"","_sky_seo_og_image":"","_sky_seo_twitter_title":"","_sky_seo_twitter_description":"","_sky_seo_twitter_image":"","_sky_seo_noindex":"","_sky_seo_nofollow":"","_sky_seo_focus_keywords":"","_sky_seo_score":35,"_sky_seo_cornerstone":"","_skyseo_schema_custom_data":"","_skyseo_additional_schemas":"","_sky_seo_synonyms":"","_sky_seo_facebook_overlay":"","_sky_seo_twitter_overlay":"","footnotes":""},"categories":[758],"tags":[],"class_list":["post-17458","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/siteskyline.com\/ru\/wp-json\/wp\/v2\/posts\/17458","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/siteskyline.com\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/siteskyline.com\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/siteskyline.com\/ru\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/siteskyline.com\/ru\/wp-json\/wp\/v2\/comments?post=17458"}],"version-history":[{"count":18,"href":"https:\/\/siteskyline.com\/ru\/wp-json\/wp\/v2\/posts\/17458\/revisions"}],"predecessor-version":[{"id":17494,"href":"https:\/\/siteskyline.com\/ru\/wp-json\/wp\/v2\/posts\/17458\/revisions\/17494"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/siteskyline.com\/ru\/wp-json\/wp\/v2\/media\/17461"}],"wp:attachment":[{"href":"https:\/\/siteskyline.com\/ru\/wp-json\/wp\/v2\/media?parent=17458"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/siteskyline.com\/ru\/wp-json\/wp\/v2\/categories?post=17458"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/siteskyline.com\/ru\/wp-json\/wp\/v2\/tags?post=17458"}],"curies":[{"name":"</p><p>wp&lt;\/p&gt;","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}</p></code></p></strong></li></ol></strong></p></code></code></li></em></code></li></code></li></ul></h3></code></pre></li></code></strong></li></strong></li></ol></strong></p></code></p></code></em></p></strong></p></code></h2></code></pre></strong></li></strong></strong></li></strong></li></strong></li></a></li></ol></strong></p></strong></li></strong></li></strong></li></code></strong></li></ol></a></p></a></p></a></p>
