Skip to content

How to Set Up Your Own Google Analytics Tracking Code Using GA4


Google Analytics is an essential tool for understanding user behavior and making data-driven decisions for your website or online business. Google introduced Google Analytics 4 (GA4) in 2020, offering a range of new features that make it easier to gather insightful data. Google Analytics paired with Google Search Console is a great way for you to be able to see analytics on your site but also track your ROI when running Google Ads or Improving your SEO.

In this blog post, we will guide you through the steps to set up your Google Analytics tracking code using GA4, whether your website is custom-built, or hosted on platforms like WordPress, Shopify, Weebly, Wix, or GoDaddy Website Builder. Starting July 1, 2023, Universal Analytics properties will stop processing data and GA4 will take over on July 1, 2024.

Why GA4?

GA4 comes with an array of benefits including:

  • Event-based tracking for more customization
  • Enhanced audience-building features
  • Focus on user privacy
  • Cross-platform tracking
  • Predictive metrics and more

Step-by-Step Guide to Set Up GA4

Step 1: Access Your Google Analytics Account

  1. Visit the Google Analytics website.
  2. Sign in or create a Google account.

Step 2: Create a New Property

googleanalytics createproperty

  1. Navigate to the ‘Admin’ tab.
  2. Under ‘Property’, click ‘Create Property’.
  3. Under “Advanced Options” you will want to leave “Universal Tracking Property” unchecked.

Step 3: Fill in Your Property Details

  1. Name your property.
  2. Enter your website URL.
  3. Choose the industry category and reporting time zone.
  4. Click ‘Create’.

Step 4: Get Your Tracking Code

googleanalytics datastreams

  1. Go to the ‘Data Streams’ section and click ‘Add new data stream’.
  2. Choose ‘Web’.
  3. Enter your website’s URL and name the data stream.
  4. Click ‘Create Stream’.

Your tracking code, or “G-Tag,” will be generated. Your tracking code should look similar the one below:

<!-- Google tag (gtag.js) -->
<script async src=""></script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'X-XXXXXXX');

Step 5: Install the Tracking Code on Your Website

Installing Google Analytics Custom Websites:

  1. Copy the G-Tag.
  2. Paste it into the <head> section of each webpage.

Installing Google Analytics For WordPress:

  1. Go to your WordPress dashboard.
  2. Install a GA4-compatible plugin like ‘MonsterInsights’.
  3. If you are enrolled in our WordPress Care Plans, we include the SEOPress Plugin for free!
  4. Follow the plugin’s instructions.

*You can install any free plugin like Yoast SEO to start optimizing your site on WordPress!

Installing Google Analytics For Shopify:

  1. Go to Shopify Admin -> ‘Online Store’ -> ‘Preferences’.
  2. Paste your GA4 code under ‘Google Analytics’.

Installing Google Analytics For Weebly:

  1. Navigate to ‘Settings’ -> ‘SEO’ in your Weebly dashboard.
  2. Paste the GA4 code into the ‘Header Code’ box.

Installing Google Analytics For Wix:

  1. Go to your Wix dashboard.
  2. Navigate to ‘Settings’ -> ‘Tracking & Analytics’.
  3. Click ‘New Tool’ and choose ‘Google Analytics’.
  4. Paste the G-Tag and apply to all pages.

Installing Google Analytics For GoDaddy Website Builder:

  1. Go to your GoDaddy product page.
  2. Click ‘Website’ -> ‘Edit Site’.
  3. Navigate to ‘Settings’ -> ‘Website’ -> ‘Analytics’.
  4. Paste the GA4 code.

Step 6: Verify the Installation

  1. Go back to your GA4 dashboard.
  2. Navigate to ‘Realtime’ to see if data is being tracked.


Setting up Google Analytics 4 can provide you with powerful insights for data-driven decision-making. Whether you’re new to analytics or an expert, GA4 offers something for everyone. If you’re looking to leverage digital marketing to its fullest potential and need an agency to assist you, contact Screamin Cow. Our team of experts can handle everything from setting up Google Analytics to executing a comprehensive digital marketing strategy tailored for your business.

Insights On & More.

Southwest business card

As a home service business owner, maximizing your rewards from everyday business expenses is crucial. The Southwest…


Think of On-Page SEO like tidying up your home before guests arrive. It’s all about sprucing up…

screamincow seo plan

In today’s digital landscape, Search Engine Optimization (SEO) stands as a cornerstone in content creation. It’s all…

Scroll To Top