Hi,
I'm trying to fetch all search terms in ad groups containing the same label.
I'm fetching label resource name like this:
function getLabelResource() {
var labelSelector = AdsApp.
labels().
withCondition(
`label.name = '${LABEL}'`);
var labelIterator = labelSelector.get();
while (labelIterator.hasNext()) {
var label = labelIterator.next();
return label.getResourceName();
}
}
Then I fetch the search terms like this:
function getSearchTerms(labelResourceName) {
return AdsApp.search(`SELECT search_term_view.search_term
FROM search_term_view
WHERE ad_group.labels CONTAINS ANY ('${labelResourceName}')`);
}
It returns this error message:
Ca: MutateError.UNSPECIFIED: Call to GoogleAdsService.Search failed: The error code is not in this version.
at main (Code:13:29)
Not sure what to do with that.. According to documentation, this should work..