{"id":2504,"date":"2013-03-21T18:51:20","date_gmt":"2013-03-21T22:51:20","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2013\/03\/21\/adding-google-analytics-code-to-php-fusion\/"},"modified":"2022-03-11T11:26:16","modified_gmt":"2022-03-11T16:26:16","slug":"adding-google-analytics-code-to-php-fusion","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/","title":{"rendered":"Adding Google Analytics Code to PHP-Fusion"},"content":{"rendered":"<p>In this tutorial we will show you how to add a Google Analytics Tracking code to your PHP-Fusion Website. Google analytics allows you to view statistics regarding visitors to your website.<\/p>\n<h2>How to Add a Google Analytics Code:<\/h2>\n<ol class=\"article_list\">\n<li>In the root of your PHP-Fusion files, <a href=\"\/support\/website\/how-to-edit-a-file\/\">edit the footer.php<\/a> file. It is located in:<br \/>   \/themes\/templates\/footer.php<\/li>\n<li>Enter the code google provided in the footer.php file, and save it. The code should look something like this:<br \/> \n<p class=\"code_block\"> &amp;ltscript type=&#8221;text\/javascript&#8221;&gt;<\/p>\n<p>    var _gaq = _gaq || [];<br \/>   _gaq.push([&#8216;_setAccount&#8217;, &#8216;UA-XXXXX-Y&#8217;]);<br \/>   _gaq.push([&#8216;_trackPageview&#8217;]);<\/p>\n<p>    (function() {<br \/>     var ga = document.createElement(&#8216;script&#8217;); ga.type = &#8216;text\/javascript&#8217;; ga.async = true;<br \/>     ga.src = (&#8216;https:&#8217; == document.location.protocol ? &#8216;https:\/\/ssl&#8217; : &#8216;https:\/\/www&#8217;) + &#8216;.google-analytics.com\/ga.js&#8217;;<br \/>     var s = document.getElementsByTagName(&#8216;script&#8217;)[0]; s.parentNode.insertBefore(ga, s);<br \/>      })();<br \/>     &lt;\/script&gt;<\/p>\n<p>     Be sure to replace <strong>UA-XXXXX-Y<\/strong> with the actual code google provided you with.   <\/li>\n<\/ol>\n<p>      Congratulations, now you know how to add a Google Analytics code to your PHP-Fusion website!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial we will show you how to add a Google Analytics Tracking code to your PHP-Fusion Website. Google analytics allows you to view statistics regarding visitors to your website. How to Add a Google Analytics Code: In the root of your PHP-Fusion files, edit the footer.php file. It is located in: \/themes\/templates\/footer.php Enter<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/\"> Read More ><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[109],"tags":[],"class_list":["post-2504","post","type-post","status-publish","format-standard","hentry","category-php-fusion"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Adding Google Analytics Code to PHP-Fusion | InMotion Hosting<\/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:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Adding Google Analytics Code to PHP-Fusion | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"In this tutorial we will show you how to add a Google Analytics Tracking code to your PHP-Fusion Website. Google analytics allows you to view statistics regarding visitors to your website. How to Add a Google Analytics Code: In the root of your PHP-Fusion files, edit the footer.php file. It is located in: \/themes\/templates\/footer.php Enter Read More &gt;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2013-03-21T22:51:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-11T16:26:16+00:00\" \/>\n<meta name=\"author\" content=\"InMotion Hosting Contributor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InMotion Hosting Contributor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/\"},\"author\":{\"name\":\"InMotion Hosting Contributor\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5fbfcaed32a2672fb83ab312f5b7237b\"},\"headline\":\"Adding Google Analytics Code to PHP-Fusion\",\"datePublished\":\"2013-03-21T22:51:20+00:00\",\"dateModified\":\"2022-03-11T16:26:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/\"},\"wordCount\":168,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"PHP-Fusion\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/\",\"name\":\"Adding Google Analytics Code to PHP-Fusion | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2013-03-21T22:51:20+00:00\",\"dateModified\":\"2022-03-11T16:26:16+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Adding Google Analytics Code to PHP-Fusion\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5fbfcaed32a2672fb83ab312f5b7237b\",\"name\":\"InMotion Hosting Contributor\",\"description\":\"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!\",\"sameAs\":[\"https:\/\/www.linkedin.com\/company\/inmotion-hosting\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/john-paul\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Adding Google Analytics Code to PHP-Fusion | InMotion Hosting","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.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/","og_locale":"en_US","og_type":"article","og_title":"Adding Google Analytics Code to PHP-Fusion | InMotion Hosting","og_description":"In this tutorial we will show you how to add a Google Analytics Tracking code to your PHP-Fusion Website. Google analytics allows you to view statistics regarding visitors to your website. How to Add a Google Analytics Code: In the root of your PHP-Fusion files, edit the footer.php file. It is located in: \/themes\/templates\/footer.php Enter Read More >","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2013-03-21T22:51:20+00:00","article_modified_time":"2022-03-11T16:26:16+00:00","author":"InMotion Hosting Contributor","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"InMotion Hosting Contributor","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/"},"author":{"name":"InMotion Hosting Contributor","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5fbfcaed32a2672fb83ab312f5b7237b"},"headline":"Adding Google Analytics Code to PHP-Fusion","datePublished":"2013-03-21T22:51:20+00:00","dateModified":"2022-03-11T16:26:16+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/"},"wordCount":168,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["PHP-Fusion"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/","name":"Adding Google Analytics Code to PHP-Fusion | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2013-03-21T22:51:20+00:00","dateModified":"2022-03-11T16:26:16+00:00","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/php-fusion\/adding-google-analytics-code-to-php-fusion\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"Adding Google Analytics Code to PHP-Fusion"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5fbfcaed32a2672fb83ab312f5b7237b","name":"InMotion Hosting Contributor","description":"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!","sameAs":["https:\/\/www.linkedin.com\/company\/inmotion-hosting\/","https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/john-paul\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/2504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=2504"}],"version-history":[{"count":2,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/2504\/revisions"}],"predecessor-version":[{"id":84768,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/2504\/revisions\/84768"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=2504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=2504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=2504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}