Unfortunately it isn't possible to determine if a campaign is
targeting all placements or only managed placements in the content
network using the v13 version of the API. This is only possible using
the v2009 version of the API. Here is the relationship between the
web interface, v13, and v2009 values:
UI: Google search
v13: GoogleSearch
v2009: GOOGLE_SEARCH
UI: Google search + Search partners
v13: SearchNetwork
v2009: GOOGLE_SEARCH, SEARCH_NETWORK
UI: Content network w/ Relevant pages across the entire network
v13: ContentNetwork
v2009: CONTENT_NETWORK, CONTENT_CONTEXTUAL
UI: Content network w/ Relevant pages only on the placements I manage
v13: ContentNetwork
v2009: CONTENT_NETWORK
Best,
- Eric Koleda, AdWords API Team
On Feb 3, 2:04 am, RAGHAVENDRA SUDHA <raghav.sudha2...@googlemail.com>
wrote:
> Hi,
>
> i need some information regarding the network types in Google campaigns,
> from what i can understand whenever i create an campaign, i can select
> whether to target content network or search network or both.
> when i select
>
> 1. serach and content then the network is shown as -- *"ALL"*
> 2. search along with partner serach providers then network is shown as --
> *"Search"*
> 3. Content network with automatic type of placements then -- it is shown
> as -- *"Content"*
> 4. Content network with managed placements then it is shown as -- *"Content
> managed placements"*
>
> when i retreive the campaigns using getcampaign method of camapiagn service,
> i get a Campaign[] object.
> this object contains a object of type *NetworkType[]*, which contains a list
> of network types.
>
> what i need to find out whether my campaign is targeting *"ALL" *networks or
> *"Search" *or *"Content" *or *"Content managed placements".
>
> * but these options are not provided in the NetworkType enum provided ( it
> has only search, googlesearch, content).
> this is what i am doing at the moment
>
> *if (campaign.getNetworkTargeting() != null){
> boolean
> AllSelectedNetworks=false,SearchOnly=false,ContentOnly=false;
> for (NetworkType network :
> campaign.getNetworkTargeting()){
> if (network.ContentNetwork ==
> NetworkType.ContentNetwork ){
> //content networks
> ContentOnly = true;
> } if (network.SearchNetwork ==
> NetworkType.SearchNetwork ){
> //serach networks
> AllSelectedNetworks =true;
> }
> }
> if (**AllSelectedNetworks **&& SearchOnly){
>
> channelCampEntity.setNetworktype(Constants.NETWORK_TYPE_ALL);
> }else if (**AllSelectedNetworks **){
>
> channelCampEntity.setNetworktype(Constants.NETWORK_TYPE_SEARCH);
> }else if (ContentOnly){
>
> channelCampEntity.setNetworktype(Constants.NETWORK_TYPE_CONTENT);
> }
> }
>
> * but i am not getting the right results, is this the correct way of doing
> this or is there any way i need to do it.
> please help me out on this one.
>
> Thank you,
> Raghavendra.
> *
>
> *