How to set up Google Analytics 4

Google plans to sunset Universal Analytics on July 1, 2023 in favor of their newest analytics product, Google Analytics 4 (GA4). We use Google Analytics to report important data in your dashboard, so all publishers will need to set up GA4 and run the new code on your site.

While you have until July 2023 to make the switch, we recommend getting things set up ASAP. Google will eventually remove your historical UA data, so the sooner you set up GA4, the more data you’ll have to refer back to.

We’ll continue to use UA to populate your AdThrive dashboard as we make preparations for a smooth transition to GA4.

Set up GA4 as soon as possible so you’ll have historical data when Google retires Universal Analytics. You’ll still be able to access your UA data until July 2023.

Setting up Google Analytics 4

Step One: Create a GA4 property for your site.

In admin, click the “+Create Property” button.

New_GA4_instructions_1.png

On the next screen, give your new property a name and make sure ​the “Reporting time zone” field is set to (GMT-04:00) New York Time. This will ensure that your data matches your AdThrive earnings data in your dashboard.​​ Then click Next.

Note: If your existing UA property isn’t already set to New York Time, we strongly suggest making that update as well, for consistency across your reporting.

New_GA4_instructions_2.png

You’ll see some optional questions about your business and how you plan to use this GA property. Feel free to answer or skip these questions.

Step Two: Set up a data stream to start collecting data.

On the next screen, select “Web” as your platform.

New_GA4_instructions_3.png

Enter your URL and give your data stream a name, then click “Create stream”.

New_GA4_instructions_4.png

Step Three: Add the new GA4 code on your site.

Finally, you want to make sure your new GA4 property is collecting data from your site. Copy your Measurement ID from the next screen and then head to your site where you’ve installed your Google Analytics script (in your head code, usually added via your theme settings or a plugin).

New_GA4_instructions_5.png

You’ll want to replace (or edit) the existing GA script on your site with the following code, making sure to insert your own UA and GA4 IDs:

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-XXXXXX');
  gtag('config', 'G-XXXXXX');
</script>


If you use a plugin for your GA connection, look for the option to enable “dual tracking” and make sure to include both your UA and your GA4 IDs.

Step Four: Give AdThrive permission to access your GA4 data.

We’ll need to be added as a Viewer to your new GA4 property, just as we were for your UA property, to be able to pull your analytics information into the AdThrive dashboard. 

If you previously gave us permission on your Account level, then you may be all set — otherwise you’ll need to give us access to the new property.

In your GA4 account, click into Admin > Property Access Management.

13_-_Property_Access_Management.png

If you don’t already have AdThrive as a user, click the blue plus button and then “Add users”.

14_-_Users.png

In the email address field, enter the email address you used to give us permission to your UA property (check in your UA admin to grab that email address — reach out to us if you’re not sure what to use).

Leave the box checked so we get notified by email, select “Viewer” for our role, then click the “Add” button.

15_-_Add_user.png

Step Five (optional): Enable demographics in your GA4 property.

If you’d like to gather demographic data on your readers, such as their age, gender, and interests, you’ll need to manually enable that in your new GA4 property. 

While this step is not required, enabling demographic data can make you eligible for additional ad campaigns. Just follow these simple instructions (under 'How to enable demographics in Google Analytics 4').

You’re all set!

Google Analytics 4 FAQs

What are the benefits of GA4?

At launch, GA4 provided useful new features geared toward e-commerce sites and publishers who run an app alongside their website. However, GA4 benefits all publishers and will provide valuable audience insights as Google adds new features.

Here are some key features of GA4:

  • Improved controls for better data management, collection, and retention
  • Automatically-surfaced insights using machine learning
  • Cross-platform reporting across web and mobile apps
  • Privacy-centric design to align with industry changes such as ITP and GDPR

As technology evolves, GA4 will adapt to a future with or without cookies or identifiers. It uses a flexible approach to measurement, and in the future it will include modeling to fill in the gaps where the data may be incomplete.

Will I still be able to see my historical data and the old Analytics dashboard in Google Analytics?

Yes, you will still be able to see your historical data and switch between the new GA4 dashboard and the old dashboard. Google plans to remove access to UA data in early 2024, so you may want to export any UA data that is important to you.

Will connecting a GA4 property cause Google Analytics to track pageviews twice?

No. If properly implemented, Google Analytics will only track pageviews once per property.

Why does the data not match up between the old Google Analytics property and the new GA4 property?

GA4 uses slightly different measurements, so some data doesn't track or calculate the same way as previous GA versions.

I already upgraded to GA4 and installed the new code. How can I connect my GA4 and Universal Analytics so my AdThrive dashboard will continue to report my pageviews?

As we work to ensure a smooth transition to GA4 in your AdThrive dashboard, we’ll continue to track pageviews based on your Universal Google Analytics property — so it’s important for you to collect data in both properties. 

To do this, replace (or edit) the existing GA script on your site with the following code, making sure to insert your own UA and GA4 IDs:

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-XXXXXX');
  gtag('config', 'G-XXXXXX');
</script>


Feel free to reach out to us to make sure everything is reporting correctly.

Was this article helpful?
1 out of 2 found this helpful
Have more questions? Send a message

Want to join AdThrive? Apply here!