|
||||||
Hi Aaron,
Thank you for getting back to us. I work with Teejay and allow me to assist you here.
So our team can better check this concern. Could you please provide the CID and the full screenshot Google Ads UI that display a sitelinks of a campaign or ad group? So that we can take a closer look at your concern and provide guidance on this matter.
You can provide it via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsscr...@google.com
Regards,
|
||||||
function main() {
var campaignSelector = AdsApp
.campaigns()
//.withCondition("metrics.impressions > 100")
//.forDateRange("LAST_MONTH")
//.orderBy("metrics.clicks DESC")
;
var campaignIterator = campaignSelector.get();
while (campaignIterator.hasNext()) {
var campaign = campaignIterator.next();
var sitelinkSelector = campaign.extensions().sitelinks();
var sitelinkIterator = sitelinkSelector.get();
while (sitelinkIterator.hasNext()) {
var sitelink = sitelinkIterator.next();
//GET ID
Logger.log(campaign.getName() + " -- " + sitelink.getDescription1());
}
Logger.log("---------------");
}
}
|
||||||
--
-- 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 the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scrip...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/df854e8e-a749-4c38-9587-7ccb87c3a3dan%40googlegroups.com.
Hi Aaron,
Thank you for getting back to us. I work with Teejay and allow me to assist you here.
Moving forward to your concern, I'm afraid that there is no AdsApp to get what you want. However, If you want to get these 10 asset-based sitelinks, you need to use the Reports and Google Ads query language below.
SELECT customer_asset.asset, customer_asset.status, customer_asset.field_type, metrics.clicks, metrics.cost_micros FROM customer_asset WHERE customer_asset.field_type IN ('SITELINK') AND customer_asset.status (ENABLE)
Regards,
|
||||||
Hello Aaron,
James here, also from the Google Ads scripts support team. Allow me to assist you further.
I confirm that you need to extract those asset IDs within the retrieved data in the mentioned asset field, so that you can utilize it within a specific selector or query. Now, to retrieve the sitelink URL, I believe that you may use the getFinalUrl method of the AdsApp.SitelinkUrls that returns the final URL of a specific sitelink in your account.
Let me know if the method mentioned above is what you are looking for.
Regards,
|
||||||
Hello Aaron,
Thank you for your response. However, if there is a specific field or data that you’re trying to retrieve using the AdsApp root object of the Google Ads scripts but wasn’t able to fetch so. Then, I’m afraid that we can no longer provide depth insights regarding this. I said this because the new Google Ads script experience only utilizes the Google Ads API infrastructure or reporting as stated in this migration guide.
Therefore, I believe that it’s best if you raise those stated questions or concerns with the Google Ads API support team through this forum channel as they are more knowledgeable and much capable of providing accurate answers with your Google Ads reporting concerns.
Regards,