Google Cloud Functions is a Functions-as-a-Service (FaaS) product that lets you run your code in the cloud without any servers or containers.
RudderStack supports Google Cloud Functions as a destination where you can send your event data seamlessly.
Getting started
Before configuring Google Cloud Functions as a destination in RudderStack, verify if the source platform is supported by Google Cloud Functions by referring to the table below:
Connection Mode | Web | Mobile | Server |
---|---|---|---|
Device mode | - | - | - |
Cloud mode | Supported | Supported | Supported |
Once you have confirmed that the source platform supports sending events to Google Cloud Functions, follow these steps:
- From your RudderStack dashboard, add the source. Then, from the list of destinations, select Google Cloud Functions.
- Assign a name to the destination and click Continue.
Connection settings
To successfully configure Google Cloud Functions as a destination, you need to configure the following settings:
- Choose your Trigger Type: From the dropdown, select HTTP or HTTPS depending on the trigger type configured for your cloud function.
- Gcloud Authorization: If you have selected HTTPS as your trigger type, enter your Google Cloud Authorization Token.
- URL: Enter the URL obtained in the Trigger field during the cloud function setup.
- API Key ID: Enter your API key ID. Refer to the Google Cloud documentation for more information on creating and using the API key.
ApiKey
header in case of both the HTTP and HTTPS trigger types.- Enable Batch Input: Enable this setting to pass a batch input (array of events) to your cloud function.
- Max Batch Size: If Enable Batch Input setting is enabled, specify the maximum batch size in this field.
Supported events
Google Cloud Functions accepts identify
, track
, page
, group
, and alias
events.
FAQ
How do I create a Google Cloud Function?
To create a Google Cloud Function, follow these steps:
- Log into your Cloud Functions account and click VIEW CONSOLE.
- Select your project.
- Then, click CREATE FUNCTION.
- Enter a Function name and select the Region from the dropdown.
- In the Trigger field, select HTTP or HTTPS, depending on your use-case.
- In the Runtime, build and connections settings, specify the memory allocated for the cloud function in the Memory allocated field.
- Configure the rest of the cloud function settings as per your requirement and click Next.
- Add the function code and the language in the Runtime field.
- Enter the function name as defined in your code in the Entry point field.
- Click Deploy to save your settings and create the Cloud Function.
- In the TRIGGER tab, copy the trigger URL - this is required to set up Google Cloud Functions as a destination in RudderStack.
Contact us
For more information on the topics covered on this page, email us or start a conversation in our Slack community.