Adding Google Analytics Code to PHP-Fusion

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:

  1. In the root of your PHP-Fusion files, edit the footer.php file. It is located in:
  2. Enter the code google provided in the footer.php file, and save it. The code should look something like this:

    &ltscript type=”text/javascript”>

    var _gaq = _gaq || [];
    _gaq.push([‘_setAccount’, ‘UA-XXXXX-Y’]);

    (function() {
    var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
    ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘https://www’) + ‘’;
    var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);

    Be sure to replace UA-XXXXX-Y with the actual code google provided you with.

Congratulations, now you know how to add a Google Analytics code to your PHP-Fusion website!

John-Paul Briones Content Writer II

John-Paul is an Electronics Engineer that spent most of his career in IT. He has been a Technical Writer for InMotion since 2013.

More Articles by John-Paul

Was this article helpful? Let us know!