how to add google analytics to wordpress footer

how to add google analytics to wordpress footer

Google analytics became primary requirement of every websites. Google analytics provides every aspect of data with all type of user behavior and information. Where from user came to your site. How much time user spends on user website. which pages are most popular in your website.

Similarly wordpress is widely used for creating websites. So here in this article I will show you how to add google analytics in wordpress footer.

how to add google analytics to wordpress footer

Need google analytics account

First you need the google analytics account, If you don’t have than,  Go to the Google Analytics site and create a new account. There are many sites or check for YouTube video for getting the google analytics code from site.

Add Google Analytics script to Your WordPress Theme

Login to wordpress admin panel, Then goto “Appearance->editor” section. Then open footer.php file in editor. Before “” close tag put your google analytices code there. After adding analytics code save the file.

how to add google analytics to wordpress footer
how to add google analytics to wordpress footer

This is easiest step to add the google analytics to your wordpress theme.

There are many plugins which will give you facility to add google analytics to your wordpress site. Here we recommend you to use following wordpress plugin for adding the google analytics.

WP Google Analytics (https://wordpress.org/plugins/wp-google-analytics/)

how to add google analytics to wordpress footer
how to add google analytics to wordpress footer

WP Google Analytics makes it easy to track your site’s usage, with lots of helpful additional data.

Features:

  • Uses Google’s asynchronous tracking method which is faster and more reliable.
  • Automatically tracks site speed
  • Option to log outgoing links as events
  • Option to log 404 errors as events
  • Use custom variables in Google Analytics to track additional data on page views including:
    • Author
    • Categories
    • Tags
    • Context (such as home, category, post, author, etc)
    • Date
    • Logged in
    • Anything – Use the built-in filter to add your own!
  • Allows you to ignore any user roles (administrators, editors, authors, etc)

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

Leave a Reply

Your email address will not be published.