Setting autoTaggingEnabled

38 views
Skip to first unread message

rentca...@gmail.com

unread,
May 24, 2017, 2:59:42 PM5/24/17
to AdWords API Forum
How do I set autoTaggingEnabled to true for a certain customer Id?

I've tried the following but I receive and error.

        Dim CustomerService As CustomerService = CType(User.GetService(AdWordsService.v201702.CustomerService), CustomerService)

        Dim Customer As Customer = New Customer()
        Customer = CustomerService.getCustomers(ClientCustomerId) <-- This produces the error "Arithmetic operation resulted in an overflow."
        Customer.autoTaggingEnabled = True

        Dim response As Customer = CustomerService.mutate(Customer)

It would be helpful if you can provide me with a code example.

Thank you 

KDJ

Shwetha Vastrad (AdWords API Team)

unread,
May 24, 2017, 3:34:54 PM5/24/17
to AdWords API Forum
Hi KDJ,

The getCustomers() method takes no arguments and returns a list of Customer objects. This is probably why you encounter the "Arithmetic operation resulted in an overflow" error. Could you change that line of code to the one below and let me know if it works? 

Dim Customer As Customer = CustomerService.getCustomers()(0)

Regards,
Shwetha, AdWords API Team.

rentca...@gmail.com

unread,
May 24, 2017, 4:39:45 PM5/24/17
to AdWords API Forum
Shwetha,

I did as you suggested.  It did not produce an error but it does not update the correct client account.  I need to be able to set autoTaggingEnabled for a certain client account.  How would I do that?

Thanks
KDJ

Shwetha Vastrad (AdWords API Team)

unread,
May 24, 2017, 5:35:37 PM5/24/17
to AdWords API Forum
Hi, 

You need to set the target account's Id as the clientCustomerId in the request header when you execute the getCustomers() method so that the details of that particular AdWords account are returned. If the clientCustomerId is not set, then the details of all AdWords accounts directly accessible by the authenticated user will be returned. You can use the code snippet provided below to set the required clientCustomerId at runtime.

AdWordsUser user = new AdWordsUser();
// Override a specific setting at runtime.
AdWordsAppConfig config = (AdWordsAppConfig) user.Config;
user
.Config.clientCustomerId = "123-456-7890";

If this doesn't solve the issue, please enable logging and provide the SOAP request and response logs so I can take a look. Please use Reply privately to author when responding.

rentca...@gmail.com

unread,
May 24, 2017, 7:02:09 PM5/24/17
to AdWords API Forum
Shwetha,

It worked!

Thanks for your help.  

KDJ
Reply all
Reply to author
Forward
0 new messages