Google PubSub
Use the Google PubSub destination to send Freshpaint data to a Google Pub/Sub Topic, facilitating queued reliable delivery to any number of Topic subscribers.
Destination Info
Supports HIPAA mode
Connection Modes:
Client-side | Server-side | |
---|---|---|
Web | ||
Mobile | ||
Server |
Getting Started
To set up the Google PubSub destination, follow the steps below:
Grant Freshpaint's Google Cloud Service Account publisher access to your Topic
In your Google Cloud Console, navigate to the Pub/Sub topic list
Select one or more Topics using the checkboxes.
Click "Add Principal" and specify Freshpaint's Service Account email
pubsub@freshpaint-1.iam.gserviceaccount.com
, then choose Role: "Pub/Sub" -> "Pub/Sub Publisher", then click "Save".You should see the Freshpaint Service Account email listed under Role/Principal
Configure Freshpaint Event Definition to Topic Mappings
Go to the Google PubSub configuration page in Freshpaint and click "Configure" for
Mappings
.Click "Add Mapping"
Enter the Event Definition name to be mapped
Enter the Google Pub/Sub Topic Name
Click "Save"
Events
When you send an event to the Google Pubsub destination from Freshpaint, Freshpaint will send Event data for each mapped Event Definition to the corresponding Topic. The body of the message will look like this:
Page
When a pageview event occurs, Freshpaint will send pageview event data to the corresponding Topic. The body of the message will look like this:
Identify
When you call freshpaint.identify('hello@example.com', {"phone": "+15558675309"}
,
Freshpaint will send Identify data for each mapped Event Definition to the corresponding Topic. The body of the message will look like this:
Group
When you call freshpaint.group("Acme, Inc", {"companyId": "1234"})
,Freshpaint will send Group data for each mapped Event Definition to the corresponding Topic. The body of the message will look like this:
Payload Format
Here is what each piece of message body means:
Key | Type | Description |
---|---|---|
| string | The name of the event |
| string | The type of the event, for example |
| string | The time the event occurred.
Example: |
| string | Unique id identifying this event |
| string | The ID of the device the identify call was performed on |
| optional string | An identifier that uniquely identifies the user that performed the event (usually email address) |
| optional string | For group events, a string that uniquely identifies the group this user belongs to (such as a company name). |
| object | Data about the page that the event was performed on |
| object | Data about the Freshpaint SDK that was used to capture this event |
| object | Any additional event properties for Track and Page events |
| object | Any additional properties of the user (for identify events) or group (for group events) |
Last updated