How to Add Google Analytics to WordPress in Flatsome Powered Website

Google Analytics is one of the best tools at your disposal for learning more about your site visitors. You can learn How to add Google Analytics to WordPress and who your website visitors are, what they are looking for and where they come from, how long they stay on your site and etc.

It’ll help you to decrease the bounce rate and increase your pageviews. You can easily set up Google Analytics in your Flatsome WooCommerce theme. There are many WordPress analytics plugins, but Google is the game changer.

In this article, how to add Google Analytics to WordPress to the Flatsome theme will be covered.

Google Analytics is available for free. If you do not yet have a Google account, then open a Google or Gmail account to sign up. The signup process is quite simple. If you already have a Gmail account, use that to sign in.

How to Add WordPress Google Analytics 

Create and Setup a Google Analytics account:

Step 1: Visit the Google Analytics homepage and click the Signup button to log in with your Gmail account. Once you sign in, you will be prompted to a screen like the below screenshot.

google analytics page
 

Step 2: Click on Start measuring, and you’ll be taken to the next steps. You’ll have to provide account details. For the account name, you can use your name or business name. Click Next to continue.

create google analytics account
 

Step 3: You’ll get an option to choose between a website or a mobile app. Make sure you select a website and click on the Next button.

 
analytics
 

Step 4: Now, enter some details for your own property, like website name, website URL, industry category, country, and time zone. Once you have entered all the information, then click on Create buttons.

 
create
 
See also  Top 10 Product Import Export Plugin for WooCommerce 2023

You will be taken to Google Analytics’ terms and conditions. Accept the terms and conditions.

google terms
 

Step 5: Now, you’ll be presented with your Google Analytics code. Copy the tracking code, as you’ll need to enter it depending on the method you use below.

google analytics data
 
 

Now you have a Google Analytics account ready. Let’s install it in the Flatsome WooCommerce theme.

Add Google Analytics to WordPress Website in the Flatsome Theme

It is simple to add the Google Analytics tracking code directly to your Flatsome theme via your header.php file.

I suggest you use a WordPress child theme if you go the manual route. Otherwise, your tracking code will be overwritten if you switch or update the theme. If you don’t know how to create a child theme on WordPress, you can follow the linked tutorial.

The easiest way to paste your Google Analytics Tracking Code right before the closing </head> tag in your header.php file and save changes.

To find your analytics tracking code, follow step 5 or visit your Google Analytics Account.

After that, go to Theme Editor under the Appearance menu on your dashboard. Select the header.php file for your child theme. Paste the tracking code right before the </head> tag in the editor. Make sure to click on the Update File button. The tracking code will be activated successfully.

There is another method you can add Google Analytics to WordPress to the Flatsome theme. Head to your WordPress admin dashboard. Look for Advanced under Flatsome and click on Global Settings. You’ll find Header Scripts to paste your analytics code

See also  Ultimate Top WooCommerce Dark Theme in 2023
 

Use MonsterInsights plugin

One more method you may try. For that, you’ll need a plugin that will automatically add the tracking code to your site for you. Although other SEO plugins in WordPress can do the tracking processes, MonsterInsights is specially designed to track codes that other plugins rarely do.

There are lots of plugins in the WordPress repository. For demonstration purposes, I am showing the process with MonsterInsights. As it is the most popular Google Analytics plugin for WordPress.

Now let’s get started.

Install and activate the Monsterlights plugin from the WordPress admin dashboard. You can follow this guide to get help on how to install a WordPress plugin.

Once activated, the plugin will add a new menu item, ‘Insights,’ to your admin menu. It will take you to the MonsterInsights setup wizard. Click on the Launch the Wizard button.

Google analytics to Monsterinsight
 

Now you’ll be asked to choose a category for your website, such as – Business website, Publisher, or eCommerce. Select one and click Save and Continue button to go to the next steps.

 

In the next step, click on the ‘Connect MonsterInsights’ button. It will take you to a Google account. It’ll ask you to sign in or select an account if you are already signed in. Then allow the plugin to access your Google Analytics account by clicking on the Allow button.

 

Select the profile you want to track. Here, you need to select your website and click on the Complete Connection button to continue to the next steps.

 

Complete the recommended settings on this page and click on Save and Continue. The default settings would work for most of the websites.

 

The next step, it’ll show you paid recommended Addons. You can Save and continue.

 

MonsterInsight is all setup and ready to use. You can Finish Setup & Exit Wizard.

 
You can visit your WP admin dashboard and click on Reports under the Insights menu to check your analytics data.
 
Google Analytics report
 

Final Words

We hope you have learned how to add Google Analytics to WordPress in Flatsome theme. There are many other popular Google Analytics plugins available. 

But make sure you don’t install more than one analytic plugin at the same time. Because it may artificially inflate your website visitor numbers, and you have to read SEO tips blogs to rank your website and analysis with these tools.

If you need more tutorials on Flatsome theme or WooCommerce, let me know in the comment section. I’ll write the next tutorial for you.

Subscribe To Our Newsletter!
Hi, I’m Mohamed. I share delicious recipes that I have cooked and loved. I’ve been food blogging for over 10 years and have a Diploma in Nutrition. You will find many healthy recipes as well as my favourite comfort food on the blog because I believe in a balanced diet.

Related Posts

Fintech’s biggest hits and misses of 2023

As 2023 comes to a close, we’re here to look back at the biggest fintech stories of the year. Silicon Valley Bank’s implosion felt like a fintech…

It’s critical to regulate AI within the multi-trillion-dollar API economy

Alex Akimov Contributor With two decades of tech leadership experience, Alex Akimov, former head of API at Adyen, now revolutionizes embedded finance at Monite by building best-in-class…

EU’s provisional deal on gig worker rights fails to get enough backing from Member States

Not so fast on that Christmas present for precarious gig workers in the EU: A political deal announced mid month, which aims to bolster platform workers rights…

Arduino exploring India manufacturing to limit counterfeit sales

Arduino is considering manufacturing in India. The startup, best known for its open source microcontroller boards, hopes to restrict the rise of counterfeit boards and cater to…

Top robotics names discuss humanoids, generative AI and more

Last month, I took an extended break. In a bid to keep my robotics newsletter Actuator (subscribe here) up and running, however, I reached out to some…

Pornhub owner pays US government $1.8M to resolve sex trafficking probe

Pornhub’s parent company Aylo Holdings will pay $1.8 million to the U.S. government to resolve a charge of profiting off of sex trafficking. The company, formerly known…