DEVICE_PLATFORM at the Customer Feed Level

46 views
Skip to first unread message

GDZ

unread,
Oct 31, 2014, 4:12:40 PM10/31/14
to adwor...@googlegroups.com
Hello!


Although same doesn't work at the Customer Feed level (i.e. if for example I want my account-level upgraded location extension target only Mobile).

Possible?

Thank you,
GDZ

Josh Radcliff (AdWords API Team)

unread,
Nov 3, 2014, 9:06:21 AM11/3/14
to adwor...@googlegroups.com
Hi GDZ,

You can make your upgraded location extensions only apply to mobile devices by modifying the CustomerFeed's matching function to:

                    <matchingFunction>
                        <operator>EQUALS</operator>
                        <lhsOperand xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201409" xsi:type="ns2:RequestContextOperand">
                            <contextType>DEVICE_PLATFORM</contextType>
                        </lhsOperand>
                        <rhsOperand xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201409" xsi:type="ns3:ConstantOperand">
                            <type>STRING</type>
                            <stringValue>Mobile</stringValue>
                        </rhsOperand>
                    </matchingFunction>

In other words, replace the Identity function with a function where:
I'm a Java guy, so here's how I did it in Java. Python should be very similar.

    RequestContextOperand platformRequestContextOperand = new RequestContextOperand();
    platformRequestContextOperand.setContextType(RequestContextOperandContextType.DEVICE_PLATFORM);

    ConstantOperand platformOperand = new ConstantOperand();
    platformOperand.setStringValue("Mobile");
    platformOperand.setType(ConstantOperandConstantType.STRING);

    Function platformFunction = new Function();
    platformFunction.setLhsOperand(new FunctionArgumentOperand[] {platformRequestContextOperand});
    platformFunction.setOperator(FunctionOperator.EQUALS);
    platformFunction.setRhsOperand(new FunctionArgumentOperand[] {platformOperand});
    
    customerFeed.setMatchingFunction(platformFunction);

Once that CustomerFeed is added, you'll see (Mobile devices only) under Account extension on the Ad extensions tab in the AdWords UI.

Let me know if that doesn't clear things up.

Cheers,
Josh, AdWords API Team

GDZ

unread,
Nov 3, 2014, 7:39:59 PM11/3/14
to adwor...@googlegroups.com
Worked like a charm...

Thank you Josh!

GDZ
Reply all
Reply to author
Forward
0 new messages