Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 19, 2022 02:28 pm GMT

How to Quickly Install Google Analytics Global Site Tag in WordPress

What is Google Analytics?

Google Analytics is a free tool you can use with your Google account to track and generate reports on website traffic. It records information about website visitors, which pages they visited, for how long, from where in the world, how they reached your website in the first place, and a whole lot more besides. It even integrates with Google Ads to couple information about paid acquisition too.

1. Sign up for Google Analytics

Visit Google Analytics, and (if you arent already) sign in using your Google Account.
Hit the Start Measuring or Set up for free button and youll be shown a screen where you can enter your accounts details.
Then select Web when asked what kind of analytics you want to use.
Lastly, youll be asked for the websites name and its URL, after which you can hit Create.

Get Your Global Site Tag

Having created your analytics account, youll be given a Tracking ID (which will be something like UA-1111111111), plus a snippet of code called the Global Site Tag which looks like this:

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

2. Use the MonsterInsights WordPress Plugin

The first method, and in my opinion the easiest and best method, is to use a plugin called MonsterInsights for WordPress.
In your WordPress admin, go to Plugins > Add New and search for monsterinsights. When youve found it, hit Install Now, and then Activate once thats done.

Launch the MonsterInsights Setup Wizard
Youll automatically be shown to a setup wizard where you can answer a bunch of questions to get things working, and youll be asked to connect MonsterInsights to your analytics account. Youll be asked to log into your Google account, then authentication will be taken care of for you.

Reference Blog
How to Quickly Install Google Analytics Global Site Tag in WordPress


Original Link: https://dev.to/lehidi9576/how-to-quickly-install-google-analytics-global-site-tag-in-wordpress-5a82

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To