Scripts, Segments & Search Queries

28 views
Skip to first unread message

Jessica

unread,
Aug 1, 2017, 8:15:05 AM8/1/17
to AdWords Scripts Forum
Hey There,

I am trying to add conversion segments to my script AdWords that looks at search query report.  Is this possible, it is giving me an error saying you cannot add segments to scripts? Or have I just written it wrong.

Thanks,

Jess

Anthony Madrigal

unread,
Aug 1, 2017, 9:22:07 AM8/1/17
to AdWords Scripts Forum
Hey Jess,

When using the Search Query Performance Report, you can include any of the fields listed here. Some of the conversion segments include ConversionCategoryName, ConversionTrackerId and ConversionTypeName. Please note that these fields will cause errors if you include them with certain fields. You can check the link I provided to see which ones.

Regards,
AdWords Scripts Team

Jessica

unread,
Aug 1, 2017, 4:03:20 PM8/1/17
to AdWords Scripts Forum
Hey Anthony,

I keep getting the below message:

Finished finding negative keywords
Column 'conversionName' is not valid for report type SEARCH_QUERY_PERFORMANCE_REPORT. Double-check your SELECT clause. (line 231)

This is the start of line 231:

  var queryReport = AdWordsApp.report(
    "SELECT CampaignName, CampaignId, AdGroupId, AdGroupName, Query," + statColumns.join(", ") + " " +
    "FROM SEARCH_QUERY_PERFORMANCE_REPORT " +
      "WHERE CampaignId IN [" + activeCampaignIds.join(",") + "] " + whereAdGroupStatus +
        "DURING " + dateRange

Do you know why it could be giving me that error?

Thank you,

Jess

Anthony Madrigal

unread,
Aug 1, 2017, 4:13:57 PM8/1/17
to AdWords Scripts Forum
Hey Jess,

conversionName is not a valid field name. You need to use the name on the left column, not the XML Attribute. For example, you will need to use ConversionTypeName.

If you continue to face issues with your script, please reply privately to author your CID and script name so I can have a look.

Regards,
Anthony
AdWords Scripts Team
Reply all
Reply to author
Forward
0 new messages