How To Remove Attributes from Google Business

Currently, you cannot unset attributes for Google Business profiles because the UI is lacking. This is a hacky workaround.

#Google Business#Other

While creating a Google Business Profile for someone, I encountered an extremely annoying bug. Google Business allows you to set attributes for a business that describe it and provide more information for potential customers. For example, whether a business

  • has a bathroom,
  • is child friendly,
  • accessible by wheelchar

etc. All of these attributes are boolean (True or False) values.

Initially, none of these values are set in the editor and they do not appear in the publicly visible profile. If an adminstrator sets one of these attributes to True or False, they appear in the profile. So far, no problem.

But once an attribute is set to true or false, it cannot be reverted to its original state of being undefined. Currently (last checked on 2023-12-28), the UI does not allow it:

From now on, the attribute will be publicly visible, regardless of whether it is true or false (although there are some exceptions to this).

For example, the attribute "Offers On-Site Services" is not defined at start and not shown in the profile. But once it is set to True or False, it will always be visible to customers via a text field that either says "This business offers on-site services" or "This business does not offer on-site services". This has been critiqued by other users as well. One user complains that the profile of their mattress company now states whether they recycle batteries or not.

Finding a solution

Since I've encountered this problem multiple times when setting up profiles for new or existing businesses, I just had to find a solution that did not involve contacting google support everytime I wanted to remove an attribute. My educated guess was that this is a UI limitation and deleting attribute values is not prohibited server-side.

Analysis

First, I used the browser developer tools to monitor the requests sent to google servers. Using Firefox, this is the tab called "Network Analysis". On clicking a "Yes" or "No" button, a POST Request is sent to the server. When setting "Has On-Site Services" to true, he request body looked somewhat like this:

"f.req=%5B%5B%5B%22wylbse%22%2C%22%5B%5C%2211975793267720408247%5C%22%2C%5Bnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2C%5B%5Bnull%2Cnull%2Cnull%2Cnull%2C%5C%22offers_online_classes%5C%22%5D%2C%5Bnull%2C%5B%5Bnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2C1%5D%5D%2Cnull%2Cnull%2C%5C%22has_onsite_services%5C%22%5D%5D%2Cnull%2C%5B%5Bnull%2Cnull%2Cnull%2Cnull%2C%5C%22languages_spoken%5C%22%5D%5D%5D%2C5%2C%5Bnull%2C%5C%22aaaaaaaaaaaaa%5C%22%2C%5C%22aaaaaa%5C%22%5D%5D%22%2Cnull%2C%22generic%22%5D%5D%5D&at=ABCDEFG&"

This is UTF-8 encoded. A decoded and prettified version of the field f.req would look like this:

[ [ [ "wylbse", "[\"11975793267720408247\",[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[null,null,null,null,\"offers_online_classes\"], [null,[[null,null,null,null,null,null,null,null,null,null,null,1]], null,null,\"has_onsite_services\"]],null,[[null,null,null,null,\"languages_spoken\"]]],5,[null,\"dshajkdsa7dbnsjakdjs7\",\"7sdadsa7\"]]", null, "generic" ] ] ]

When I set "Has On-Site Services" to False, the request body looked exactly the same, except one value in the array was 0 instead of one. I concluded, this was the new value for the attribute has_onsite_services.

Solution

Therefore, I prepared to send a request that was an exact copy of the previous requests, and replaced the one value that was 0 or 1 with null.

Using Browser Dev Tools

Firefox has a useful feature for that. On rightclicking on a request in the network analysis tab, it allows you to copy the request as a curl-url, as javaScript-code or powershell. I used powershell and created a request that looked like this:

$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession $session.Cookies.Add((New-Object System.Net.Cookie("bla", "value") Invoke-WebRequest -UseBasicParsing -Uri "https://www.google.de/local/business/u/bliblablubb" ` -Method POST ` -WebSession $session ` -UserAgent "Firefox" ` -Headers @{ "Accept" = "*/*" "Accept-Language" = "de,en-US;q=0.7,en;q=0.3" "Accept-Encoding" = "gzip, deflate, br" "Referer" = "https://www.google.de/" "X-Same-Domain" = "1" "x-goog-ext-266792519-jspb" = "[`"lu`"]" "Origin" = "https://www.google.de" "Alt-Used" = "www.google.de" "Sec-Fetch-Dest" = "empty" "Sec-Fetch-Mode" = "cors" "Sec-Fetch-Site" = "same-origin" } ` -ContentType "application/x-www-form-urlencoded;charset=utf-8" ` -Body "f.req=%5B%5B%5B%22wylbse%22%2C%22%5B%5C%2211975793267720408247%5C%22%2C%5Bnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2C%5B%5Bnull%2Cnull%2Cnull%2Cnull%2C%5C%22offers_online_classes%5C%22%5D%2C%5Bnull%2C%5B%5Bnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%2Cnull%5D%5D%2Cnull%2Cnull%2C%5C%22has_onsite_services%5C%22%5D%5D%2Cnull%2C%5B%5Bnull%2Cnull%2Cnull%2Cnull%2C%5C%22languages_spoken%5C%22%5D%5D%5D%2C5%2C%5Bnull%2C%5C%22aaaaaaaaaaaaaaaaaaaaa%5C%22%2C%5C%22aaaaaa%5C%22%5D%5D%22%2Cnull%2C%22generic%22%5D%5D%5D&at=ABCDE&"

Hurray!

This actually worked. After the usual time google takes to digest the changes, the attribute was removed from the business and did not show in its public profile anymore.

Comments

Feel free to leave your opinion or questions in the comment section below.