Help with Google Analytics install

[ad_1]

This sub is WordPress.org right? Not .com?
What does everyone use to install the tracking code on their WordPress site? I used to use site kit plugin but it made my sight slow. A lot of research suggests putting the code in the header.php file, but if I end up changing themes won’t this get removed? How is everyone doing this these days? Thanks

[ad_2]
4 Comments
  1. >How is everyone doing this these days?

    Placing the GA script in `header.php`.

    How often are you changing themes?

  2. >This sub is WordPress.org right? Not .com?

    This sub is “WordPress” of any sort. WordPress.com is a managed WordPress host similar to WPengine or Kinsta or Pressable. It’s part of the WordPress ecosystem and thus a perfectly acceptable topic on this sub.

    Now, I would say that MOST of the conversation here is about WordPress.org sites. But there are regular posts from people asking about WordPress.com sites as well.

    >A lot of research suggests putting the code in the header.php file,

    This is what I do. It’s not really that big of a deal. I rarely change themes once I’m at the point where a site is live and I want GA active.

  3. Child Theme or use a simple plugin for adding code such as your SEO plugin if used, or CAOS plugin or other code inserters ..

  4. Thanks everyone! I’ll just place it in the header. I wanted one less thing to have to remember if I ever change themes, but oh well. Thanks!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer