Home>Support>How to add google analytics code Manually in the footer

How to add google analytics code Manually in the footer

By Jürgen, 6 years ago. Last reply by vikramp, 6 years ago.

Hi there,

How can I add google analytics code MANUALLY in the footer (or header) without using a plugin?

In the Dashbord / Design / Editor I have only access to the (child) style.css. No access to footer.php or header.php …

I’m an absolutely wordpress newbie, so this question is also for better understanding how the child theme is working.

Thanks for your help

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 6 years, 10 months ago Daniel Hi, I Work Here

    Hi Jürgen

    First of all ensure that you have a WordPress Admin Access/Account.

    Copy the tracking code. Go to your WordPress Admin and then Appearance > Editor.

    Open your theme’s header.php file and directory underneath the tag, paste the tracking code. Click “Update File”.

    That’s all that is required.

    To confirm that it is working, go back to your Google Analytics account. Click on “Admin” at the top of the page and under “Property” choose your site and then click “Tracking Info”.

    If the Tracking Status is “Receiving Data,” then you have successfully added Google Analytics to your site.

    Cheers

  2. 6 years, 10 months ago Jürgen

    Thanks.

    Meanwhile I figured out that I first have to copy the header.php and footer.php from the main theme into my child theme folder. Then I can edit the footer or header.php as discribed. Thank you Addo.

    Bye

  3. 6 years, 10 months ago Andrew Misplon Hi, I Work Here

    Hi Jürgen

    Super, glad that did the trick.

    If you decide you want to go the plugin route I quite like this plugin:

    https://wordpress.org/plugins/googleanalytics/

    It’s super simple, just one field for your tracking ID.

    All the best.

  4. 6 years, 1 month ago vikramp

    You have correctly pointed out the steps to add google analytics code to theme, but if theme is upgraded user have to do it again so its better to add by creating a simple plugin. You can refer http://techosaurs.com/how-to-add-google-analytics-to-wordpress/ for steps on how to add google analytics code using a simple plugin.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More