In this article, we'll show you how you can include your Google Analytics tracking code with PHP. Be sure to check out our full guide on signing up for <a href="/support/website/google-tools/creating-google-analytics-account/">Google Analytics</a>. </p> <p> In order for these steps to work properly, your site should already be coded with PHP. For most content management systems (like WordPress or Joomla), this is already the standard. If you are unsure about whether or not your site is coded with PHP, be sure to check with your developer. </p> <p> The reason you will need PHP is because we will be using an "include" code. This means we will be including the code from one file into another. PHP is required in order to accomplish this. </p> <ol class="article_list"> <li>Copy your tracking code from Google</li> <li> <a href="/support/website/create-new-file/">Create a new file</a> in your <a href="/support/website/where-to-upload-files/">document root</a> called gtag.txt (you can name this file anything you want, this is only an example)</li> <li>Paste your Google tracking script in the <em>gtag.txt</em> file</li> <li>Insert this code into your website's index file (typically <code>index.php</code>:<br/><pre class="code_block"><?php include_once "gtag.txt";?></pre></li> </ol> <br/> <p> This code "includes" the content of your "gtag" file in your site's code. If you index file loads on every page (as it does in a CMS like WordPress), the tracking code will also load on every page.