Returns the average cost per thousand impressions.
Return values:
Type
Description
double
The average cost per thousand impressions.
getAverageCpv()
Returns the average cost per view.
Return values:
Type
Description
double
The average cost per view.
getAveragePageviews()
Returns the average number of pages viewed per visit. Only available for
Campaigns, Ad groups, Keywords, and Ads. Returns null for
other entity types. Returns null if the account is not linked
to Analytics.
Return values:
Type
Description
double
The average page views.
getAveragePosition()
Returns the average position. Returns null if this is a
Display entity that doesn't have an average position.
Return values:
Type
Description
double
The average position.
getAverageTimeOnSite()
Returns the average time a visitor spent on site, in seconds. Only
available for Campaigns, Ad groups, Keywords, and Ads. Returns
null for other entity types. Returns null if the
account is not linked to Analytics.
Return values:
Type
Description
double
The average time on site.
getBounceRate()
Returns the bounce rate of the entity, in 0..1 range. When a
visitor to your site sees only one page or triggers only one event,
Analytics considers this visit a "bounce." Only available for Campaigns, Ad
groups, Keywords, and Ads. Returns null for other entity
types. Returns null if the account is not linked to Analytics.
Return values:
Type
Description
double
The bounce rate.
getClicks()
Returns the number of clicks.
Return values:
Type
Description
long
The number of clicks.
getConversionRate()
Returns the rate of conversions.
Return values:
Type
Description
double
The rate of conversions.
getConversions()
Returns the number of conversions.
Return values:
Type
Description
double
The number of conversions.
getCost()
Returns the cost in the default currency of the account.
Return values:
Type
Description
double
The cost in the default currency of the account.
getCtr()
Returns the click through rate of the entity, in 0..1 range.
Return values:
Type
Description
double
The click through rate.
getImpressions()
Returns the number of impressions.
Return values:
Type
Description
long
The number of impressions.
getViewRate()
Returns the view rate of the entity, in 0..1 range.
[null,null,["Last updated 2024-10-18 UTC."],[[["The `Stats` object provides access to various performance metrics for different entity types in Google Ads scripts."],["Common metrics like impressions, clicks, cost, and conversions are available for all entity types."],["Analytics-related metrics like average pageviews, bounce rate, and average time on site are limited to Campaigns, Ad groups, Keywords, and Ads, requiring an Analytics link."],["The provided code snippet demonstrates how to retrieve and use these statistics within a script."],["All metrics are returned with specific data types like `double` for rates and averages, and `long` for counts."]]],[]]