How to Add Tracking Code To Wordpress


Adding a tracking code to a WordPress site is relatively quick and easy to do. Tracking codes can be used to monitor and analyze key performance metrics on your website traffic and advertising conversions. Learn how to add tracking code to your WordPress site and get a wealth of useful insights into your website visitors and what they are reading.

Things You'll Need

  • WordPress site
  • Tracking code (Google Analytics, etc.)
  • Obtain the tracking code that you'll need to install in your WordPress site from the monitoring site you intend to use. For example, to obtain tracking code for Google Analytics, open a browser and navigate to Create a Google account, if you don't already have one. Then, follow the on-screen prompts to generate custom tracking code for your WordPress site. Copy and paste this code into a text document for later use.

  • Browse to your WordPress site and log in to the dashboard. If you are the site administrator, just add "wp-login.php" (without the quotes) after the URL for your domain to navigate directly to the dashboard.

  • Open the WordPress file editor. Click "Appearance" on the toolbar and then click "Editor." As new versions of WordPress are released, the procedure for launching the file editor may vary slightly but should closely parallel the procedure described here. Refer to WordPress Help if you need assistance completing this step.

  • Open the footer file on your WordPress site for editing. Click on "Footer (footer.php)" to edit this file.

  • Scroll to the bottom of the "footer.php" file and look for the following HTML code:



  • Paste the tracking code that you generated in Step 1 into the document above the closing </body> tag. Click "Update File" below the text box to save your changes. The tracking code is now installed on your WordPress site. Navigate to the website that issued your tracking code (for example, Google Analytics) and follow the procedures on that site for logging in and accessing tracking reports on your WordPress site.

Tips & Warnings

  • Don't forget to click "Update File" to save.

Related Searches


  • Photo Credit Thinkstock Images/Comstock/Getty Images
Promoted By Zergnet


You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!