Monday, July 25, 2022

How to set-up and use Google Analytics 4 in a blog made with Blogger

This article is about updating Google Analytics tags in Blogger, to collect data for Google Analytics 4.

It also explains and why you need to do this as soon as possible if you want to compare your blog's performance vs the same time last year.






Why is this change needed

If you use Google Analytics to get statistics about your blog, then you have been getting emails from Google saying that you need to move to a Google Analytics 4 property.  They have messages like this:

otification
Universal Analytics will no longer process new data in standard properties beginning 1 July 2023. Prepare now by setting up and switching over to a Google Analytics 4 property.

What they mean is that from 1 July 2023, statistics will only be counted if you have set up a new type of "identifier".

The old identifier will keep on collecting statistics until then.  

But it is not possible to convert data from the old identifier to a new one:  if you want to get updated analytics from 2 July 2023, or if you want to compare data from then with data over the last 12 months, then you NEED to install the new identifier (ie a Google Analytics 4 property) into your blog now.

Isn't Blogger supporting this?

In short - not yet, hopefully soon.

A long tine ago (10+ years?)  we had to install analytics into our Theme (called a template at that time) manually.  And because of where in the template it was installed, there were issues with counting mobile vs desktop visits.   

Eventually Blogger added a Google Analytics Property ID field to the settings tab, and code to use this value in our blogs.   All we had to do was to add our blog in Google Analytics, get its ID-value from there, and paste that ID-value into the Blogger's Settings tab.  

At the moment, this field only accepts and uses the "old style" Universal Analytics tags.

I expect that Blogger will start accepting Google Analytics 4 properties "soon".   But I don't know when that will happen.   And I know that I do want to be able to look at blog-performance vs this time last year.   So I'm not going to wait for Blogger:  instead, I'm manually setting up and installing Google Analytics 4 properties for my most important blogs now.



How to convert an existing blog's Google Analytics profile to GA4


Choose the Admin tab (from the right side panel)

Choose the blog you want to move to Google Analytics 4 from the website dropdown


In the Property column, click on GA4 Setup Assistant

Click on Get Started

Review the information in the window that opens (they will almost certainly be what you want - you can only migrate tags if you are using them - and if you are, you likely don't need to be reading this article!)



Click on Create Property

Click the Go to your GA4 Property button - this will open the new property.

In the right-hand column, click on Data Streams.

Under the Web option, click the action-arrow beside your property-name.  This opens a pop-up where you can get the info to install into your blog.

Scroll down to Tagging Instructions, and click    Add new on-page tag

Click Global site tag  and use the button to copy the tag which is shown




Edit your blog's Theme in the usual way, and paste the code just after the </head> tag.   


Job done:  in a few hours, your GA4 property should say that it is now collecting data for your blog.   Because of this, when July 2023 arrives, you will be able to look back and see year-over-year trends in your blog's visitor counts and behaviours.


How to set up a Google Analytics 4 profile for a blog that doesn't use Analytics now

Sign in to www.blogger.com with the Google account you want to use to collect data for this blog.


Choose the Admin tab (from the right side panel)

Click Create Property

Enter a name for your property (ie reporting unit - usually I name it the same as my blog), and choose a reporting timezone and currency.   Click Next.

Choose your options (how big your operation is, what you want to do with the data).

Click Next. 

You will be taken to the Data Streams tab.

Choose Web, then enter the website name and URL.   Click Create Stream.

To go Tagging Instructions, and then Add New on-page URL

Click Add New on-page Tag   and then click into Global Site tag.

Copy the code, and install in into your blog by:
  • Editing your Blogger Theme in the usual way
  • Finding the </head> tag   (see the How to find things in HTML mode in this article, if you are unsure how to locate the tag - the feature is very similar in the theme editor)
  • Pasting the code you copied just before  </head>

Job done:  your should shortly have code from the net tag counting things on your site, and you should be able to see data in the Google Analytics property which you made for the blog.



Related Articles

How to edit your Blogger Theme


Share this Article

URL:

HTML link code:

BB (forum) link code:

Subscribe to Blogger-hints-and-tips

FeedBurner will send a confirmation message. Click the verify link in it to start your subscription.

Follow Me on Pinterest Subscribe to Blogger-HAT on Google + RSS subscription icon Follow BloggerHAT on Twitter

No comments:

Post a Comment