Adding Your Google Analytics Tracking Code

The Total theme doesn’t really include a built-in setting just for Google tracking, it actually includes a better advanced panel for adding code into ANY theme hook plus the wp_head and the wp_footer WordPress hooks. Adding your Google tracking code to your site is easy, please follow the guide below.

1. Locate your tracking code:

Your tracking code is located in Google Analytics under the “Admin” panel. Make sure you are copying the Tracking Code and NOT the user id.

google-tracking-code

2. Add the code to your site:

You have a couple options for adding the code to your website.

a. Using the Total Custom Actions Panel

You can paste the code into the wp_head custom action field located at Theme Panel > Custom Actions. This will place the tracking code on all your pages in the header tag.

b. Using a Child theme

Alternatively you can use a child theme to add your code to your pages. This can be done by using the snippet below (added to the bottom of your child theme’s functions.php file):

add_action( 'wp_head', function() { ?>
   YOUR CODE GOES HERE
<?php } );

c. Or using a Plugin

There are TONS of plugins out there for adding Google Analytics to your site. Since we don't personally use any we can't recommend any specific one.