{"id":3981,"date":"2026-07-23T09:38:14","date_gmt":"2026-07-23T09:38:14","guid":{"rendered":"https:\/\/disoh.com\/support\/how-to-add-google-analytics-to-a-wordpress-site\/"},"modified":"2026-07-23T09:38:14","modified_gmt":"2026-07-23T09:38:14","password":"","slug":"how-to-add-google-analytics-to-a-wordpress-site","status":"publish","type":"docs","link":"https:\/\/disoh.com\/sv\/support\/how-to-add-google-analytics-to-a-wordpress-site\/","title":{"rendered":"How to Add Google Analytics to a WordPress Site"},"content":{"rendered":"<p>Google Analytics shows you how many people visit your site, where they come from, and what they do. Adding it to WordPress lets you make decisions based on real data. This guide explains the options.<\/p>\n<h2>Step 1: Create a Google Analytics property<\/h2>\n<p>Sign in to Google Analytics, create an account and a property for your website, and get your measurement ID (it starts with G-). This ID connects your site to your analytics.<\/p>\n<h2>Step 2: Add it to WordPress<\/h2>\n<p>There are two common approaches:<\/p>\n<ul>\n<li><strong>With a plugin (easiest):<\/strong> install an analytics plugin, paste your measurement ID, and it handles the tracking code for you.<\/li>\n<li><strong>Via your theme:<\/strong> some themes have a field for your analytics ID or header scripts in their settings.<\/li>\n<\/ul>\n<h2>Using a plugin<\/h2>\n<ol>\n<li>Go to <strong>Plugins &gt; Add New<\/strong> and install a reputable analytics plugin.<\/li>\n<li>Activate it and open its settings.<\/li>\n<li>Connect your Google account or paste your measurement ID.<\/li>\n<li>Save.<\/li>\n<\/ol>\n<h2>Confirm it is working<\/h2>\n<p>Visit your site, then check the Realtime report in Google Analytics; you should see your own visit. Data for reports builds up over the following hours and days.<\/p>\n<h2>A note on privacy<\/h2>\n<p>If you have visitors in the EU, remember that analytics involves personal data. Add a privacy policy and a cookie consent banner, and configure analytics in line with GDPR expectations.<\/p>\n<h2>Troubleshooting<\/h2>\n<ul>\n<li><strong>No data:<\/strong> confirm the measurement ID is correct and caching is cleared.<\/li>\n<li><strong>Double counting:<\/strong> make sure the tracking code is only added once, not by both a plugin and the theme.<\/li>\n<\/ul>\n<h2>Need help?<\/h2>\n<p>If analytics is not tracking, our support team can help you check the setup over live chat.<\/p>","protected":false},"excerpt":{"rendered":"<p>Google Analytics shows you how many people visit your site, where they come from, and what they do. Adding it to WordPress lets you make decisions based on real data. This guide explains the options. Step 1: Create a Google Analytics property Sign in to Google Analytics, create an account and a property for your [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[32],"doc_tag":[],"class_list":["post-3981","docs","type-docs","status-publish","hentry","doc_category-wordpress"],"year_month":"2026-07","word_count":268,"total_views":"13","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"Jorn","author_nicename":"jorn","author_url":"https:\/\/disoh.com\/sv\/author\/jorn\/"},"doc_category_info":[{"term_name":"WordPress","term_url":"https:\/\/disoh.com\/sv\/docs-category\/wordpress\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Add Google Analytics to a WordPress Site &#8211; Disoh<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/disoh.com\/sv\/support\/how-to-add-google-analytics-to-a-wordpress-site\/\" \/>\n<meta property=\"og:locale\" content=\"sv_SE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Add Google Analytics to a WordPress Site &#8211; Disoh\" \/>\n<meta property=\"og:description\" content=\"Google Analytics shows you how many people visit your site, where they come from, and what they do. Adding it to WordPress lets you make decisions based on real data. This guide explains the options. Step 1: Create a Google Analytics property Sign in to Google Analytics, create an account and a property for your [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/disoh.com\/sv\/support\/how-to-add-google-analytics-to-a-wordpress-site\/\" \/>\n<meta property=\"og:site_name\" content=\"Disoh\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/disohhosting\" \/>\n<meta property=\"og:image\" content=\"https:\/\/disoh.com\/wp-content\/uploads\/2025\/07\/disoh_about.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1536\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Ber\u00e4knad l\u00e4stid\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minut\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/disoh.com\\\/support\\\/how-to-add-google-analytics-to-a-wordpress-site\\\/\",\"url\":\"https:\\\/\\\/disoh.com\\\/support\\\/how-to-add-google-analytics-to-a-wordpress-site\\\/\",\"name\":\"How to Add Google Analytics to a WordPress Site &#8211; Disoh\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/disoh.com\\\/#website\"},\"datePublished\":\"2026-07-23T09:38:14+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/disoh.com\\\/support\\\/how-to-add-google-analytics-to-a-wordpress-site\\\/#breadcrumb\"},\"inLanguage\":\"sv-SE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/disoh.com\\\/support\\\/how-to-add-google-analytics-to-a-wordpress-site\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/disoh.com\\\/support\\\/how-to-add-google-analytics-to-a-wordpress-site\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/disoh.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Add Google Analytics to a WordPress Site\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/disoh.com\\\/#website\",\"url\":\"https:\\\/\\\/disoh.com\\\/\",\"name\":\"Disoh\",\"description\":\"Digital Solutions Hosting\",\"publisher\":{\"@id\":\"https:\\\/\\\/disoh.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/disoh.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"sv-SE\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/disoh.com\\\/#organization\",\"name\":\"Disoh LLC\",\"url\":\"https:\\\/\\\/disoh.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"sv-SE\",\"@id\":\"https:\\\/\\\/disoh.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/disoh.com\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/favicon_1.svg\",\"contentUrl\":\"https:\\\/\\\/disoh.com\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/favicon_1.svg\",\"width\":615,\"height\":615,\"caption\":\"Disoh LLC\"},\"image\":{\"@id\":\"https:\\\/\\\/disoh.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/disohhosting\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Add Google Analytics to a WordPress Site &#8211; Disoh","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:\/\/disoh.com\/sv\/support\/how-to-add-google-analytics-to-a-wordpress-site\/","og_locale":"sv_SE","og_type":"article","og_title":"How to Add Google Analytics to a WordPress Site &#8211; Disoh","og_description":"Google Analytics shows you how many people visit your site, where they come from, and what they do. Adding it to WordPress lets you make decisions based on real data. This guide explains the options. Step 1: Create a Google Analytics property Sign in to Google Analytics, create an account and a property for your [&hellip;]","og_url":"https:\/\/disoh.com\/sv\/support\/how-to-add-google-analytics-to-a-wordpress-site\/","og_site_name":"Disoh","article_publisher":"https:\/\/www.facebook.com\/disohhosting","og_image":[{"width":1536,"height":1024,"url":"https:\/\/disoh.com\/wp-content\/uploads\/2025\/07\/disoh_about.webp","type":"image\/webp"}],"twitter_card":"summary_large_image","twitter_misc":{"Ber\u00e4knad l\u00e4stid":"1 minut"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/disoh.com\/support\/how-to-add-google-analytics-to-a-wordpress-site\/","url":"https:\/\/disoh.com\/support\/how-to-add-google-analytics-to-a-wordpress-site\/","name":"How to Add Google Analytics to a WordPress Site &#8211; Disoh","isPartOf":{"@id":"https:\/\/disoh.com\/#website"},"datePublished":"2026-07-23T09:38:14+00:00","breadcrumb":{"@id":"https:\/\/disoh.com\/support\/how-to-add-google-analytics-to-a-wordpress-site\/#breadcrumb"},"inLanguage":"sv-SE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/disoh.com\/support\/how-to-add-google-analytics-to-a-wordpress-site\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/disoh.com\/support\/how-to-add-google-analytics-to-a-wordpress-site\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/disoh.com\/"},{"@type":"ListItem","position":2,"name":"How to Add Google Analytics to a WordPress Site"}]},{"@type":"WebSite","@id":"https:\/\/disoh.com\/#website","url":"https:\/\/disoh.com\/","name":"Disoh","description":"Digitala l\u00f6sningar \u2013 webbhotell","publisher":{"@id":"https:\/\/disoh.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/disoh.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"sv-SE"},{"@type":"Organization","@id":"https:\/\/disoh.com\/#organization","name":"Disoh LLC","url":"https:\/\/disoh.com\/","logo":{"@type":"ImageObject","inLanguage":"sv-SE","@id":"https:\/\/disoh.com\/#\/schema\/logo\/image\/","url":"https:\/\/disoh.com\/wp-content\/uploads\/2025\/06\/favicon_1.svg","contentUrl":"https:\/\/disoh.com\/wp-content\/uploads\/2025\/06\/favicon_1.svg","width":615,"height":615,"caption":"Disoh LLC"},"image":{"@id":"https:\/\/disoh.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/disohhosting"]}]}},"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/disoh.com\/sv\/wp-json\/wp\/v2\/docs\/3981","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/disoh.com\/sv\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/disoh.com\/sv\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/disoh.com\/sv\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/disoh.com\/sv\/wp-json\/wp\/v2\/comments?post=3981"}],"version-history":[{"count":0,"href":"https:\/\/disoh.com\/sv\/wp-json\/wp\/v2\/docs\/3981\/revisions"}],"wp:attachment":[{"href":"https:\/\/disoh.com\/sv\/wp-json\/wp\/v2\/media?parent=3981"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/disoh.com\/sv\/wp-json\/wp\/v2\/doc_category?post=3981"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/disoh.com\/sv\/wp-json\/wp\/v2\/doc_tag?post=3981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}