Add Google Analytics feature to WordPress page

Recently Google has added a new feature to their Analytics software, allowing users to track the speed at which they load the current website. Google also offers many tools to help administrators improve the speed of their website.

QuanTriMang - Google recently added a new feature to their Analytics software, allowing users to track the speed at which they load the current website. Google also offers many tools to help administrators improve the speed of their website. For example, with Google Instant internet users can find all they want before typing the keyword; Instant Preview feature allows users to preview web pages from search results; Page Speed ​​Chrome extension helps to test the performance of running websites based on a set of best known methods to reduce page load time, and now is Site Speed ​​Report .

Add Google Analytics feature to WordPress page Picture 1Add Google Analytics feature to WordPress page Picture 1

Why does a website need to be browsed faster?

Instead of talking about the benefits, let's talk about the disadvantages. A website that has a slow loading speed will affect the user's experience after visiting that website. Most people usually do not wait more than 10 seconds for downloading web pages. If your site is not uploaded in about 3 seconds, chances are they will leave.

In addition, a slow landing page can also affect your conversion speed and ranking order on Google's search engine. If you want a high ranking (in Google search results), first create a website with download speeds as quickly as possible.

Manually add Analytics site tracking

Analytics will add a feature to monitor page loading speed for users, thereby allowing administrators to know which pages load quickly / slowly to find ways to fix on the geographic area or browser.

If you are using WordPress and have added Google Analytics manually, you just need to insert the code to perform the speed tracking feature of the website.

Open your theme file, which contains the Google Analytics code (such as header.php ) and add the following code:

_gaq.push (['_ trackPageLoadTime']);

insert the above line of code right below the line

_gaq.push (['_ trackPageview']);

As a result, you will have the following code:

 

Then you overwrite this file on the server.

Add Analytics features using Plugin

In case you use a plugin to add Google Analytics code, most will not be updated with new features. You have to wait for developers to add features or disable those plugins and add code manually.

To manually add the code, just go to Appearance -> Editor and download the header.php file. Add Google Analytics code (with site speed tracking feature) before the card.

See website speed analysis information

By default, the speed tracking feature of the website is disabled. Once you've added the above code, it will take several hours to display on your Google Analytics page. Click My Site > select Reports > Content . Here you will see a new entry called ' Site Speed ' under the Content section.

Add Google Analytics feature to WordPress page Picture 2Add Google Analytics feature to WordPress page Picture 2

4.5 ★ | 2 Vote