Determining whether a campaign targeting the search network, or the display network

51 views
Skip to first unread message

etienne....@admobio.com

unread,
Nov 17, 2015, 7:49:04 PM11/17/15
to AdWords API Forum
Hi,

I'm trying to determine whether a campaign targeting the search network or the display network, but I don't know which service to use.

I am able to get the information of a campaign with "CampaignService".

How can I get this kind of data?

I am working with PHP.

Thank you !

This is the way I get campaign informations:

function getCampaign(AdWordsUser $user) {
        $campaignService
= $user->GetService('CampaignService', ADWORDS_VERSION);
        $selector
= new Selector();
        $selector
->fields = array('Id','Name', 'Status');
        // Filter out deleted criteria.
        //$selector->predicates[] = new Predicate('Status', 'NOT_IN', array('DELETED', 'PAUSED'));
 
        $page
= $campaignService->get($selector);
 
        foreach ($page->entries as $campaign) {
                printf("%s", $campaign->id);
                printf("%s", $campaign->name);        
                printf("%s", $campaign->status);
        }
}

Anthony Madrigal

unread,
Nov 18, 2015, 9:26:44 AM11/18/15
to AdWords API Forum
Hi,

In order to get the network type of your campaigns, select the field AdvertisingChannelType in your selector in the CampaignService.

Cheers,
Anthony
AdWords API Team

etienne....@admobio.com

unread,
Nov 18, 2015, 12:45:16 PM11/18/15
to AdWords API Forum
Hi and thank you I can now retrieve the "channel type".

Good day !
Reply all
Reply to author
Forward
0 new messages