Download Call Extensions data

116 views
Skip to first unread message

MWA

unread,
Nov 2, 2017, 9:20:05 AM11/2/17
to AdWords API Forum
Hi, 

I'm trying to download call extensions from my account via code given below


        $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build();        
        $session = (new AdWordsSessionBuilder())->fromFile()->withOAuth2Credential($oAuth2Credential)->withClientCustomerId($customerid)->build();

        $adWordsServices=new AdWordsServices();
        $adGroupAdService = $adWordsServices->get($session, AdGroupAdService::class);
        
        $selector = new Selector();
        
        $selectorFields = array('Id', 'AdGroupId', 'BaseAdGroupId', 'BaseCampaignId', 'Status', 'DisplayUrl', 'Headline', 'Description1', 'Description2', 'ImageCreativeName', 'MobileAdDescription', 'MobileAdMarkupLanguages', 'MobileAdMobileCarriers', 'MobileAdBusinessName', 'MobileAdCountryCode', 'MobileAdPhoneNumber', 'MediaId', 'Dimensions', 'Urls', 'MimeType', 'SourceUrl', 'FileSize', 'CreationTime', 'ReferenceId', 'TemplateId', 'TemplateAdUnionId', 'UniqueName', 'TemplateElementFieldName', 'TemplateElementFieldType', 'TemplateElementFieldText', 'CreativeFinalUrls', 'CreativeFinalMobileUrls', 'CreativeFinalAppUrls', 'HeadlinePart1', 'HeadlinePart2', 'Description', 'Path1', 'Path2');
        $selector->setFields($selectorFields);
        $selector->setOrdering([new OrderBy('Id', SortOrder::ASCENDING)]);
        $selector->setPaging(new Paging(0, PAGE_SIZE));


        $selector->setPredicates([new Predicate('Status', PredicateOperator::IN, ['ENABLED', 'PAUSED', 'DISABLED'])]);

        $dateRange = new DateRange();        
        $dateRange->setMin(date('Ymd', strtotime($sdt)));
        $dateRange->setMax(date('Ymd', strtotime($edt)));
        $selector->setDateRange($dateRange);
    
        $selector->setPredicates([new Predicate('AdType', PredicateOperator::EQUALS, ['CALL_ONLY_AD'])]);
        $page = $adGroupAdService->get($selector);



But API is returning nothing

Google\AdsApi\AdWords\v201708\cm\AdGroupAdPage Object
(
    [entries:protected] => 
    [totalNumEntries:protected] => 0
    [PageType:protected] => AdGroupAdPage
    [parameterMap:Google\AdsApi\AdWords\v201708\cm\Page:private] => Array
        (
            [Page.Type] => PageType
        )

)


And also report is not returning any data

My report query

SELECT Id,AdGroupId,CampaignId,AveragePosition,AverageCpc,AverageCpm,Impressions,Clicks,Cost,Ctr,Conversions,
        ConversionRate, CostPerConversion,AdNetworkType1
        FROM AD_PERFORMANCE_REPORT
        WHERE AdType=CALL_ONLY_AD  AND Status IN [DISABLED, ENABLED, PAUSED] AND Clicks>0 
        DURING 20171031,20171031

Please help what's wrong with this.

P.S: Ad Extension snapshot from my account is attached.
adwords extension.png

Shwetha Vastrad (AdWords API Team)

unread,
Nov 2, 2017, 10:34:49 AM11/2/17
to AdWords API Forum
Hi, 

AdGroupAdService and Ad Performance Report are used to manage and retrieve the Ads in your account, not Ad extensions. I see that your Call Extensions are at the Campaign level. You need to use CampaignExtensionSettingService to retrieve the extensions available at the campaign level. To retrieve extensions defined at the account or AdGroup level, you need to use CustomerExtensionSettingService and AdGroupExtensionSettingService respectively. If you would like to retrieve these extensions using AdWords API reports, I would suggest that you download a Placeholder Feed Item Report which includes all statistics at the feed-item level. Please try this out and let me know if you are able to retrieve your Ad extensions successfully.

Regards,
Shwetha, AdWords API Team.

MWA

unread,
Nov 2, 2017, 12:11:53 PM11/2/17
to AdWords API Forum
Hi thank you for replying.

Please tell me PLACEHOLDER_FEED_ITEM_REPORT report is real time, mean if a click occurs and I download report within a minute that click will be available in this report or not? if not how often this report is being updated?

Shwetha Vastrad (AdWords API Team)

unread,
Nov 2, 2017, 2:47:45 PM11/2/17
to AdWords API Forum
Hi,

AdWords reporting is not real time. Some statistics that go into your reports may be calculated continuously, while others may be calculated once a day. In most cases, your account statistics are delayed by less than three hours. The data freshness guide provides more details.

MWA

unread,
Nov 3, 2017, 5:45:59 AM11/3/17
to AdWords API Forum
Ok thanks. One related question more, if someone taps on call extension ad on mobile devices and make a call then this click will be available on CLICK_PERFORMANCE_REPORT or not?

Shwetha Vastrad (AdWords API Team)

unread,
Nov 3, 2017, 1:48:46 PM11/3/17
to AdWords API Forum
Hi, 

Yes, if a user clicks in a Call extension, then this click will be available in the Click Performance Report as well. You can use the ClickType field to get the click types for the clicks in your account. You can also use the Call Metrics Call Details Report to get the data for call tracking of call-only ads or call extensions.

MWA

unread,
Nov 7, 2017, 8:38:06 AM11/7/17
to AdWords API Forum
Thank you for clarification, I have one more related question, how do I download the ad URL? I have tried using CampaignExtensionSettingService, AdGroupAdService services
and PLACEHOLDER_FEED_ITEM_REPORT, AD_PERFORMANCE_REPORT, CLICK_PERFORMANCE_REPORT reports, neither of them are providing the ad URL for call extension ad. 

On Thursday, November 2, 2017 at 6:20:05 PM UTC+5, MWA wrote:

Shwetha Vastrad (AdWords API Team)

unread,
Nov 7, 2017, 3:14:55 PM11/7/17
to AdWords API Forum
Hi, 

You can use Ad Performance Report to retrieve the CreativeFinalUrlsDisplayUrl and other URL related fields. You can also use the Final Url Report to get the EffectiveFinalUrl field which provides the effective final URL of the impressions.
Reply all
Reply to author
Forward
0 new messages