ALL RSA asset details download

555 views
Skip to first unread message

Andrew Rozynski

unread,
Oct 31, 2023, 2:18:37 PM10/31/23
to Google Ads Scripts Forum
So there is this company that can provide a RSA report showing ALL headlines/description performance.


I contacted google support and they said that there is no option to download this for ALL RSA. The only way is to do it one by one at the ad level.

I was wondering maybe someone here has a script that can download this report for ALL RSA? I want to fix low performing Headlines and Descriptions easly.

Sigurd Fabrin

unread,
Nov 1, 2023, 7:01:27 AM11/1/23
to Google Ads Scripts Forum
It seems that you can only see the aggregated performance on ad level i.e. you cannot know which of the headlines and descriptions were served when some impression happened. There is no api headline report or description report, so not sure where the data should come from

RSA headlines and descriptions need a bit of unpacking after they are returned. But after doing that you can at least see how Google think they are performing

Something like this approach to get you started:
function main() {
  const query = `
    SELECT
      ad_group_ad.ad.responsive_search_ad.headlines,
      ad_group_ad.ad.responsive_search_ad.descriptions,
      metrics.impressions,
      ad_group.name
    FROM
      ad_group_ad
    WHERE
      campaign.status = "ENABLED"
      AND ad_group.status = "ENABLED"
      AND ad_group_ad.status = "ENABLED"
      AND segments.date DURING YESTERDAY
      LIMIT 3`;
  const response = AdsApp.search(query);
  while (response.hasNext()) {
    const row = response.next();
    console.log(`\n*** adGroup: "${row.adGroup.name}", impr: ${row.metrics.impressions} ***`);
    const jsonString = JSON.stringify(row);
    const data = JSON.parse(jsonString);
    findHeadlinesAndDescriptions(data);
  }
}
function findHeadlinesAndDescriptions(obj, context) {
  if (typeof obj === 'object') {
    for (const key in obj) {
      if (Array.isArray(obj[key])) {
        for (const item of obj[key]) {
          findHeadlinesAndDescriptions(item, key);
        }
      } else if (typeof obj[key] === 'object') {
        findHeadlinesAndDescriptions(obj[key], key);
      } else if (key === 'text') {
        console.log(`${context === 'headlines' ? 'Headline' : 'Description'}: ${obj[key]}`);
      } else if (key === 'assetPerformanceLabel') {
        console.log(`Asset Performance Label: ${obj[key]}`);
      }
    }
  }
}



Sigurd

Andrew Rozynski

unread,
Nov 17, 2023, 5:35:21 PM11/17/23
to Google Ads Scripts Forum
Hi Sigurd, thank you for the script

A lot of the results have Pending message as seen below, is there a quick fix to change this?

Sigurd Fabrin

unread,
Nov 20, 2023, 4:49:01 AM11/20/23
to Google Ads Scripts Forum
PENDING just means that there's no more info yet. So, there's nothing much you can do about it.

Consider adding something like "metrics.impressions > 100" to the WHERE clause. Then you'll be sure to only get ads with some impression volume and thus a higher probability of having a useful performance label value



Sigurd

Google Ads Scripts Forum Advisor

unread,
Nov 22, 2023, 8:14:31 AM11/22/23
to adwords...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads Scripts support team.

After reviewing your concern, I understand that you are facing some issues while running the script. For knowing more about the problem and for finding better solution we just need some more information : 
  • Google Ads Account Id.
  • Name of the script in the account.
  • The uncropped screen shot of the error you encountered.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02qU2vr:ref"

Thanks,
 
Google Logo Google Ads Scripts Team

 

Reply all
Reply to author
Forward
0 new messages