This article describes how to set up the Google Cloud Pub/Sub connectors. Tealium offers two Pub/Sub connectors in the Connector Marketplace: the Google Could Pub/Sub Connector (3-legged OAuth) and Google Cloud Pub/Sub (Service Account) Connector (2-legged OAuth). 

In this article:

Prerequisites

Google Cloud Pub/Sub Connector

This connector uses a three-legged OAuth flow using a client ID and secret with user input for authentication. Before configuring this connector, complete the following steps:

  1. Create an OAuth client ID credential in your Google Cloud project with an application type of web application.
  2. Update the Google Cloud web application settings to whitelist Tealium servers and provide the required callback upon successful connection. In the Google Cloud console, navigate to Credentials and edit the OAuth client ID settings with the following values. For each selection, add one of the values depending on the subdomain used in the URL of your Tealium instance.
  3. Make note of the following configuration settings to use in the connector configuration
    • Project ID
    • Client ID
    • Client Secret

Google Cloud Pub/Sub (Service Account) Connector

This connector uses two-legged OAuth flow, based on a Google Cloud service account for access. Before configuring the connector, create a service account in a Google Cloud project with a role of Pub/Sub Publisher. For more information about creating a service account, see Access Control with IAM in the Google Cloud documenation. After you create your service account, make note of the following configuration settings to use in the connector configuration:

  • Project ID
  • Service Account Email
  • Service Account Key

Configure Settings

Navigate to the Connector Marketplace and add a new connector. For general instructions on how to add a connector, see the About Connectors article.

After adding the connector, configure the following settings based on which connector you added:

Google Cloud Pub/Sub Connector

  • Google Cloud Project ID
    Required. Your Google Cloud Project ID.
  • Client ID
    Required. The OAuth Client ID in your Google Cloud project with an application type of web application. 
  • Client Secret
    Required. Enter the client secret assigned to you in your Google Cloud project.

Google Cloud Pub/Sub (Service Account) Connector

  • Google Cloud Project ID
    Required. Your Google Cloud Project ID.
  • Client Email
    Required. The service account email address used in your Google Cloud project.
  • Private Key
    Required. The private key generated for your Google Cloud project service account.

Connector Actions

Action Name AudienceStream EventStream
Send Event Data to Topic
Send Visitor Data to Topic
Send Customized Data to Topic (Advanced)

Action Settings - Parameters and Options

Click Next or go to the Actions tab. This is where you configure connector actions.

This section describes how to set up parameters and options for each action.

If the Pub/Sub topic you are publishing to has a schema attached, use the Send Customized Data to Topic action to specify a strict JSON definition which matches your schema.

Action - Send Event Data to Topic

Parameters

Parameter Description
Project Topic
  • Required
  • Select the topic in your Pub/Sub project to publish the message to.
Message Attributes
  • Optional
  • Map your attribute values to custom Pub/Sub message attributes.
  • Enter the message attribute key in the To drop-down list.
Print Attribute Names
  • If attribute names are updated, the names in the payload automatically reflect the updated name in the published message.

Action - Send Visitor Data to Topic

Parameters

Parameter Description
Project Topic
  • Required
  • Select the topic in your Pub/Sub project to publish the message to.
Message Attributes
  • Optional
  • Map your attribute values to custom Pub/Sub message attributes.
  • Enter the message attribute key in the To drop-down list.
Include Current Visit Data
  • Checking this box will include both visitor data and current visit data in the published message.
Print Attribute Names
  • If attribute names are updated, the names in the payload automatically reflect the updated name in the published message.

Action - Send Customized Data to Topic (Advanced)

Parameters

Parameter Description
Project Topic
  • Required
  • Select the topic in your Pub/Sub project to publish the message to.
Message Attributes
  • Optional
  • Map your attribute values to custom Pub/Sub message attributes.
  • Enter the message attribute key in the To drop-down list.
Custom Message Definition
  • Required
  • Provide values to construct message data.
  • For template support, reference the template name to generate message data from the template.
  • Map values to names for simple one-level JSON format, otherwise reference the template name and select only the Custom Message Definition option.
Template Variables
  • Optional
  • Provide template variables as data input for templates.
  • For additional information, see the Template Variables Guide.
  • Name nested template variables with the dot notation.
  • Example: items.name
  • Nested template variables are typically built from data layer list attributes.
Templates
  • Optional
  • Provide templates to be referenced in either message attributes or data.
  • For more information, see the Templates Guide.
  • Templates are injected by name with double curly braces into supported fields.
  • Example: {{SomeTemplateName}}

Vendor Documentation

Public