Googel analytics Study Notes (2) urchintracher & website coverage

Source: Internet
Author: User

There are several reasons for writing this.:

1: Recently, the product department asked us to associate urchintrackerCodeDelete
2: Click statistics of clikci open to the outside world
3: The GA website coverage diagram is not easy to use (it may be useless, please kindly advise)
4: how to add click tracking (personal definition) for Google Analytics)

First:

Recently, we have discussed that the Sino-German military brother is also deleting some old urchintracker and adding some new urchintracker. Urchintracker can be said to be a loving and cruel tool. Urchintracker is very powerful. I am so envious of my first encounter. It's amazing to use this feature to track data and analyze webpages, plus ga display. Later, I learned that the product department is becoming more and more favored, and it can be seen in many places on the page. The key point is here. As an application group, we must add these traces in HTML code together with the product. This is not difficult, but developers often add such code, and sometimes dozens of code are added. The word "annoying ". But now I want to delete it again. It's depressing! (There is a reason for deletion. This is a consideration ). We adopt the development method and some URL requirements. Some urchintracker Code also needs to be controlled in the *. CS file. You can think about the troubles of developers.

Second:

Clicki's click statistics are finally open to the outside world. It's really good, like. This article mainly describes its click statistics function. This feature allows you to collect statistics on link clicks on the entire website. (* ^__ ^ *), It seems that this is similar to the URL we want to collect statistics on!

 

Third:

In fact, the product department uses urchintracker to analyze data by clicking to improve our products and provide better services for users. However, Ga currently does not provide a good click statistics. There isWebsite coverageFunction, screenshot for everyone. The interface looks good, but the effect is true (data is not accurate ).

What if the clicki statistics function is added to the website? This estimation is not passed, and clicki's data analysis is not very strong. What is the statistical Stability of a large traffic.

So what if you want Google Analytics to have the page Link click tracking effect. We still need to implement it through urchintracker. However, a javascript framework needs to be included here.Jquery. The main reason is that we use jquery, and other prototypes can also be used.

The implementation principle is very simple, that is, you can bind an onclick event to each <A> tag. I have already conducted an experiment on my blogs. The specific code is as follows:

The first attempt (PS: Error code, the statistical effect is incorrect. Please take a look,Do not use the following code.):

<Script language = "JavaScript">
$ (Function () {$ ("A"). Click (function () {urchintracker ("onclick/This. href );})})
</SCRIPT>

Why is this Code incorrect. See the GA Statistical Chart.

It is obvious that the "/http:/" address is truncated. You cannot calculate that the link has been clicked. You can only know that the link has been clicked 50 times in the time range.

This code is improved today. The Code is as follows (Waiting for Ga results..., no)

<Script language = "JavaScript">
$ (Function () {$ ("A"). Click (function () {urchintracker ("onclick/URL? Q = "+ this. href );})})
</SCRIPT>

This passJqeruy can be used to bind urchintracker:

There was a demand in the product list: "The number of people on the 2nd page of the statistics point is not required for clicking on other pages"

Http://www.dianping.com/mylist/all

It is difficult to use jqeruy. First, you can only add onclick on the Link "2". Others cannot be added. More importantly, this is a general control. The product department only wants to add it to the list project page. You are the least willing to modify the *. CS code, and you need to add two judgments. The final solution is to use jquery to solve the problem in one sentence: (* ^__ ^ *)

 
$ (". Pagelink [@ Title = '2']"). Click (function () {urchintracker ("dp_list_alllist_page2 ");});

(PS: The product department said at the time, "isn't it just adding an onclick on 2 ?" Alas, just a few minutes after writing a sentence, you can think of this solution .... In some cases, we can only communicate with each other. The technical department can meet the requirements as much as possible .)

General words:

Go back to the topic! Summarize the advantages and disadvantages of using jquery and urchintracker to track links:

Advantages

1: No need to modify the original code, including *. CS and HTML code structure.
2: You do not need to nest the code in HTML code, and the page is neat.
3: it can be modified at any time without compilation (we use C #).

Disadvantages

1: for some special URLs. For example: urchintracker (/Shanghai/food), Shanghai needs to be obtained through *. CS code in some places (most of them cannot be obtained because of this reason, and must pass *. CS)
2: Use the same urchintracker for a group of links. jquery is not as convenient as *. CS code. (In rare cases)
3: perform operations on the Dom on the client. If there are many links on the page, will it affect the efficiency and the click statistics. (In theory, it should be okay, but at present we are not using a large area of the website, so we just try this experience. (* ^__ ^ *) At present, I first experiment with ing on blogs ....)

Google Tag: googel analytics learning, urchintracher, website coverage diagram, Ga Learning

RelatedArticle:

Google Analytics Study Notes (1) bounce rate & exit rate

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.