Install the Google Analytics Add-On

Before you use the MashShare Google Analytics Add-On make sure that you have already installed the Google Analytics Code into your site:

Sign-up with Google Analytics


First you need to create a Google Analytics account. To do this, visit  Google Analytics Signup Page.

If you already have a Gmail account, then use that to sign-in. If you do not have a Gmail account, then you you need to create a new account.

Once you sign-in with your Gmail account, you will be prompted to a new screen This is where you will sign-up for Google Analytics with your Gmail account.

On the next screen, you will be given choice to choose between website or mobile APP. Make sure website is selected.

Rest of the information required on the page are quite self-explanatory. You enter your Website’s URL, account name (anything that you like), country, and the time zone.

Once you have entered this information click on the Get Tracking ID button. You will be presented with Google Analytics terms and service which you must agree to, so click on I Agree button.


Now you see a new screen with Google Analytics tracking code. Copy this tracking code for entering it in your WordPress site.

Leave the Google Analytics browser tab open as you will need to revisit it after pasting the code on your WordPress site.

How to Install Google Analytics in WordPress

There are 3 methods to install Google analytics in WordPress. Direct paste, functions.php, and plugins.

Plugins Method (Recommended)

There are tons of plugins available to add Google Analytics to your site. However, it is probably best to just use a simple small plugin like: Insert Header and Footer

Paste the Google Analytics code into the plugin’s setting page.

Paste Method

Copy the code that you received in Step 4, and paste it in your theme’s header.php right after the <body> tag.

Functions.php Method


Only use this method this if you know what you are doing

Add the following code in your theme’s functions.php file and don’t forget to paste your Google Analytics code from Step 4 here. Before you paste it, please make sure that you have read the Beginner’s Guide to Pasting Snippets from the Web by

    add_action('wp_footer', 'prefix_add_google_analytics');
    function prefix_add_google_analytics() { ?>
        // Paste your Google Analytics code  4 here
<?php } ?>


Do not forget to change 'prefix' to something unique e.g your site name.

You can now click on the Google Analytics Reporting tab to see your site’s analytics overview. It takes Google up to 12 – 24 hours to start providing you with the awesome site stats that you need.

If you want to know more, read a more detailed installation tutorial on

Still need help? Contact Us Contact Us