To install Google Analytics on a WordPress website, you can follow these steps:

  1. Create a Google Analytics account or log in to your existing account.
  2. Click on “Admin” in the bottom left corner of the page, then select “Create Property” and follow the prompts to add your website’s information.
  3. Once your property is created, you will be given a tracking code. Copy this code.
  4. Install a Google Analytics plugin on your WordPress website. There are many options available, including “Google Analytics Dashboard for WP” and “MonsterInsights”. You can install these plugins from the WordPress plugin repository.
  5. Activate the plugin and follow the prompts to connect it to your Google Analytics account. You will likely need to enter your tracking code in the plugin settings.
  6. Once the plugin is connected to your Google Analytics account, you should start seeing data in your Google Analytics dashboard within a few hours.

It is important to note that Google Analytics only tracks data from the date you install it, so it is recommended to install it as soon as possible to gather as much data as possible. Additionally, it is important to ensure that you comply with data privacy regulations such as GDPR when collecting data from your website visitors.

If you do not install Plug-in, you can directly add the code to the WordPress program

  1. Log in to the background management system of the WordPress website, and go to Appearance > Editor.
  2. Find the functions.php file and add the following code at the bottom of the file:
  3. Paste the copied Google Analytics tracking code into the commented section of the code above.
add_action('wp_head', 'wpb_add_googleanalytics');
function wpb_add_googleanalytics() { ?>
// Paste the copied Google Analytics tracking code here
<?php } ?>

By Ray Lee (System Analyst)

iDempeire ERP Contributor, 經濟部中小企業處財務管理顧問 李寶瑞

Leave a Reply

Your email address will not be published. Required fields are marked *