Add Google Analytics feature to WordPress page
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 .
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.
You should read it
- 20 tips and tricks for mastering Google Analytics data (Part 2)
- Enhance the effectiveness and security of Website with CloudFlare
- The best website load testing tools available today
- What are bounce rates and how to improve them?
- 6 powerful features of Google Analytics
- How to enable speed limits on Google Maps
- Guide to speed up website loading in a simple way
- Compare Google Chrome and Microsoft Edge after improvements, which browser is better in 2018
May be interested
- 10 things to know about open source softwarewith the aim of helping open source users stay alert, we think it will be helpful to list some things people should know about open source before using it.
- Adding dynamic widgets to WordPress blogs without using codeif you own a wordpress site, do you want to display different widgets on every page in your blog? how to do this in wordpress?
- 'Backdoor' plugin, WordPress 3.2 RC2 launchesa series of popular plug-ins for wordpress are found to contain 'backdoor' in the source code, which can help hackers gain access and hijack the blog / website.
- Hackers break into WordPress serversan unidentified hacker hacked into the wordpresss server and installed a remote control trojan and download versions of this widely used blog application.
- WordPress.com blog service collapsed because of a DoS attackthe server hosting the blog wordpress.com was hacked from dos last saturday until the end of tuesday morning (february 19), making it impossible for users of this site to log in and post on their blogs.
- Build a blog with WordPressmost of those who are new to blogging often use free services with fixed, poor options.