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?

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?
Did not find a solution? We are here to help you succeed.

Related Docs

Astra is Free. Now & Forever.

We believe creating beautiful websites should not be expensive. That's why Astra is free for everyone. Get started for free and extend with affordable packages.

REWIND

YEAR IN REVIEW

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