/* note:
general include to not repeat the GoogleAnalyticsAPI
redirection on a _tracker property
*/
// ----------------------------------------
// Basic Configuration
// Methods that you use for customizing all aspects of Google Analytics reporting.
/**
* Returns the Google Analytics tracking ID for this tracker object.
* If you are tracking pages on your website in multiple accounts,
* you can use this method to determine the account that is associated
* with a particular tracker object.
* @return the Account ID this tracker object is instantiated with.
*/
public function getAccount():String
{
return _tracker.getAccount();
}
/**
* Returns the GATC version number.
* @return GATC version number.
*/
public function getVersion():String
{
return _tracker.getVersion();
}
/**
* Reset the current session clearing the utmb and utmc cookies.
*/
public function resetSession():void
{
_tracker.resetSession();
}
/**
* Sets the new sample rate.
* If your website is particularly large and subject to heavy traffic spikes,
* then setting the sample rate ensures un-interrupted report tracking.
*
* Sampling in Google Analytics occurs consistently across unique visitors,
* so there is integrity in trending and reporting even when sampling is enabled,
* because unique visitors remain included or excluded from the sample,
* as set from the initiation of sampling.
*
* @param newRate New sample rate to set. Provide a numeric as a whole percentage, 0.1 being 10%, 1 being 100%.
*/
public function setSampleRate(newRate:Number):void
{
_tracker.setSampleRate(newRate);
}
/**
* Sets the new session timeout in seconds. By default, session timeout is set to 30 minutes (1800 seconds).
*
* <p>Session timeout is used to compute visits,
* since a visit ends after 30 minutes of browser inactivity or upon browser exit.</p>
* <p>If you want to change the definition of a "session" for your particular needs,
* you can pass in the number of seconds to define a new value.</p>
*
* <p>This will impact the Visits reports in every section where the number of
* visits are calculated, and where visits are used in computing other values.</p>
* <p>For example, the number of visits will increase if you shorten the session timeout,
* and will decrease if you increase the session timeout.</p>
*
* @param newTimeout New session timeout to set in seconds.
*/
public function setSessionTimeout(newTimeout:int):void
{
_tracker.setSessionTimeout(newTimeout);
}
/**
* Sets a user-defined value.
* The value you supply appears as an option in the Segment pull-down for the Traffic Sources reports.
* You can use this value to provide additional segmentation on users to your website.
*
* For example, you could have a login page or a form that triggers a value based on a visitor's input,
* such as a preference the visitor chooses, or a privacy option.
* This variable is then updated in the cookie for that visitor.
*
* @param newVal New user defined value to set.
*/
public function setVar(newVal:String):void
{
_tracker.setVar(newVal);
}
/**
* Main logic for GATC (Google Analytic Tracker Code).
* If linker functionalities are enabled, it attempts to extract cookie values from the URL.
* Otherwise, it tries to extract cookie values from document.cookie.
* It also updates or creates cookies as necessary, then writes them back to the document object.
* Gathers all the appropriate metrics to send to the UCFE (Urchin Collector Front-end).
*
* @param pageURL Optional parameter to indicate what page URL to track metrics under. When using this option, use a beginning slash (/) to indicate the page URL.
*/
public function trackPageview(pageURL:String=""):void
{
_tracker.trackPageview(pageURL);
}
// ----------------------------------------
// Campaign Tracking
// Methods that you use for setting up and customizing campaign tracking in Google Analytics reporting.
/**
* Allows the # sign to be used as a query string delimiter in campaign tracking.
* This option is disabled by default.
*
* Typically, campaign tracking URLs are comprised of the question mark (?) separator
* and the ampersand (&) as delimiters for the key/value pairs that make up the query.
* By enabling this option, your campaign tracking URLs can use a pound (#) sign
* instead of the question mark (?).
*
* @param enable If this parameter is set to true, then campaign will use anchors. Else, campaign will use search strings.
*/
public function setAllowAnchor(enable:Boolean):void
{
_tracker.setAllowAnchor(enable);
}
/**
* Sets the campaign ad content key.
* The campaign content key is used to retrieve the ad content (description)
* of your advertising campaign from your campaign URLs.
* Use this function on the landing page defined in your campaign.
*
* @param newCampContentKey New campaign content key to set.
*/
public function setCampContentKey(newCampContentKey:String):void
{
_tracker.setCampContentKey(newCampContentKey);
}
/**
* Sets the campaign medium key,
* which is used to retrieve the medium from your campaign URLs.
* The medium appears as a segment option in the Campaigns report.
*
* @param newCampMedKey Campaign medium key to set.
*/
public function setCampMediumKey(newCampMedKey:String):void
{
_tracker.setCampMediumKey(newCampMedKey);
}
/**
* Sets the campaign name key.
* The campaign name key is used to retrieve the name of your advertising campaign from your campaign URLs.
* You would use this function on any page that you want to track click-campaigns on.
*
* @param newCampNameKey Campaign name key.
*/
public function setCampNameKey(newCampNameKey:String):void
{
_tracker.setCampNameKey(newCampNameKey);
}
/**
* Sets the campaign no-override key variable,
* which is used to retrieve the campaign no-override value from the URL.
* By default, this variable and its value are not set.
*
* For campaign tracking and conversion measurement, this means that, by default,
* the most recent impression is the campaign that is credited in your conversion tracking.
* If you prefer to associate the first-most impressions to a conversion,
* you would set this method to a specific key, and in the situation where you use custom campaign variables,
* you would use this method to set the var
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论























收起资源包目录























































































































共 95 条
- 1
资源评论

- heavenmine2013-08-06刚下下来,没有细看,感觉应该还好
- 呆呆ss2012-06-26无语,有免费的!!而且代码好像不对
zx_sky
- 粉丝: 1
- 资源: 2

上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

会员权益专享
安全验证
文档复制为VIP权益,开通VIP直接复制
