An Interest In:
Web News this Week
- March 22, 2024
- March 21, 2024
- March 20, 2024
- March 19, 2024
- March 18, 2024
- March 17, 2024
- March 16, 2024
Some of Our Sources
View All SourcesHow 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
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To