[Tips & Scripts] Google Sheets Integration


Userlevel 7
Badge +3

Note from Unbounce :spinbounce:
This script + tutorial will allow you to send your leads directly from your Unbounce page into a Google sheet via webhook – without the need for an additional service. This nifty script was created by Community rockstar Hristian Kambourov to showcase some of the awesome third-party Unbounce features he’s been developing.

DISCLAIMER:
This is not an official Unbounce feature. This functionality is based entirely on third party code, and has only been tested in limited applications. Since this isn’t a supported Unbounce feature, our support team will be unable to assist if things go awry. If you have any questions about this script, please reach out to our Unbounce Expert  Hristian Kambourov


Why would I want to push my leads to a Google Sheet?
Well, you don’t have to since Unbounce offers a perfectly good way to export a list of your leads. 

However, you have to do it manually.

  • Pushing leads to a Google Sheet is almost instantaneous and in real time.
  • You can further use Google Sheets to create automatic reports for you or your clients through the help of a free Zapier plan. (Ex. Email me when I get X amount of leads in a particular sheet)
  • You can share Google Sheets within your company. This way your whole marketing or sales team can have a real-time view of how your Unbounce campaigns are performing

How does it work?
Google Sheets has a handy little feature that allows you to write scripts that interact with your sheets.  Furthermore, the script can also have a public facing URL (web address) that you can use as a webhook. 

When you combine the above two features with the ability to push Unbounce form data through a webhook, you’ve got yourself a free Unbounce to Google Sheets integration. 

No need to host scripts. Just 5min. of your time to set it up.

Plus, you can use it on as many pages/sheets you want and push practically unlimited amount of leads to your Google Sheets. 

Can I see it?
You can see the script working on this Unbounce page. Just click on the “Click me to test this script”, fill out the form and you’ll be redirected to a Google Sheet where you’ll find the form data you just submitted. 

How do I implement this for my pages?

  • On the example page, there is a link to download the detailed instructions and script.
  • Alternatively, you can go directly here and download it. 

How much does it cost?
It’s free. I’ve intentionally set the price on the download page to “0+”. Meaning you can enter 0 and get it for free. However, if you think it’s worth a coffee, couple of beers or a nice lunch, you can enter any amount you want. 

Why is this free?
It’s my way to thank the Unbounce Community members and also a way for you to stay informed about the awesome Unbounce premium scripts my company would be releasing soon.


29 replies

Hey @Hristian ,

 

I’m getting an Unauthorized 401 HTTP Response Code on Unbounce.

 

My first thought was maybe it’s because of the access “Who has access” to this app option. The only options it gives me are “Me” and Anyone at my company. I don’t see an option to give access to anyone and everyone. But maybe that’s not the issue, I’m not sure.

Userlevel 7
Badge +3

Hi @mstreit,

Yes, the current script doesn’t work well with multiple checkboxes. It’s a known issue but I never found the time to work on it.

Best,
Hristian

Hi @Hristian, sorry for rolling up this topic after “years”.
We have some multiple checkboxes in our form (e.g. Choose your favorit fruits: Apple, Banana etc.). If the user picks two or more answers, only the first answer will send into the google sheet field.

It would be nice, if all answers could send into one field in the google sheet (maybe separated by comma).

Sheets-Unbounce

Do you have a solution for us? Many thanks in advance.

That looks helpful, Hristian. I’ll definitely give it a try.

Meanwhile, for those of you who are not comfortable with coding, you can set up your Unbounce integration with Google Sheets without any code here - https://automate.io/integration/google-sheets/unbounce

Use cases:

  • You can push your leads to a row in a Google spreadsheet
  • You can even update those rows with new entries from Unbounce

How does it work?

  1. Connect your Unbounce and Google Sheets accounts.
  2. Set up your Unbounce trigger as New Form Entry and Google Sheets action as Add Row (there are a lot of actions that can come in handy for you here, Add row is just one of them)
  3. Map the lead data that you need from Unbounce to your Google spreadsheet.
  4. Test the integration and make it live.

Let me know if you need more help with this, guys.

Userlevel 7
Badge +3

Hey @Ramprasanth_Alagar,

I don’t have access to your account so it’s kind of impossible to troubleshoot this based on a single screenshot.

The error you are seeing is probably because you’ve used the wrong URL for the webhook or because the script wasn’t set up properly.

Best,
Hristian

Hi [Hristian]
I did it once again according to instruction. but not fixed.

Screenshot 2020-04-15 at 20.36.25

Userlevel 7
Badge +3

Hey @Ramprasanth_Alagar,

I would suggest to start from scratch and make sure you follow the instructions exactly as outlined in the implementation guide.

Based on your short comment, it seems you might have missed when authorizing the script.

Best,
Hristian

HI [Hristian]
I have set up according to instruction but it shows error (Unauthorized).

Userlevel 7
Badge +3

Hi @Stefan_Mitmansgrbuer,

Just tested the script with a new Google sheet and it works as expected.

Make sure you follow the instructions fully.

Best,
Hristian

Hi Hristian,

thanks for the ultra-quick reply. We tried some different accounts so far - none of them worked.

Best,
Stefan

Userlevel 7
Badge +3

Hi @Stefan_Mitmansgrbuer,

The script worked as of a few days ago so based on your comment, I would assume there might be some internal Google Apps policies for your account that might be preventing the proper running of the script.

As a way to troubleshoot this, try running the script with a personal account. If that works, the issue must surely be with the security policies of your Google Apps account.

Best,
Hristian

Hi Hristian,

it seems like there’s a problem with the authorisation of the script. It says that the google log in is not approved for the app. Do you have any idea what to do?

Best,
Stefan

Userlevel 7
Badge +3

Yes, the script still works.

Just make sure you follow the instructions exactly.

Best,
Hristian

Hi Everyone, I just wanted to jump in and ask if this script still works properly. i need to use this as of Jan 1. 2020. Thanks

Userlevel 7
Badge +3

Hi @Lenny_Cagno,

It should be possible in theory. I’ve seen a few projects where Google Sheets is used as a crude database.

Best,
Hristian

Is there a way to “reverse” this script? Have a prepopulated google sheet that will push back into unbounce? That way I can personalize the fields to individual. I would rather not use utms to push data.

Thanks
Lenny

Userlevel 7
Badge +3

Hi @nbanda,

This is unfortunately a limitation of my script at the moment.

The script can be modified to accomodate your particular use case but you would have to be comfortable writing code.

Alternatively, you can use Zapier to accomplish your task.

Best,
Hristian

Hi,

I have a checkboxes field with 7 choices. When the data gets transferred to google sheet, only the first selected choice is being recorded. Do you happen to know how we can possibly resolve this so that all the checked fields will be copied over as well?

Userlevel 7
Badge +3

Hi @Admin_iLogic,

Are you referring to a Google Sheet with more than 1 sheet in the same document?

If so, the current script only works with a single sheet documents. It can be adjusted to work with multiple sheets but that would require re-writing the script.

Alternatively, you can store the webhook/values into one and use part of it to do calculations in another.

Best,
Hristian

Is it possible to create a webhook that will work on a sheet that has two edit#gid= but only change data on one of them because what is happening now is unbounce cannot find the url

Userlevel 7
Badge +3

UPDATE

Recently, one of the users of my script alerted me to the fact that the script wasn’t working and Google was giving out an error when you try to run it.

In the last few weeks, there seems to have been an update on part of Google that “broke” the script.

  • If your script is running fine and receiving data from Unbounce - there is no need for you to do anything. It should continue to work as expected.

  • If you need to setup a new integration between Unbounce and a new sheet, please re-download the documentation. Inside of it, you’ll find a link to the updated and working version of the script.

Best,
Hristian

Userlevel 7
Badge +3

Hi @pritha_aash,

The documentation adds an empty space on the second line of the link for some reason.

Just copy/paste the link and make sure there is no empty space in it.

Best,
Hristian

@Hristian I am unable to access the google sheet in the downloaded guide (It’s not clickable, I tried typing it out too 😓). Could you share the link here? Unless I get it, I am unable to follow the remaining steps on the guide.

Userlevel 7
Badge +3

Hi Charles, 

Thank you for the kind words and for giving it try.

I’m the creator of the script and can tell you that over 35 marketers and companies are using it on their pages. 

Please do let me know if you run into trouble setting it up.

Best,
Hristian

Badge

Wow, I am very grateful. I’m a big fan of Unbounce, but I needed to find a simple way to transition some of my landing pages without getting into complicated and heavy integrations with other 3rd party platforms/CRMs. This is the solution I was hoping to find. There must be a reason why Unbounce does not integrate this option like all of the others (I trust they know much more about this stuff than I do), but this is an excellent option. I’m crossing my fingers that this works as well as it seems to. 

Reply