Closed Tyler-Murphy closed 6 years ago
See this example: https://github.com/googleads/google-api-ads-ruby/blob/master/adwords_api/examples/v201710/remarketing/add_crm_based_user_list.rb#L62
Instead of using one Hash with hashed_email
repeated, make the array contain one hash per email, each with its own hashed_email
field defined.
:members_list => [
{:hashed_email => '...'},
{:hashed_email => '...'},
...
]
Sorry, I simplified the example, and I left out some important details. Really, we want to send multiple emails, phone numbers, and addresses per hash. What you suggest is what we do right now, to send emails only.
Do you know if these are equivalent in all cases, in terms of the users who end up in the remarketing list?
:members_list => [
{:hashed_email => '1'},
{:hashed_phone_number => '1'}
]
:members_list => [
{:hashed_email => '1', :hashed_phone_number => '1'}
]
We're under the impression that they're not equivalent, but if they are, we can send each person's information spread across multiple hashes.
Those are not equivalent. The former will create two separate Members, one with only an email address and the other with only a phone number. The latter will create a single Member, with both an email address and a phone number. You should be sure to update all known information on each member at the same time, in a single request.
Okay, that's what we figured. So is it impossible to send multiple emails, phone numbers, and addresses for a single user with this library in its current form?
Yes, a given user is treated as having only a single value for each of those fields. This is based on the design of the AdWords API, and it not specific functionality to the Ruby library.
That's doesn't appear to be how the AdWords API is designed, as indicated by both the web interface and the API documentation.
If you create a new customer list in the AdWords web interface, it makes a template available ("use a template"):
Here are the contents of the template:
Email,First Name,Last Name,Country,Zip,Email,Zip,Phone,Phone
test@gmail.com,john,smith,us,94016,,,1-800-888-8888,
test2@gmail.com,joanna,smith,cn,101300,test4@gmail.com,101500,,
test4@gmail.com,zoë,pérez,sg,WC2H 8LG,test6@gmail.com,,18008888899,1(800)888-8888
And in the AdWords API documentation for AdwordsUserListService.Member, it says:
Multiple member identifiers of the same type for the same member can be provided at the same time.
The API and the web interface are separate and the existence of functionality in one doesn't necessarily mean that the same functionality is shared in the other.
However, I do find that comment in the Member documentation confusing. If you look at the actual definition of the Member, there are no collections, which means there is no way to actually upload more than one. I imagine that comment is incorrect and I'm going to try to figure out what's going on there and potentially get that comment removed or updated to explain better what it means.
Okay, thanks! Have you heard anything?
Not yet. I've followed up again with the team that owns this.
This is not a bug with the Ruby library (it's doing what the WSDL says it can do, even if the documentation is confusing), so I'm going to have to close this out here on GitHub. However, if you want to keep up to date with progress on this issue, you can make a topic on our support forum (https://groups.google.com/forum/#!forum/adwords-api) and specifically request that your issue be assigned to me (Mike) and the team will route it so that I can follow up there.
Is it possible to upload multiple member identifiers of the same type for the same member, as specified here?
We'd like to upload multiple email addresses and phone numbers in one operand. For example:
This isn't possible, since a hash can't have multiple values for the same symbol key. Changing the keys to strings (and allowing the same string key multiple times) also doesn't work:
Inspecting the generated XML (using
mutate_members_to_xml
) for a single email gives this:It seems like we'd want the generated XML to include a
<hashedEmail>
tag for each email we want to upload. If string keys were supported, I think this would be possible.