Location Extensions / Business Account Identifier

72 views
Skip to first unread message

Pete Lavetsky (AdWords API Guru)

unread,
Jun 15, 2020, 1:42:15 PM6/15/20
to AdWords API and Google Ads API Forum
Good afternoon all,

I'm attempting to integrate Google My Business and Location Extensions for our customers.


.setEmailAddress(StringValue.of(gmbEmailAddress))
.setBusinessAccountId(StringValue.of(businessAccountIdentifier))

Does the businessAccountIdentifier reflect the numeric part of the "name" attribute of a My Business account? https://developers.google.com/my-business/reference/rest/v4/accounts

Can the Feed be setup using solely the businessAccountIdentifier or is an email address needed as well?

Is there a complete code example for setting up GMB and Location Extensions with Google Ads like there is for AdWords? https://developers.google.com/adwords/api/docs/guides/feed-services-locations#complete_code_example

Thanks
Pete

Google Ads API Forum Advisor Prod

unread,
Jun 16, 2020, 12:07:15 PM6/16/20
to pete.l...@gmail.com, adwor...@googlegroups.com

Hi Peta,

Thanks for reaching out. Please find below the answer of your questions.

  1. It dose not reflect in the numeric part. You can get the “name ” attribute in String format.
  2. You can set up feeds with your Google My Business using Feedserviece.mutatefeeds.
  3. You can use this guide in Google Ads API for creating new location extensions to your GMB account. 

Let me know if you have any questions.

Thanks,
Nirmita Patel Google Ads Team


 

ref:_00D1U1174p._5004Q20Z1iu:ref

Pete Lavetsky (AdWords API Guru)

unread,
Jun 16, 2020, 1:00:38 PM6/16/20
to AdWords API and Google Ads API Forum
Nirmita,

My name is Pete, not Peta. 

Can you get a colleague to review my question and respond? You managed to answer every single part of my question either incorrectly or in a misleading manner.

 1) I'm not asking if I can get the value back in String format. The "name" attribute is a resource name in the format of "accounts/1232432432432". My question, very specifically, asked "Does the businessAccountIdentifier reflect the numeric part of the "name" attribute of a My Business account?"

2) I literally linked to an example of setting up GMB using the Feedservice.mutatefeeds, therefore I'm aware that it can be done. However, my question that you seem to be responding to in 2) was "Can the Feed be setup using solely the businessAccountIdentifier or is an email address needed as well?". This awaits an answer.

3) That is not a guide. This is a guide: https://developers.google.com/adwords/api/docs/guides/feed-services-locations#complete_code_example ... I am looking for the equivalent in Google Ads.

Pete

Google Ads API Forum Advisor Prod

unread,
Jun 17, 2020, 11:22:41 AM6/17/20
to pete.l...@gmail.com, adwor...@googlegroups.com

Hi Pete,

Apologies for misspelling your name.

Please find below the answer of your questions.

  1. You can use AccountID is the string that is put for BusinessAccountIdentifier.

  2. It looks like it might be required since it says "required = TRUE", Please see here .

  3.  My team is further investigating the issue and will let you know when there's an update.

 

I hope this cleared up your confusion. Let me know if you have any additional questions.



Thanks,
Nirmita Patel Google Ads Team

 



ref:_00D1U1174p._5004Q20Z1iu:ref

Google Ads API Forum Advisor Prod

unread,
Jun 19, 2020, 3:12:20 PM6/19/20
to pete.l...@gmail.com, adwor...@googlegroups.com
Hi Pete,

Thank you for reaching out. 

Regarding your third question, the documentation that Nirmitabahen previously linked is indeed the current guide for using GMB with location extensions, and is analogous to the AdWords.  Both AdWords and Google Ads APIs provide code examples for integrating GMB and location extensions with their included examples; you can find these in the Examples/Extensions directory for each client library.  Here, for example, is the Java version.

If these resources do not meet your needs, could you please provide some details as to the difficulties that you're encountering?

Thank you,

Andrew, Google Ads API Team

ref:_00D1U1174p._5004Q20Z1iu:ref

Pete Lavetsky (AdWords API Guru)

unread,
Jun 22, 2020, 8:51:49 AM6/22/20
to AdWords API and Google Ads API Forum
Hi Andrew,

I appreciate the follow up.

The Google Ads API example is great and will be utilized, however the two pieces of information in there are really what we're looking to immediately solve.

.setEmailAddress(StringValue.of(gmbEmailAddress))
.setBusinessAccountId(StringValue.of(businessAccountIdentifier))

I understand the gmbEmailAddress to be the email address that is associated with the GMB Account for whomever the feed is being set up for.

I understand the businessAccountIdentifier to be the numerical part of the resource name of the GMB Account.

Our company acts as an agency for many clients. We have Google Ads API credentials for our clients and mutate Ads objects on their behalf. Obviously the end goal here is to also handle setting up Location Extensions for our clients as well, as programmatically as possible.

My current scope of questions broadly boils down to:

1) If one of our clients has a pre-existing GMB account setup, how do we go about discovering that via the GMB API or the Ads API? Are we to create a Search Location request and see if anything is attached to the address? I realize that is mostly a GMB related question but the current documentation / support on the GMB side of things is a bit lacking.

2) If our client does have a GMB account setup, but it's not currently associated with our GMB credentials or really associated with our company at all, is there a mechanism to programmatically send a invite from our company side to the GMB account holder to allow us access to their account? Can we programmatically accept the invite on their behalf if we have their Google Ads credentials?

3) My current understanding is that in order to get the GMB email address and the GMB account identifier, you must have authorized access to the GMB account ( ie. it's under your umbrella after going through something like question 2 ). Is it possible to setup Location Extensions for a client if they are not under your GMB ownership? ie. if you have their GMB email and their GMB account identifier can you setup Location Extensions for them even if there's been no other linking?

4) Aside from the email / account identifier attributes used in the setup examples listed prior, are there any other Ads API mechanisms to get more information or send invitations to GMB accounts? 

A lot of this is GMB in scope, so if you have anyone specific over on the GMB team you can send me contact info for that would be fantastic. 

The GMB / Location Extensions integration has been a serious slog with a lot of banging our heads on the walls, so any other documentation or full end to end examples would be great.

The Ads API integration is not the hard part. Getting the GMB email address and business account identifier has been the uphill battle.

Thanks
Pete

Google Ads API Forum Advisor Prod

unread,
Jun 22, 2020, 3:01:23 PM6/22/20
to pete.l...@gmail.com, adwor...@googlegroups.com
Hi Pete,

Thank you for explaining the issue so thoroughly.  I appreciate the frustrations that you are experiencing.  Please note that we are not GMB API experts, and can only offer limited insight into GMB functionality.

In response to your questions:

1) There isn't a mechanism for discovering an account via Ads APIs.  You can see existing location extension feeds by running a GAQL search query; see here for an example function that does so.

2) It appears that the GMB API does provide this functionality.  I can only suppose that it works similarly to Ads API, in that the invitee receives an email or other notification and must take action.

3) You will need to have access to an appropriate login for the GMB account.  Note, however, that there are some options for access through Google Ads API; I believe that this example does a good job of explaining, see lines 63-82.  There are also a variety of account types provided in GMB other than the owner; perhaps one of these might serve your business need.

4) Location feeds seem to be the only supported integration at this time.  See here for the GMB API guidance.  

I hope these provide some satisfactory answers.  I strongly suggest that you reach out to the GMB API Support team directly, as they will have much better understanding of GMB offerings.
Reply all
Reply to author
Forward
0 new messages