How to import UserLists the custom audience , using the remarketing

104 views
Skip to first unread message

Elis Scherer

unread,
Jun 7, 2021, 2:20:39 PM6/7/21
to AdWords API and Google Ads API Forum
hi there,
I’ve been trying to create a custom audience and insert a user list into it, adding user data the audience to implement Remarketing features.I’ve followed a REST interface document (herefor Java Adwords API (com.google.api-ads (ads-lib 4.4.0) (adwords-axis 4.4.0)), and I can create the audience and check it in the Adwords site with no problems,  but looks like the part of adding the user list into it isnt working.I’ve followed the documentation guide and can’t see why isnt working, someone can please help me with this?Bellow, the code os the method who create the custom audience and makes the import into adwords: 
<code>
UserListOperation operation = new UserListOperation();
        operation.setOperand(userList);
        operation.setOperator(Operator.ADD);
        UserListReturnValue result = userListService.mutate(new UserListOperation[]{operation});
        UserList userListAdded = result.getValue(0);
        System.out.printf(
                "User list with name '%s' and ID %d was added.%n",
                userListAdded.getName(), userListAdded.getId());
        Long userListId = userListAdded.getId();

        MutateMembersOperation mutateMembersOperation = new MutateMembersOperation();
        MutateMembersOperand operand = new MutateMembersOperand();
        operand.setUserListId(userListId);
        List<Member> members = new ArrayList<>(EMAILS.size());
        for (String email : EMAILS) {
            String normalizedEmail = textUtils.toNormalizedString(email);
            Member member = new Member();
            member.setHashedEmail(textUtils.toSHA256String(normalizedEmail));
            members.add(member);
        }
        String firstName;
        String lastName;
        String countryCode;
        String zipCode;
        String tempCountryCode;
        String tempZipCode;
        for (JsonValue jsonValue : jsonUsers) {
            JsonObject obj = jsonValue.asObject();
            firstName = obj.get("firstName").toString();
            lastName = obj.get("lastName").toString();
            countryCode = obj.get("country").toString();
            zipCode = obj.get("zip").toString();
            AddressInfo addressInfo = new AddressInfo();
            addressInfo.setHashedFirstName(textUtils.toSHA256String(textUtils.toNormalizedString(firstName)));
            addressInfo.setHashedLastName(textUtils.toSHA256String(textUtils.toNormalizedString(lastName)));

            addressInfo.setCountryCode(clearString(countryCode));
            addressInfo.setZipCode(clearString(zipCode));

            Member memberByAddress = new Member();
            memberByAddress.setAddressInfo(addressInfo);
            members.add(memberByAddress);

        }
        operand.setMembersList(members.toArray(new Member[members.size()]));
        mutateMembersOperation.setOperand(operand);
        mutateMembersOperation.setOperator(Operator.ADD);
        MutateMembersReturnValue mutateMembersResult =
                userListService.mutateMembers(new MutateMembersOperation[]{mutateMembersOperation});

Google Ads API Forum Advisor

unread,
Jun 8, 2021, 3:34:30 PM6/8/21
to elis.s...@reamp.com.br, adwor...@googlegroups.com
Hi Elis,

Thank you for reaching out to the Google Adwords API support. To address your issue with no additions to your list can you provide the complete SOAP request and response logs? Please provide the requested details via Reply to author option.

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 

 

ref:_00D1U1174p._5004Q2I0s1A:ref
Message has been deleted

Google Ads API Forum Advisor

unread,
Jun 14, 2021, 2:13:15 PM6/14/21
to elis.s...@reamp.com.br, adwor...@googlegroups.com
Hi Elis,

Thank you for sending me the request/response. I hope you deleted your post quickly, if it was exposed for too long there's a chance that someone can see it. Please note, it is not recommended to share developer token on public forum. When needed, we have alternate channels to receive private data. 

Let me bring up to my team what you are experiencing and we will get back to you as soon as possible.


Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 


ref:_00D1U1174p._5004Q2IuadG:ref

Google Ads API Forum Advisor

unread,
Jun 17, 2021, 4:23:49 AM6/17/21
to elis.s...@reamp.com.br, adwor...@googlegroups.com
Hi Elis,

Thank you for you patience. I work with Aryeh and allow me to assist you for now.

Based on the feedback we received from our team, our system sees 2000 items uploaded. However none of them matched to a Google account. Below are some of the possibilities as to why :

1. The data was not normalized and hashed using SHA-256. - For this scenario, you may refer to this guide and example on how your data would need to be hashed.
2. Another possibility is that all the data you sent does not match any Google accounts in our system

That said, you may ensure that all the requirements and considerations were followed before uploading to further guarantee successful audience uploads.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q2IuadG:ref
Reply all
Reply to author
Forward
0 new messages