AdWords
5.2K members online now
5.2K members online now
Dive into advanced features like Remarketing, Flexible Bid Strategies, AdWords Editor, and AdWords Scripts
Guide Me
star_border
Reply

AdWords Scripts & Total Conv. Value

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello, does anybody know how I pull the Total Conversion Value with an AdWords Script. I';m looking to get the following: 

 

Clicks',
'Impressions',
'Ctr',
'AverageCpc',
'Cost',
'AveragePosition',
'ConvertedClicks',
'TotalConversionValue',
'ClickConversionRate']);

3 Expert replyverified_user

Re: AdWords Scripts & Total Conv. Value

[ Edited ]
Top Contributor
# 2
Top Contributor

Hello, John.

Total converted value is only available in reports, such as ADGROUP_PERFORMANCE_REPORT, CAMPAIGN_PERFORMANCE_REPORT, etc., via AWQL.

Here's a resource to get you started: https://developers.google.com/adwords/api/docs/guides/awql

and a sample script https://developers.google.com/adwords/scripts/docs/solutions/search-query

 

Hope it helps.

Calin Sandici, AdWords Top Contributor | Find me on: Google+ | Twitter | LinkedIn | myBlog
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.

Re: AdWords Scripts & Total Conv. Value

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
What if I would like to use total conversion value in a function and thus change bids based on that. Is there a way to call it as a variable easily or not?

Re: AdWords Scripts & Total Conv. Value

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
Ooops, I haven't been aware of that issue. Till now, I thought it was possible to implement a bid management with AdWords Script, without relying on the API and/ or external tools. I fear it is not, at least not if you want to include several time ranges depending on the keyword traffic (longer time ranges for long tail, shorter time ranges for short tail). That's a pity.

Is there any chance that Google will add Conversion Value to the stats within the next few months?

Re: AdWords Scripts & Total Conv. Value

Community Manager
# 5
Community Manager

Hi Andreas,

 

I don't know if that feature is planned for the future, but the best way to submit your feedback is by using the form on this page. The feedback there is read regularly and considered very carefully.

 

Thanks for sharing your thoughts,

Cassie

Re: AdWords Scripts & Total Conv. Value

[ Edited ]
Top Contributor
# 6
Top Contributor

Hi @Andreas M conversion values are available via AdWords scripts, you just have to use the API reports to pull in the data, but it's all done within Scripts, no need to actually use the API itself.  For example, this function will retrieve the conversion value of a Campaign for the last 30 days:

 

function getCampConvVal(campaignName) {
  var report = AdWordsApp.report(
      "SELECT ConversionValue" +
      "FROM CAMPAIGN_PERFORMANCE_REPORT " +
      "WHERE CampaignName = '" + campaignName + "' " +
      "DURING LAST_30_DAYS");
  return report.rows();
}

Returned will be an object containing the rows found (although in this case we'd be expecting only 1) and the conversion value can be accessed by:

var convVals = getCampConvVal("myCampaign");
while(convVals.hasNext()) {
  thisConvVal = convVals.next().ConversionValue;
}

You would, of course, check for valid returns, etc.  Note that for this (and most other) reports, there's several fields for conversion value, so you may want to check which one it is you actually want.

 

Reports like this are really useful in Scripts not only because they allow an SQL-style query (which I guess is only a plus if you know SQL), but also because they're really fast, way, way faster than the getStatsFor methods, which of course makes them important if you're working with large Accounts.

 

Check out all the fields available for this specific report here:

 

https://developers.google.com/adwords/api/docs/appendix/reports/campaign-performance-report

 

and then take a look at all the available reports here:

 

https://developers.google.com/adwords/api/docs/appendix/reports

 

Click into each report and you'll see a list of their available fields, their type and enumeration, etc. 

 

Jon

AdWords Top Contributor Google+ Profile | Partner Profile | AdWords Audits

Re: AdWords Scripts & Total Conv. Value

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭
Thanks Jon, that was very helpful!

I'm testing your approach at an ad group level but your function returns an object, not an array, so in order to access the conversion value I changed the following:

var convVals = getAdGroupConvVal("ad group name").next().ConversionValue

Thanks!
Alfonso

Re: AdWords Scripts & Total Conv. Value

Top Contributor
# 8
Top Contributor

Hi  yes, you're right of course.  No excuse apart from old age and distraction Smiley Happy


I've edited the original post to make it easier to follow for anyone else reading the thread, but happily admit to the original error.  Glad it worked for you!

 

Jon

AdWords Top Contributor Google+ Profile | Partner Profile | AdWords Audits

AdWords Scripts & Total Conv. Value

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭

Would this work on an account level as well? I'm looking to get total conversion value for three separate accounts in my MCC.