The Genesis Framework is known for being one of the most easy-to-use frameworks out there. So when a client mentioned he couldn’t find a tutorial anywhere on how to add Google Analytics to his Genesis site, I was a little shocked.
So I made this super quick video, demonstrating where to add your Google Analytics code:
I also wrote up a step-by-step tutorial on how to add Google Analytics to any Genesis site, if videos aren’t your thing.
Step One: Sign Up for Google Analytics
Obviously, if you’ve already signed up, you can skip this step. If you haven’t, you need to. GA is a super-powerful (and free!) tool that will let you track your users, and see how then interact with your site and your content in about a million different ways. You can see how many people visit via smartphone, or where they come from – and you can use this data to tailor your site and your content to your audience.
So essentially, sign up now.
To sign up, just go to google.com/analytics – since you probably already have a Google Account, you’ll just need to verify a few things and fill in some information about your website.
Once that’s done, you’ll get a code snippet. It’ll probably look something like this:
<!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXX-XX"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-XXXXXXXX-XX'); </script>
The ‘UA-XXXXXXXX-XX’ will be a unique code assigned to you by Google.
Once you’ve copied your snippet (from now on referred to as the “GA Code”), you just need to put it on your website!
Step Two: Adding Your GA Code to Your Genesis Website
Now, if you’re not tech-savvy adding code to your website can be terrifying. But Genesis has made it pretty damn easy to add code to your site.
All you have to do is log into your site. From there, you need to access the Genesis Theme settings, which can be found under Genesis > Theme Settings in the Dashboard:
Or, if you prefer, you can access them via the Customizer! Just click Customize in the admin bar (or go to Appearance > Customize) and click on Theme Settings:
Regardless of how you access the Theme Settings, you’ll need to find the section titled Header and Footer Scripts. There should be two boxes there. Paste your Google Analytics code in the Header Scripts box.
Boom. You’re done.
Troubleshooting
If you’re having issues with this method, double check if you’re using a caching or minification plugin. If you are, you might need to clear your cache for the code to work.
Was this helpful?
I hope it was! If you’re feeling generous, feel free to leave me a tip on my Ko-fi!
Melissa says
Thanks so much! I was dreading adding Analytics to the site; didn’t realize it was so easy. Hope you have a great day 🙂
Kyrie Tompkins-Overlock says
So glad it was helpful!
Lisa says
Thank you for including the raw code, and not just a screenshot!