if you are familiar with google analytics it’s a free marketing and analytics tool for websites provided by google company, it has many features just by adding a piece of code to your website head tag. in this article we will help you to add google analytics code to your WordPress head tag without touching your website theme header file and keep the google analytics code safe every each update.

Why You Should Use Plugin to Add Google Analytics code to WordPress

Analytics Logo - Add Google analytics code to WordPress

if you add google analytics code directly in your theme header file, anytime you update your theme file, header file will reset and your code will vanished after each update, so you need a plugin to add code to your website header without touching the header file.

Download The Plugin to Add Google Analytics code to WordPress

add Google Analytics code to WordPress

To make adding Google Analytics code easy and secure, Koolak Custom Code Plugin is a perfect choice. This plugin allows you to insert and manage custom PHP snippets without modifying theme files.

Steps to Download and Activate:

  1. Visit the plugin page:
    👉 Koolak Custom Code Plugin
  2. Download the plugin .zip file.
  3. Go to your WordPress Dashboard > Plugins > Add New.
  4. Click Upload Plugin and select the downloaded file.
  5. Install and activate the plugin.

Once activated, you’ll find an option to manage custom code in your admin panel.

Add Google Analytics Code And SaveAdd Google analytics code to WordPress - Plugn

After activating the plugin, follow these steps to add your Google Analytics code:

  1. Navigate to Custom Code from the WordPress admin panel.
  2. Click on Meta Tag tab.
  3. In the editor section, paste your google analytics code into Meta Tags & Code Injection in head.
  4. Click on Save Changes

Clear Cache and Check Google Analytics Dashboard For Details

if you are using a cache plugin Clear Cache After these steps and wait an hour and then navigate through your website for some pages, Check Google Analytics Dashboard for updates and visits Report, if anything done correctly you should see the analytics in your dashboard.

Leave a Reply

Your email address will not be published. Required fields are marked *