Where Do I Put Google Analytics Code in Avada?

Cody Schneider7 min read

Figuring out exactly where to paste your Google Analytics code into your Avada-powered site can feel a bit daunting. You know you need it, but you don't want to break anything. The good news is that Avada makes this process surprisingly simple, without ever needing to touch your theme's core files. This tutorial will walk you through the best way to add your tracking code using Avada's built-in options and show you how to verify that it's working correctly.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

First Things First: Grab Your Google Analytics Tracking Code

Before you can add the code to your site, you need to know where to find it. We're looking for the Google Analytics 4 "global site tag" or gtag.js script. This is a small block of JavaScript that you'll place on your website to send data back to Google Analytics.

Here’s how you can find this essential snippet:

  1. Log into your Google Analytics account.
  2. Click the Admin gear icon in the bottom-left corner of the screen.
  3. Make sure you have the correct Account and Property selected in the dropdown menus at the top of the Admin page.
  4. In the Property column, click on Data Streams.
  5. Click on the Web data stream for your website. It will usually be named after your site’s URL.
  6. Under the "Google tag" section at the bottom, click on View tag instructions.
  7. On the next screen, select the Install manually tab.

You will now see a box containing your Google tag script. It will look something like this, with your own unique “G-” Measurement ID:

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [],
  function gtag(){dataLayer.push(arguments),}
  gtag('js', new Date()),

  gtag('config', 'G-XXXXXXXXXX'),
</script>

This entire chunk of code is what you need. Click the copy icon in the top right of the code box to copy it to your clipboard.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

The Easiest Way: Using Avada's Built-in Theme Options

The developers of Avada anticipated this exact need and created a dedicated, safe place to add tracking scripts like the Google Analytics tag. This is the best method because your code will remain in place even after you update the Avada theme, which is a major advantage over manual file editing.

Follow these steps to add your code:

  1. From your WordPress Admin Dashboard, navigate to Avada > Options. Some installations might call this Avada > Theme Options.
  2. In the left-hand menu of the Avada Options page, click on the Advanced tab.
  3. A sub-menu will appear. Click on Code Fields (Tracking etc).
  4. Look for the box labeled Tracking Code. The description text underneath confirms it's for scripts like Google Analytics, typically placed before the closing </head> tag. This is exactly what we need.
  5. Paste the entire Google tag script that you copied earlier directly into this box.
  6. Click the Save Changes button at the top or bottom of the screen.

And that's it! Avada will now automatically inject your Google Analytics script into the </head> section of every page on your site. You didn't have to use an extra plugin or risk editing sensitive theme files.

Alternative Method: Using a WordPress Plugin

While the Avada Options method is ideal, some users prefer using plugins for this task. You might choose a plugin if you want additional features like displaying analytics reports directly in your WordPress dashboard or if you frequently switch themes and want your tracking to stay consistent without re-entering the code.

Using Google's Site Kit Plugin

Google's own Site Kit plugin is an excellent, official option. It not only connects Google Analytics but also integrates with Search Console, AdSense, and PageSpeed Insights, giving you a comprehensive dashboard.

  • From your WordPress dashboard, go to Plugins > Add New.
  • Search for "Site Kit by Google".
  • Click Install Now and then Activate.
  • Follow the on-screen setup wizard. It will ask you to sign in with your Google account and grant permissions for it to access your Analytics data.
  • The plugin will automatically detect your GA4 property and place the required tracking code on your site for you. You won't even need to copy and paste the code snippet manually.
GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Using other Popular Analytics Plugins

Tools like MonsterInsights or GA Google Analytics work similarly. The general process is:

  1. Install and activate the plugin of your choice.
  2. Go through its dedicated setup process.
  3. Most will have an easy wizard that connects to your Google account or asks for your Measurement ID (the "G-XXXXXXXXXX" value).

The primary advantage of plugins is simplicity and added features. The main disadvantage is that it adds another piece of software to your site that you need to keep updated and maintained for security and performance reasons.

A Word of Caution: What Not to Do

You might come across older blog posts or forum threads that suggest editing your theme files directly, specifically a file called header.php, to paste the analytics code. Do not do this.

Editing theme files directly is considered bad practice for one big reason: when you update your Avada theme to a new version, all of your customizations will be completely overwritten and lost. Your tracking code will disappear, and you'll suddenly have a black hole in your data without even realizing it.

Always use the dedicated "Tracking Code" field in the Avada Theme Options or a reputable plugin. These methods are designed to be "update-proof" and are the standard, correct way to handle third-party scripts.

How to Check if Your Google Analytics Code is Working

After you've added the code, you should always verify that it’s firing correctly. Don't just assume it's working! Data might take a few hours to populate in standard reports, but you can check for immediate activity in a few ways.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

1. Use the Realtime Report in GA4

This is the most straightforward method.

  • Keep Google Analytics open in one browser tab. Navigate to Reports > Realtime.
  • Open your own website in a new incognito or private browser window. Using an incognito window helps ensure you're not logged in, which might prevent your own visit from being tracked depending on your setup.
  • After clicking around a few pages on your site, look back at the Realtime report tab. Within a minute or two, you should see yourself appear as "1" in the "Users in Last 30 Minutes" card. You may also see a dot on the world map corresponding to your location. If you see activity, it's working!

2. Check Your Website's Page Source

This is a quick technical check to see if the code exists on the page.

  • Go to your website's homepage.
  • Right-click anywhere on the page and select View Page Source.
  • A new tab will open with your site's HTML code. Press Ctrl + F (or Cmd + F on a Mac) to open a search box.
  • Search for gtag.js or paste in your GA4 Measurement ID (e.g., G-XXXXXXXXXX).
  • If the search finds the Google Analytics script you pasted earlier, you know it has been successfully added to your site's code.

3. Use the Google Tag Assistant Companion

For a more robust check, you can use Google's own browser extension.

  • Install the Tag Assistant Companion from the Chrome Web Store.
  • Back in your GA4 account, go to Admin > Data Streams > [Your Stream].
  • Under the Google tag section, locate "Tag Assistant" and click into it or go directly to tagassistant.google.com. Add your domain, connect, and your site will open in a new debug window.
  • As you navigate your site in the new window, the Tag Assistant tab will show you exactly which tags have fired. You should see your Google Tag (G-XXXXXXXXXX) appear with a success message.

Final Thoughts

You now have the knowledge to confidently install Google Analytics on your Avada website. By using the built-in Theme Options, you ensure a safe, simple, and update-proof method that keeps your tracking intact. Taking a few extra minutes to verify the installation with the Realtime report will give you peace of mind that your data collection is on the right track from day one.

Once your data starts flowing into Google Analytics, the next step is turning it into insights. Digging through GA reports to connect marketing efforts to actual results can be a chore. Instead of getting lost in menus and exporting data manually, we built Graphed to do the heavy lifting. You can just ask questions in plain English, like "show me my top traffic sources from last month," and get an instant, real-time dashboard, making your new analytics setup immediately useful.

Related Articles