Conversion Action

152 views
Skip to first unread message

Joon Kil

unread,
Aug 9, 2023, 4:53:41 AM8/9/23
to Google Ads Scripts Forum
Hi,

I am trying to build a script that automatically pulls search queries alongside with conversions, conversion category and conversion action.

The attached file is what I am currently using; however, I am not able to find a way to include "conversion action".

Could anyone let me know the name of member for that?

Thank you,

Search Query Script.txt

Nils Rooijmans

unread,
Aug 12, 2023, 1:43:15 AM8/12/23
to Google Ads Scripts Forum

What you could do is get the conversion data with conversion category and conversion action, name etc via GAQL query,

Here's an example:

function main() {

  var gaqlQuery = "SELECT campaign.name, segments.keyword.ad_group_criterion, search_term_view.search_term, segments.conversion_action, segments.conversion_action_category, segments.conversion_action_name, metrics.all_conversions FROM search_term_view WHERE metrics.all_conversions > 0 AND segments.date DURING LAST_30_DAYS";

  var queryResults = AdsApp.search(gaqlQuery);

  while (queryResults.hasNext()) {
    var result = queryResults.next();
    var campaignName = result.campaign.name;
    var conversionName = result.conversionAction.name;
    var nrOfConversions = result.metrics.allConversions;
    console.log("Campaign '%s' has had %s conversions with conversion name '%s'", campaignName, nrOfConversions, conversionName );
  }

}

Hope this helps,

Nils Rooijmans
https://nilsrooijmans.com
See my Google Ads Scripts FAQ to avoid the same mistakes I made: https://nilsrooijmans.com/google-ads-scripts-faq/

Genevieve Barton

unread,
Aug 13, 2023, 10:08:05 PM8/13/23
to Nils Rooijmans via Google Ads Scripts Forum

DMYKVmPFSG

Google Ads Scripts Forum Advisor

unread,
Aug 14, 2023, 5:19:26 AM8/14/23
to adwords...@googlegroups.com

Hi All,

 

Thank you for reaching out to the Google Ads Scripts Support Team.

 

@Nils - Thank you for your insights on this.

 

@Joon - I would agree with Nils' suggestion. Kindly try implementing the script and see if it works for you. If you would encounter an error, then we would like to request that you provide your Google Ads account ID, a screenshot of the error as well as the name of the script so we can further investigate it.

 

This message is in relation to case "ref:_00D1U1174p._5004Q2nrVD2:ref"

Thanks,
 
Google Logo Google Ads Scripts Team


Joon Kil

unread,
Aug 14, 2023, 10:38:30 AM8/14/23
to Google Ads Scripts Forum
Hi Nils and Genevieve,

I've included the script as recommended and did not see any errors. However, the result does not include "Conversion Action". I was able to see "Conversion Category", such as Phone Call Lead, Download, Other or Purchase.
Would there be a way to pull "Conversion Action"? 

Leaving my CID below:
* CID: 892-171-9054 (Simplii - Chequing)
* The script used for this is called, "Google Script - Joon Test - 1.1.4 Ver"

Thanks for your support!
Joon

Kil, Joon

unread,
Aug 14, 2023, 10:47:28 AM8/14/23
to Google Ads Scripts Forum, MT Tahir

Including my google rep @MT Tahir for visibility.

 

 

Thanks,

Joon

OOO Alert: Aug 22 – Sept 5

 

From: Joon Kil via Google Ads Scripts Forum <adwords...@googlegroups.com>
Sent: Monday, August 14, 2023 10:39 AM
To: Google Ads Scripts Forum <adwords...@googlegroups.com>
Subject: Re: conversion action

 

[EXTERNAL]


--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to a topic in the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-scripts/K2rfKAfVOPI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-scrip...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/0156967f-cae8-4591-ae32-63f2bd64bd58n%40googlegroups.com.

ATTENTION : This email originated outside your organization. Exercise caution before clicking links, opening attachments, or responding with personal information.


Nokleby Cecena

unread,
Aug 18, 2023, 9:06:15 AM8/18/23
to Nils Rooijmans via Google Ads Scripts Forum

SIFz2DIAUe

Dasch Shaub

unread,
Aug 18, 2023, 9:06:18 AM8/18/23
to Nils Rooijmans via Google Ads Scripts Forum

BGUBNyDp0j

sonu Kumar

unread,
Aug 18, 2023, 9:43:35 AM8/18/23
to Google Ads Scripts Forum

ShZQ67sIAp

Joon Kil

unread,
Oct 10, 2023, 2:54:42 PM10/10/23
to Google Ads Scripts Forum
Hi everyone,

Just wanted to check if there are any updates here.
I am only seeing reference numbers in reply and am hoping to get some resolutions!

On Friday, August 18, 2023 at 9:43:35 AM UTC-4 sonu Kumar wrote:

ShZQ67sIAp
Reply all
Reply to author
Forward
0 new messages