set a mobile bid adjustment using the API

565 views
Skip to first unread message

ashley...@gmail.com

unread,
Jan 24, 2014, 4:13:55 AM1/24/14
to adwor...@googlegroups.com
Hello,

I am trying to set a mobile bid adjustment using the following sample code:

When I run this code, I cannot see the set values in the AdWords UI.  There is an indication that bid adjustments have been set but when I click into the details, the box that's supposed to contain the value only displays --.  Also, through the UI you can either increase or decrease the percentage value, however in the API, there is no mention of either decreasing or increasing and negative values throw an exception.

How can I set a negative -100% bid adjustment using the API?

Right now, I am using the following Java code (taken from the sample code) :

    // Get the AdGroupBidModifierService.

    AdGroupBidModifierServiceInterface adGroupBidModifierService = adWordsServices.get(session, AdGroupBidModifierServiceInterface.class);


    // Create mobile platform. The ID can be found in the documentation.

    // https://developers.google.com/adwords/api/docs/appendix/platforms

    Platform mobile = new Platform();

    mobile.setId(30001L);


    AdGroupBidModifier adGroupBidModifier = new AdGroupBidModifier();

    adGroupBidModifier.setAdGroupId(adGroupId);

    adGroupBidModifier.setBidModifier(0.0);

    adGroupBidModifier.setCriterion(mobile);


    // Create ADD operation.

    AdGroupBidModifierOperation operation = new AdGroupBidModifierOperation();

    operation.setOperand(adGroupBidModifier);

    // Use 'ADD' to add a new modifier and 'SET' to update an existing one. A

    // modifier can be removed with the 'REMOVE' operator.

    operation.setOperator(Operator.ADD);


    // Update ad group bid modifier.

    AdGroupBidModifierReturnValue result = adGroupBidModifierService.mutate(new AdGroupBidModifierOperation[] {operation});


Thanks in advance for your help,

Ashley Grison

Danial Klimkin

unread,
Jan 28, 2014, 4:54:28 AM1/28/14
to adwor...@googlegroups.com
Hello Ashley,


In the API, the adjustment is a coefficient. E.g. "-90%" is 0.1 and "400%" is 3.0 (X * 0.1 and X * 3).

If you operation succeed but you don't see the UI change, please send us the full XML code of the request and response via email (Reply to author). Please make sure to keep / provide the account, campaign and ad group IDs.


-Danial, AdWords API Team.

Martin

unread,
Jan 28, 2014, 2:53:01 PM1/28/14
to adwor...@googlegroups.com
Hello Danial,
I believe 400% should be 5.0
Is the full range -100% (0.00) and -90%(0.10) to 300%(4.00) with two decimals?

Cordial regards,
Martin

Danial Klimkin

unread,
Jan 29, 2014, 5:15:11 AM1/29/14
to adwor...@googlegroups.com
Hello Martin,


The range is 0.1 to 4 which is 10% to 400% or "-90%" to "+300%" depending on the notation used.


-Danial, AdWords API Team.

san...@a-insight.com

unread,
Jun 20, 2014, 1:51:20 AM6/20/14
to adwor...@googlegroups.com

hey danial,


                   I wanted to update bid(max cpc) on keywords level(criterian) using below code but I am getting trouble that where to set my keywords id so that I could update that cpc.

AdGroupServiceInterface adGroupService =
                adWordsServices.get(session, AdGroupServiceInterface.class);
       
        BiddingStrategyConfiguration biddingStrategyConfiguration =
                new BiddingStrategyConfiguration();
            CpcBid bid = new CpcBid();
            bid.setBid(new Money(null, 10000000L));
            // You can optionally provide this field.
            bid.setContentBid(new Money(null, 20000000L));
            bid.setCpcBidSource(BidSource.CRITERION);
            AdGroup adGroup = new AdGroup();
            biddingStrategyConfiguration.setBids(new Bids[] {bid});
            adGroup.setBiddingStrategyConfiguration(biddingStrategyConfiguration);

            // Create operation.
            AdGroupOperation operation = new AdGroupOperation();
            operation.setOperand(adGroup);
            operation.setOperator(Operator.SET);
            AdGroupOperation[] operations = new AdGroupOperation[] {operation};

            // Update ad group.
            AdGroupReturnValue result = adGroupService.mutate(operations);
       

     please send me updation at my mail san...@a-insight.com if possible.

regards,

santosh

Danial Klimkin

unread,
Jun 20, 2014, 7:32:26 AM6/20/14
to adwor...@googlegroups.com, san...@a-insight.com
Hello Santosh,


Please start a new thread with your question as this is a separate issue.

We don't want to spam people on this thread with irrelevant details.


-Danial, AdWords API Team.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages