Skip to main content

Overview

This document outlines how to publish user events and user attributes using the Auxia system on Pub/Sub. It covers the correct structure for textproto data and the resulting message from Pub/Sub.

Client Requirements

To set up Pub/Sub integration, please provide:
  1. Topic Name (Full Path)
    • Example: projects/my-company/topics/user-events
  2. Permission on the Topic
    • Grant Auxia’s service account (data-transfer@auxia-gcp.iam.gserviceaccount.com) the pubsub.subscriptions.create permission on the above topic, allowing us to create a subscription on our end.

Events:

Schema for User Events:

Please refer to the schema specified in the documentation for Event Transaction data. Use the exact schema provided at the following link: Auxia User Events Schema.

Textproto Format for Publishing Events:

To publish user events in the Auxia system, the following textproto format is used. The schema for the Event and LogEventsRequest messages is as per the documentation. Sample textproto:

Sample Message Pulled from Pub/Sub:

Decoding the Message from Pub/Sub:

After pulling the message from Pub/Sub, it needs to be decoded into a readable format. The data field in the message contains a base64-encoded string. This string must be decoded into a JSON structure that matches the schema of the LogEventsRequest. Sample decoded message:

User Attributes:

Schema for User Attributes:

Please refer to the documentation of User Attributes. Use the exact schema below:

Textproto Format for Publishing User Attributes:

To publish user events in the Auxia system, the following textproto format is used. The schema for the UserProperties messages is as per the schema mentioned above. Sample textproto:

Sample Message Pulled from Pub/Sub:

Decoding the Message from Pub/Sub:

After pulling the message from Pub/Sub, it needs to be decoded into a readable format. The data field in the message contains a base64-encoded string. This string must be decoded into a JSON structure that matches the schema of the AuxiaUserAttribute. Sample decoded message: