Google Analytics Advanced application of search engine tracking

Source: Internet
Author: User
Tags domain domain name
Google Analytics Advanced Application Series Author: Sluke, exclusive authorized chinaz.com reprint, mainly to explain Google Analytics statistics related applications, this article is the fifth article series.

Google Analytics provides a powerful API to track search engines, following the custom code of the fresh fruit net, to open the home page of the fruit net, to see such a piece of code:

var t = _gat._gettracker ("ua-9142976-1"); T._addorganic ("Baidu", "word"); T._addorganic ("Soso", "w"); T._addorganic (" 3721 "," name ");
T._addorganic ("Yodao", "Q"); T._addorganic ("Vnet", "kw"); T._addorganic ("Sogou", "Query"); T._addignoredorganic ("Fresh Fruit" );
T._addignoredorganic ("fruit Net"); T._addignoredorganic ("Xianguo"); T._trackpageview (); return t;
The catch (Err) {}

Although Google Analytics has been able to identify many search engines by default, we still need custom code to identify small search engines when necessary. Here the fruit is used _addorganic (), and its format is this:

_addorganic (Neworganicengine, Neworganickeyword)
Neworganicengine is a string that identifies the search engine's name
Neworganickeyword is also a string that identifies the parameter that passes the search keyword

For example T._addorganic ("Yodao", "Q"), which is used to define Youdao search, first look at the Youdao search "Hello" when, how to pass the parameters:

Http://www.youdao.com/search?q=hello&btnIndex=&ue=utf8&keyfrom=web.index

T._addorganic ("Yodao", "Q")

Yodao refers to the Youdao search

Q refers to the parameter that passes "Hello" to the search engine.

Again, other customizations are understandable, but it looks like the code for Fresh fruit isn't up to date, and it's not neworganickeyword to write search engines. The fruit is also used in the Code to _addignoredorganic (), which is used to ignore keywords. The user may enter the URL or the website name directly in the search box (also may be the mistake operation), for example enters "The www.xianguo.com", these keywords do not need to be monitored.

T._addignoredorganic ("Fruit Net")

is to ignore the "fruit net" this keyword, of course, through the "fruit net" this keyword over the PV will still be calculated.

Also useful is _addignoredref (), which is used to ignore referrer, such as a Web site using a dual domain name, then in the statistical report, different domain name of the jump transfer is counted as referrer, this time can use _addignoredref () to ignore one of the domain names, to ensure that the "referring Sites" is the source of the site is no longer calculate the dual domain name, _addignoredref () does not affect the calculation of PV. The format is as follows:

Pagetracker._addignoredref (www.sister-site.com);



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.