{"id":5774,"date":"2018-10-24T13:34:05","date_gmt":"2018-10-24T17:34:05","guid":{"rendered":"https:\/\/www.pair.com\/support\/kb\/?post_type=ht_kb&#038;p=5774"},"modified":"2025-08-15T12:57:46","modified_gmt":"2025-08-15T16:57:46","slug":"how-to-add-google-analytics-to-a-wordpress-site","status":"publish","type":"ht_kb","link":"https:\/\/www.pair.com\/support\/kb\/how-to-add-google-analytics-to-a-wordpress-site\/","title":{"rendered":"How to Add Google Analytics to a WordPress Site"},"content":{"rendered":"<p class=\"p1\"><span class=\"s1\"><a style=\"color:#fff; text-decoration:none!important;\" href=\"https:\/\/www.pair.com\/support\/kb\/tags\/wp-enthusiast\/\"><p class=\"\"style=\"background-color:#1a3d6e!important;color:#fff !important;padding:6px; display:inline-block!important;font-size:12px;font-weight:bold; border-radius:3px;\">WP Enthusiast<\/p><\/a> <a style=\"color:#fff; text-decoration:none!important;\" href=\"https:\/\/www.pair.com\/support\/kb\/tags\/wp-professional\/\"><p style=\"background-color:#1a3d6e !important;color:#fff !important;padding:6px; display:inline-block!important;font-size:12px;font-weight:bold; border-radius:3px;\">WP Professional<\/p><\/a> <a style=\"color:#fff; text-decoration:none!important;\" href=\"https:\/\/www.pair.com\/support\/kb\/tags\/wp-professional-plus\/\"><p style=\"background-color:#1a3d6e !important;color:#fff !important;padding:6px; display:inline-block!important;font-size:12px;font-weight:bold; border-radius:3px;\">WP Professional Plus<\/p><\/a> <a style=\"color:#fff; text-decoration:none!important;\" href=\"https:\/\/www.pair.com\/support\/kb\/tags\/pairsim-wordpress\/\"><p style=\"background-color:#1a3d6e !important;color:#fff !important;padding:6px; display:inline-block!important;font-size:12px;font-weight:bold; border-radius:3px;\">PairSIM WordPress<\/p><\/a><\/span><\/p>\n<p><span style=\"font-weight: 400;\">You can use Google Analytics to track visitors on your website. You can see what pages they are landing on, where they are navigating to, and when they leave. It can be invaluable knowledge to have when assessing your site. <\/span><a name=\"1\"><\/a><\/p>\n<h3>Set Up Google Analytics<\/h3>\n<p><span style=\"font-weight: 400;\">The first step is to set up the analytics on the Google end and get the tracking ID. <\/span><\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li style=\"font-weight: 400;\"><a href=\"https:\/\/analytics.google.com\/analytics\/web\/\"><span style=\"font-weight: 400;\">Sign in or create a Google Analytics account<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">In the left bottom of the sidebar, click <\/span><b>Admin<a href=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/analytics.png\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-5780 size-full\" src=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/analytics.png\" alt=\"admin interface image\" width=\"947\" height=\"667\" srcset=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/analytics.png 947w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/analytics-300x211.png 300w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/analytics-768x541.png 768w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/analytics-50x35.png 50w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/analytics-60x42.png 60w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/analytics-100x70.png 100w\" sizes=\"(max-width: 947px) 100vw, 947px\" \/><\/a><\/b><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">On the right side of the screen, select the account you would like to use or create a new account by clicking the <\/span><b>+ Create Account<\/b><span style=\"font-weight: 400;\"> button<a href=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/account.png\" data-rel=\"lightbox-image-1\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5781\" src=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/account.png\" alt=\"create account image\" width=\"737\" height=\"421\" srcset=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/account.png 737w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/account-300x171.png 300w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/account-50x29.png 50w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/account-60x34.png 60w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/account-100x57.png 100w\" sizes=\"(max-width: 737px) 100vw, 737px\" \/><\/a><\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Click the <\/span><b>+ Create Property <\/b><span style=\"font-weight: 400;\">button<a href=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/property-.png\" data-rel=\"lightbox-image-2\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5782\" src=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/property-.png\" alt=\"create property image\" width=\"737\" height=\"423\" srcset=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/property-.png 737w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/property--300x172.png 300w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/property--50x29.png 50w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/property--60x34.png 60w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/property--100x57.png 100w\" sizes=\"(max-width: 737px) 100vw, 737px\" \/><\/a><\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Select <\/span><b>Website<a href=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/website-property.png\" data-rel=\"lightbox-image-3\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5783\" src=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/website-property.png\" alt=\"website image\" width=\"617\" height=\"821\" srcset=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/website-property.png 617w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/website-property-225x300.png 225w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/website-property-38x50.png 38w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/website-property-45x60.png 45w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/website-property-75x100.png 75w\" sizes=\"(max-width: 617px) 100vw, 617px\" \/><\/a><\/b><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Enter the following information:<\/span>\n<ul>\n<li style=\"font-weight: 400;\"><b>Website Name<span style=\"font-weight: 400;\">: The name you will use to identify your site<\/span><\/b><\/li>\n<li style=\"font-weight: 400;\"><strong>Website URL<\/strong><span style=\"font-weight: 400;\">: The website\u2019s URL<\/span><\/li>\n<li style=\"font-weight: 400;\"><strong>Industry Category<\/strong><span style=\"font-weight: 400;\">: The type of industry that the website falls under<\/span><\/li>\n<li style=\"font-weight: 400;\"><strong>Reporting Time Zone<\/strong><span style=\"font-weight: 400;\">: This will determine the time displayed in analytics results<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400;\">Click the <b>Get Tracking ID<\/b> button<a href=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/get-tracking-id.png\" data-rel=\"lightbox-image-4\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5784\" src=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/get-tracking-id.png\" alt=\"get tracking id image\" width=\"482\" height=\"78\" srcset=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/get-tracking-id.png 482w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/get-tracking-id-300x49.png 300w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/get-tracking-id-50x8.png 50w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/get-tracking-id-60x10.png 60w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/get-tracking-id-100x16.png 100w\" sizes=\"(max-width: 482px) 100vw, 482px\" \/><\/a><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><a name=\"2\"><\/a>Copy the code on the next page, under the <\/span><b>Global Site Tag<\/b><span style=\"font-weight: 400;\"> header<a href=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/global-site-tag.png\" data-rel=\"lightbox-image-5\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5798\" src=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/global-site-tag.png\" alt=\"global site tag image\" width=\"1016\" height=\"535\" srcset=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/global-site-tag.png 1016w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/global-site-tag-300x158.png 300w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/global-site-tag-768x404.png 768w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/global-site-tag-50x26.png 50w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/global-site-tag-60x32.png 60w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/global-site-tag-100x53.png 100w\" sizes=\"(max-width: 1016px) 100vw, 1016px\" \/><\/a><\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">Keep this page open. You will need the code for the next step.<\/span><\/p>\n<h3>Add Analytics Code to WordPress Site<\/h3>\n<p><span style=\"font-weight: 400;\">The next step is to add the analytics code to your WordPress website. Because WordPress is a CMS, this process differs from adding code to a simple HTML site. <\/span><\/p>\n<h4>Go to the Theme\u2019s Function.php File<\/h4>\n<p><span style=\"font-weight: 400;\">We will be adding analytics code to the <\/span><i><span style=\"font-weight: 400;\">functions.php<\/span><\/i><span style=\"font-weight: 400;\"> file of your current theme, so you need to locate your <\/span><i><span style=\"font-weight: 400;\">functions.php<\/span><\/i><span style=\"font-weight: 400;\"> file. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">We recommend having a <\/span><a href=\"https:\/\/codex.wordpress.org\/Child_Themes\"><span style=\"font-weight: 400;\">child theme<\/span><\/a><span style=\"font-weight: 400;\"> before adding anything to the <\/span><i><span style=\"font-weight: 400;\">functions.php<\/span><\/i><span style=\"font-weight: 400;\"> file. If you do not have a child theme, theme updates will overwrite your changes.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">To find the theme\u2019s <\/span><i><span style=\"font-weight: 400;\">functions.php<\/span><\/i><span style=\"font-weight: 400;\"> file, follow these steps:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Log in to your WordPress site\u2019s admin interface<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">In the left sidebar, hover over <\/span><b>Appearance<\/b><span style=\"font-weight: 400;\">, click <\/span><b>Editor<\/b><span style=\"font-weight: 400;\"> in the drop-down<a href=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/editor.png\" data-rel=\"lightbox-image-6\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5785\" src=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/editor.png\" alt=\"editor image\" width=\"659\" height=\"539\" srcset=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/editor.png 659w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/editor-300x245.png 300w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/editor-50x41.png 50w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/editor-60x49.png 60w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/editor-100x82.png 100w\" sizes=\"(max-width: 659px) 100vw, 659px\" \/><\/a><\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">In the right sidebar, click <\/span><b>Theme Functions (functions.php)<a href=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/function-button.png\" data-rel=\"lightbox-image-7\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5786\" src=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/function-button.png\" alt=\"function button image\" width=\"793\" height=\"588\" srcset=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/function-button.png 793w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/function-button-300x222.png 300w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/function-button-768x569.png 768w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/function-button-50x37.png 50w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/function-button-60x44.png 60w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/function-button-100x74.png 100w\" sizes=\"(max-width: 793px) 100vw, 793px\" \/><\/a><\/b><\/li>\n<\/ol>\n<h4>Add Code to Your Functions.php File<\/h4>\n<p>After you have located your functions.php file, you need to add the analytics code to it.<\/p>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Paste the following code in the text field<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/p>\n<pre class=\"prettyprint\"><span style=\"font-weight: 400;\">&lt;?php<\/span>\n<span style=\"font-weight: 400;\">add_action('wp_head', 'pn_add_analytics');<\/span>\n<span style=\"font-weight: 400;\">function pn_add_analytics() { ?&gt;<\/span>\n\n<span style=\"font-weight: 400;\">&lt;!--Paste your Google Analytics code here--&gt;<\/span>\n\n<span style=\"font-weight: 400;\">&lt;?php } ?&gt;<\/span><\/pre>\n<\/li>\n<li>Underneath\u00a0<span style=\"font-weight: 400; font-family: monospace;\"><span style=\"color: #800000;\">&lt;!--Paste your Google Analytics code here--&gt;<\/span>,<\/span>\u00a0add the Google Analytics code that you got from the <a href=\"#2\">Set Up Google Analytics section<\/a><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Click <\/span><b>Update File<\/b><span style=\"font-weight: 400;\"> at the bottom of the page<a href=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/update-file.png\" data-rel=\"lightbox-image-8\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5787\" src=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/update-file.png\" alt=\"update file image\" width=\"890\" height=\"550\" srcset=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/update-file.png 890w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/update-file-300x185.png 300w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/update-file-768x475.png 768w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/update-file-50x31.png 50w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/update-file-60x37.png 60w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/update-file-100x62.png 100w\" sizes=\"(max-width: 890px) 100vw, 890px\" \/><\/a><\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">Once you have added the tracking code and updated the file, you can test to see if it\u2019s working by visiting the live site, then looking at the <\/span><b>REAL-TIME<\/b><span style=\"font-weight: 400;\"> page in the analytics interface. If working, it should show that a visitor is viewing the page.<a href=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/realtime.png\" data-rel=\"lightbox-image-9\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5789\" src=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/realtime.png\" alt=\"real time image\" width=\"961\" height=\"603\" srcset=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/realtime.png 961w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/realtime-300x188.png 300w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/realtime-768x482.png 768w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/realtime-50x31.png 50w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/realtime-60x38.png 60w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/realtime-100x63.png 100w\" sizes=\"(max-width: 961px) 100vw, 961px\" \/><\/a> <\/span><\/p>\n    \t\t<div class=\"hts-messages hts-messages--info   hts-messages--withicon \"   >\r\n    \t\t\t    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\tGoogle Analytics is provided by Google. Google Analytics is not a product of Pair Networks, Inc., and Pair Networks provides no warranty for Google Analytics.<\/p>\n<p>Please note that there are many levels of website analytics products available. Please consult with your IT professional for advice and guidance on an appropriate analytic tracker. This specific product may or may not meet your needs. Pair Networks, Inc. is providing support for this analytics tracker for your convenience and is not responsible for Google Analytics' performance.<\/p>\n<p>Please read carefully the terms and scope of services for any online service or product you are considering purchasing or using.    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n","protected":false},"excerpt":{"rendered":"<p>You can use Google Analytics to track visitors on your website. You can see what pages they are landing on, where they are navigating to, and when they leave. It can be invaluable knowledge to have when assessing your site. Set Up Google Analytics The first step is to set&#8230;<\/p>\n","protected":false},"author":11,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":[],"ht-kb-category":[195],"ht-kb-tag":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Add Google Analytics to a WordPress Site - Knowledge Base - Pair Networks<\/title>\n<meta name=\"description\" content=\"You can use Google Analytics to track visitors on your website. You can see how visitors are interacting with your WordPress site.\" \/>\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.pair.com\/support\/kb\/how-to-add-google-analytics-to-a-wordpress-site\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Add Google Analytics to a WordPress Site - Knowledge Base - Pair Networks\" \/>\n<meta property=\"og:description\" content=\"You can use Google Analytics to track visitors on your website. You can see how visitors are interacting with your WordPress site.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pair.com\/support\/kb\/how-to-add-google-analytics-to-a-wordpress-site\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base - Pair Networks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pairnetworks\/\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-15T16:57:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/analytics.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@pairNetworks\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/how-to-add-google-analytics-to-a-wordpress-site\/\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/how-to-add-google-analytics-to-a-wordpress-site\/\",\"name\":\"How to Add Google Analytics to a WordPress Site - Knowledge Base - Pair Networks\",\"isPartOf\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#website\"},\"datePublished\":\"2018-10-24T17:34:05+00:00\",\"dateModified\":\"2025-08-15T16:57:46+00:00\",\"description\":\"You can use Google Analytics to track visitors on your website. You can see how visitors are interacting with your WordPress site.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/how-to-add-google-analytics-to-a-wordpress-site\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pair.com\/support\/kb\/how-to-add-google-analytics-to-a-wordpress-site\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/how-to-add-google-analytics-to-a-wordpress-site\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pair.com\/support\/kb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Add Google Analytics to a WordPress Site\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#website\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/\",\"name\":\"Knowledge Base - Pair Networks\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pair.com\/support\/kb\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#organization\",\"name\":\"Pair Networks\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2022\/02\/Gb_TUkUE_400x400.jpeg\",\"contentUrl\":\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2022\/02\/Gb_TUkUE_400x400.jpeg\",\"width\":360,\"height\":360,\"caption\":\"Pair Networks\"},\"image\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/pairnetworks\/\",\"https:\/\/twitter.com\/pairNetworks\",\"https:\/\/www.instagram.com\/pairnetworks\/\",\"https:\/\/www.linkedin.com\/company\/2269676\/\",\"https:\/\/www.pinterest.com\/pairnetworksinc\/pins\/\",\"https:\/\/www.youtube.com\/user\/pairnetworks\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Add Google Analytics to a WordPress Site - Knowledge Base - Pair Networks","description":"You can use Google Analytics to track visitors on your website. You can see how visitors are interacting with your WordPress site.","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.pair.com\/support\/kb\/how-to-add-google-analytics-to-a-wordpress-site\/","og_locale":"en_US","og_type":"article","og_title":"How to Add Google Analytics to a WordPress Site - Knowledge Base - Pair Networks","og_description":"You can use Google Analytics to track visitors on your website. You can see how visitors are interacting with your WordPress site.","og_url":"https:\/\/www.pair.com\/support\/kb\/how-to-add-google-analytics-to-a-wordpress-site\/","og_site_name":"Knowledge Base - Pair Networks","article_publisher":"https:\/\/www.facebook.com\/pairnetworks\/","article_modified_time":"2025-08-15T16:57:46+00:00","og_image":[{"url":"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2018\/10\/analytics.png"}],"twitter_card":"summary_large_image","twitter_site":"@pairNetworks","twitter_misc":{"Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.pair.com\/support\/kb\/how-to-add-google-analytics-to-a-wordpress-site\/","url":"https:\/\/www.pair.com\/support\/kb\/how-to-add-google-analytics-to-a-wordpress-site\/","name":"How to Add Google Analytics to a WordPress Site - Knowledge Base - Pair Networks","isPartOf":{"@id":"https:\/\/www.pair.com\/support\/kb\/#website"},"datePublished":"2018-10-24T17:34:05+00:00","dateModified":"2025-08-15T16:57:46+00:00","description":"You can use Google Analytics to track visitors on your website. You can see how visitors are interacting with your WordPress site.","breadcrumb":{"@id":"https:\/\/www.pair.com\/support\/kb\/how-to-add-google-analytics-to-a-wordpress-site\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pair.com\/support\/kb\/how-to-add-google-analytics-to-a-wordpress-site\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pair.com\/support\/kb\/how-to-add-google-analytics-to-a-wordpress-site\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pair.com\/support\/kb\/"},{"@type":"ListItem","position":2,"name":"How to Add Google Analytics to a WordPress Site"}]},{"@type":"WebSite","@id":"https:\/\/www.pair.com\/support\/kb\/#website","url":"https:\/\/www.pair.com\/support\/kb\/","name":"Knowledge Base - Pair Networks","description":"","publisher":{"@id":"https:\/\/www.pair.com\/support\/kb\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pair.com\/support\/kb\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.pair.com\/support\/kb\/#organization","name":"Pair Networks","url":"https:\/\/www.pair.com\/support\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pair.com\/support\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2022\/02\/Gb_TUkUE_400x400.jpeg","contentUrl":"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2022\/02\/Gb_TUkUE_400x400.jpeg","width":360,"height":360,"caption":"Pair Networks"},"image":{"@id":"https:\/\/www.pair.com\/support\/kb\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/pairnetworks\/","https:\/\/twitter.com\/pairNetworks","https:\/\/www.instagram.com\/pairnetworks\/","https:\/\/www.linkedin.com\/company\/2269676\/","https:\/\/www.pinterest.com\/pairnetworksinc\/pins\/","https:\/\/www.youtube.com\/user\/pairnetworks"]}]}},"_links":{"self":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb\/5774"}],"collection":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/comments?post=5774"}],"version-history":[{"count":18,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb\/5774\/revisions"}],"predecessor-version":[{"id":10291,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb\/5774\/revisions\/10291"}],"wp:attachment":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/media?parent=5774"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=5774"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=5774"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}