No results found. Try again with different words?

Search must be at least 3 characters.

How to add Google Analytics Code with the Astra Theme?

Sidebar Image

Did not find a solution? We are here to help you succeed.

Site Builder module available with Astra Pro Addon plugin allows adding Google Analytics code to the website. It provides hooks so that you can insert custom code at various locations on the website without editing theme’s core files.

This is a premium feature available with Astra Pro Addon plugin. To use these Pro features, you need to have the Astra theme along with the Astra Pro Addon installed on your website.

Go through the following sections of this document to know more about how to add Google Analytics code using Site Builder module in Astra Pro.

How to Add Google Analytics Code to Astra?

Google Analytics code need to be added as close to the opening <head> tag. Below are the steps to create Custom Layout and add code using hooks.

Custom Layout to add code to <head> tag

  • Activate the Site Builder module from Astra Pro.
  • Add a new Custom Layout from Astra > Site Builder
  • Select Hooks layout
  •  Insert the code in the Code Editor and set wp_head as action.
  • Choose to display it on Entire Website.
  • Publish the layout.

Thus by successfully integrating Google Analytics code into your Astra website, you’ve opened a gateway to enhanced tracking, and analysis.

We hope this document has been helpful. If you have any queries further, feel free to leave a comment below.

Was this article helpful?
Sidebar Image

Did not find a solution? We are here to help you succeed.

Related Docs

Join 1,653,898+ Happy Site Owners Using Astra

Whether you are a beginner, small business owner, or professional web developer, Astra provides all the tools you need to easily build your beautiful WordPress website.

WAIT!!

You’re Missing the Biggest Discount of the Year!

00
Months
00
Days
00
Hours
00
Minutes
00
Seconds

Grab this rare opportunity to save up to 50%

100% Risk-Free Money Back Guarantee!

REWIND

YEAR IN REVIEW

Download is Just A Click Away!

Membership Retention Checklist Download

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

Download Free Astra Theme - Modal Popup Form
Scroll to Top
Now choose your preferred
page builder addon
Choose your preferred page builder addon

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

Download Free Astra Theme - Modal Popup Form