Tracking Code: Search Engines and Referrers

This reference describes the methods that you use for customizing search engines and referral traffic in Google Analytics reporting.

GATC Search Engine/Referrers Methods

Method Details

_addIgnoredOrganic()

_addIgnoredOrganic(newIgnoredOrganicKeyword)

Sets the string as ignored term(s) for Keywords reports. Use this to configure Google Analytics to treat certain search terms as direct traffic, such as when users enter your domain name as a search term. When you set keywords using this method, the search terms are still included in your overall page view counts, but not included as elements in the Keywords reports.

Async Snippet (recommended)
_gaq.push(['_addIgnoredOrganic', 'www.mydomainname.com']); 

parameters

String   newIgnoredOrganicKeyword Keyword search terms to treat as direct traffic.

_addIgnoredRef()

_addIgnoredRef(newIgnoredReferrer)

Excludes a source as a referring site. Use this option when you want to set certain referring links as direct traffic, rather than as referring sites. For example, your company might own another domain that you want to track as direct traffic so that it does not show up on the "Referring Sites" reports. Requests from excluded referrals are still counted in your overall page view count.

Async Snippet (recommended)
_gaq.push(['_addIgnoredRef', 'www.sister-site.com']); 

parameters

String   newIgnoredReferrer Referring site to exclude.

_addOrganic()

_addOrganic(newOrganicEngine, queryParamName, opt_prepend)

Adds a search engine to be included as a potential search engine traffic source. By default, Google Analytics recognizes a number of common search engines, but you can add additional search engine sources to the list.

parameters

String   newOrganicEngine Engine for new organic source.

String   queryParamName The query parameter in the document.referrer string from which to extract the keyword of the new organic search term.

Example: If a user searches for "shoes" on a search engine "my-new-search.com", typically the search term is added in the URL like this: http://my-new-search.com?term=shoes. When a user clicks a search result on that page, they are taken to a destination site. On the destination site, the URL from the search engine will now be set in the document.referrer parameter. To register this new search engine with Google Analytics, the query parameter term must be supplied as the value for the queryParamName parameter.

boolean  opt_prepend If true prepends the new engine to the beginning of the organic source list. If false adds the new engine to the end of the list. This parameter's default value is set to false.


_clearIgnoredOrganic()

_clearIgnoredOrganic()

Clears all strings previously set for exclusion from the Keyword reports.


_clearIgnoredRef()

_clearIgnoredRef()

Clears all items previously set for exclusion from the Referring Sites report.


_clearOrganic()

_clearOrganic()

Clears all search engines as organic sources. Use this method when you want to define a customized search engine ordering precedence.