[2022 Newest Version] Google Analytics and Adsense links were not set up… I’ll walk you through the steps to set up your tracking code! [GA4]

サイト運営

The other day… we were restricted from using Google Adsense…
→ Go to measures using Google Analytics

In my last article, I wrote about how I received a Google Adsense usage restriction.

I found out from a notice from Google that the cause of the usage restriction was “invalid traffic.

And after researching various sites, I found that one of the solutions to this problem was

Google Analytics to identify the invalid traffic and report it to Google.

and report it to Google.

↑のGoogleへの連絡フォームで報告します。

What is Google Analytics?

Google Analytics is a service provided by Google that allows you to analyze various data on your site. It is free of charge.

Specifically, you will know how many users visited your site, when and where they came from, which pages they viewed, and how long they stayed.

For example, you can see which articles on your site are popular and vice versa.

You can see how long they stayed on your site, so if you have access to an article but the time spent on it is short, you can tell if you should try to make it more visible or if the article was not interesting to them in the first place.


In this case, it is used to identify invalid traffic.

Traffic that is not normal traffic, e.g., traffic that is intentionally clicking on an ad repeatedly, is invalid traffic.

You identify this traffic and report to Google that this traffic is wrong! and report it to Google.

Google Analytics was not set up…! How can I set it up?

I have never used Google Analytics before, but I did remember that it was linked to the site, so I tried accessing Google Analytics…

Nothing… nothing!

Nothing is measured!

Surely it is linked to the site, but for some reason it is not being measured… why…

After checking various settings, we found out that the cause of the problem is that the Google Analytics tracking code settings are not working.

Google Analytics Tracking Code Settings

Google Analytics tracking code is a code necessary for measuring site data with Google Analytics.

By placing this code on your site, you can use Google Analytics.

Let us explain how to set up the tracking code.

First, click the gear symbol in the lower left corner of Google Analytics to display the administration screen.

Then click on the Data Stream item in the properties of the administration page.

The data stream screen shows your own site.

The image in the ↓ shows that it is receiving data, but before the tracking code was set, this area was marked as not receiving data.

Clicking on this item will bring up a screen called Web Stream Details.

On the Web Stream Details screen, click on the Global Site Tab… item in the Tab Settings procedure.

The tracking code is what you see here in the global site tag (gtag. js).

Copy it all and paste it into the header section of your site from the WordPress settings page.

Paste the tracking code from the WordPress settings page

This section explains how to paste the tracking code into WordPress.

On the WordPress administration screen, click on the theme file editor in the “Appearance” section.

Click on header.php in the theme file on the far right.

Click to view the header (header.php) source code.

In the header (header.php) source code, find the tag “/head”.

Once you find “/head”, paste the tracking code you just copied just before it. 

After pasting, remember to click the “Update File” button at the bottom to update your settings.

This completes the Google Analytics setup.

After this, if there is access to the site, the measurement results are reflected in Google Analytics.

As you can see in the ↓, the measurement was successfully performed and the measurement results were displayed. Good…


You’ve successfully finished setting up Google Analytics! But…!

As mentioned above, the Google Analytics setup was successfully completed.

All that remained was to report the invalid traffic to Google.

While I was researching how to set this up and tinkering with the site

 Google Adsense restrictions have been lifted!

I’m so happy, but all the hard work I put into researching this…

However, I am glad that I was able to learn how to set up and use Google Analytics in this case.

There are stories that Google Adsense usage restrictions also occur rather frequently, and it’s good to have the settings in place in case that happens.

The above is the flow of how to set up Google Analytics. I hope this will be helpful to you.


コメント

タイトルとURLをコピーしました