How To Install Google Analytics & Google Tag Manager Codes

Ready to connect Google Analytics and/or Google Tag Manager to your Carrot site?  Wonderful! 

This page will help guide you through that process:


How To Install Google Analytics

NOTE: Google Analytics 4 has replaced Universal Analytics. On July 1, 2023, Google stopped processing data into older Universal Analytics properties. They now ONLY process data into the new Google Analytics 4 property. If you first launched your Analytics account prior to July 2022, you may need to create a new Google Analytics 4 property. Regardless, you DO NEED to input your GA4 measurement ID in your Carrot site settings for data to start processing. Click here to learn more about converting your existing Universal Analytics property to a GA4 property

Step 1: Sign up for an Analytics Account:

  1. If you’ve already created your account, you probably need to convert your existing Universal Analytics property (which has a UA prefix before the ID) to a GA4 property (has a G prefix before the ID) OR grab the measurement ID for the GA4 property which Google has created for you. Click here to learn more about converting your Universal Analytics property to a GA4 property or where to find your GA4 Measurement ID
  2. If you haven’t created a Google Analytics account, create an account here, name your account, and hit the “next” button to go to the Property Setup.

Step 2: Create a GA4 Property:

Follow along with Google’s property creation steps. Fill out the required fields.


Step 3: Create a data stream for your website:

After you create your property, you will create a data stream that will serve as the connection between your Carrot website and your GA4 account.

  1. To do this, select “Web” from the platform options presented to you (shown in the screenshot below) and input your Carrot site’s URL. Make sure to leave the Enhanced Measurement toggled ON/enabled.

Step 4: Skip installation instructions and grab your measurement ID:

Google will now present you with multiple ways to install your analytics code on your Carrot site, but you don’t need them! 🙂 We’ve made it easy to start processing data to a GA4 property. So, you can exit out of the Installation Instructions and grab your measurement ID from the “Web stream details” page. 

If you accidentally exit out of the Web Stream details page, you can navigate back to there by going to Property Settings > Data Streams within your Google Analytics account.


Step 5: Input your Measurement ID on your Carrot site:

From your Carrot site’s Dashboard – navigate to Settings > Analytics & Scripts. There you will find a field for you to input your Measurement ID and start processing data to your new GA4 property.

Great job! You should be all set with Google Analytics.


How To Install Google Tag Manager

Installing Google Tag Manager is a somewhat similar process, as you will add Google Tag Manager codes in the same settings section as Google Analytics, but in the Head and Footer scripts boxes beneath your Google Analytics Measurement ID.

We won’t go into the specifics on gathering your Google Tag Manager codes inside of Google here, however you can review this documentation from Google on what Tag Manager is and where to get your codes for it.

Once you have your Google Tag Manager codes, follow these steps:

Step 1: Head to Settings > Analytics & Scripts On Your Site


Step 2: Copy the First Code and Paste It In “Head Scripts”


Step 3: Copy the Second Code and Paste It In “Footer Scripts”


Step 4: Save Your Changes

Note: The save button at the bottom is for the head and footer scripts boxes.

That’s completes the setup! You should now be all set with Google Tag Manager.


Conclusion

Following the steps above, you’ve learned how to install Google Analytics and Google Tag Manager so that you can track the performance of your website and marketing campaigns.

Be sure to also connect your Carrot site to Google Search Console so you can use our built-in Search Performance tool to analyze your site’s performance in the Google search results and identify opportunities for further optimization.


Learn More: