How to Add Google Analytics Code in the Astra Theme?

No results found. Try again with different words?

Search must be at least 3 characters.

    How to add Google Analytics code with Astra theme?

    Google Analytics code can be added to the Astra theme with Astra Hooks plugin. It provides hooks so that you can insert custom code at various locations on the website without editing the theme’s core files.

    Please follow the steps to add Google Analytics code-

    • Download  Astra Hooks plugin. Install it like any other WordPress plugin and activate it.
    • From the WordPress dashboard navigate to Appearance > Customizer >  Hooks > Header > wp_head.
    • Add the code with wp_head action.
    • Publish it.

    Other Notes:
    Astra Pro Addon plugin users can add Google Analytics code with Custom Layouts Module. (Recommended)

    Was this article helpful?
    Did not find a solution? We are here to help you succeed.

    Related Docs

    Scroll to Top

    Download is Just A Click Away!

    Be among the first to try the beta version of Astra’s Header Footer Builder. Filling the form will ensure you’ll be the first to learn about updates and features.

    Download is Just A Click Away!

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