NAV
shell

GRPC Documentation

Table of content:

Feeder.proto

Booking related messages.

This file is really just an example. The data model is completely fictional.

ActionTrackingEventRequest

Represents action tracking request object. On top of the generic properties of all events, an action tracking event is defined by other properties depending on its type.

Field Type Label Description
name string name required Name of the custom event
value_string string
value_integer int32
type ActionTrackingEventRequest.Type type required Type of the action tracking
position Position Position of the support
resolution Resolution Resolution of the screen
tracking_data Tracking tracking_data required Common tracking information

AllocationRequest

Represents Allocation request object

Field Type Label Description
visitor_id string visitor_id required ID unique of visitor
campaign_id string campaign_id not required, if not passed all allocations will be returned ID unique of campaign

AllocationResponse.AllocationsEntry

Field Type Label Description
key string
value string

CampaignActivatedEventRequest

Represents Campaign activated event request object. The campaign activated event takes in parameter the campaign ID and the variatiation ID

Field Type Label Description
campaign_id string campaign_id required ID unique of campaign
variation_id string variation_id required ID unique of variation
tracking_data Tracking tracking_data required Common tracking information

Currency

Transaction currency object If one property is missing, the currency object should be rejected

Field Type Label Description
name string name required Name of the currency passed used for payment
rate float rate required Change rate between USD in cents (used for reference) and the currency used for payment

CustomEventRequest

Represents Custom event request object. A custom event is defined by a name and a value.

Field Type Label Description
name string name required Name of the custom event
value_string string
value_integer int32
tracking_data Tracking tracking_data required Common tracking information

GenerateVisitorResponse

Represents Generate visitor response object

Field Type Label Description
id string id required ID unique of visitor

Item

Item object

The transaction on the micro level - aka the items

Field Type Label Description
name string name required Product name
price int32 price required Unit price in cents
sku string SKU/code
category string Category or variation
quantity int32 Quantity
tax_amount int32 Tax applicable for the item cents
tax_rate float Tax rate applicable for the item

LatLong

Represents geolocation object.

Field Type Label Description
lat double lat required min : -90 max : 90 Latitude
long double long required min : -180 max : 180 Longitude

Position

Represents position object.

Field Type Label Description
x uint32 x required X coordinate
y uint32 y required Y coordinate

Resolution

Represents resolution object.

Field Type Label Description
width uint32 width required Resolution width
height uint32 height required Resolution height

Tracking

Represents common tracking object. All the events should have generic properties that are listed below.

Field Type Label Description
visitor_id string visitor_id required length equal to 20 chars ID of tracked visitor
device_type Tracking.DeviceType device_type required Type of device
origin string origin required Origin of the event (may be page uri OR screen name)
geolocation LatLong geolocation optional Geo Coordinates
ip string Ip adress used to determine the geolocation optional
timestamp google.protobuf.Timestamp timestamp not required Timestamp of the event

TransactionEventRequest

Represents Transaction event request object. The main properties of the transaction are the amount of the transaction and the number of items purchased.

Field Type Label Description
id string id required ID unique of transaction
name string name required Objective name of the transaction
revenue int32 revenue required Grand total in cents
shipping int32 shipping required Shipping in cents
tax_total int32 Total taxes in cents
currency Currency Transaction currency
discount int32 Discount in cents, if applicable
payment_method string Payment method
item_count int32 Number of items orderded (if items property defined then this property is ommited????)
items Item repeated List of items
tracking_data Tracking tracking_data required Common tracking information

VisitEventRequest

Represents Visit event request object Allows customers to track visit that occurs on screens and pages of their website/app

Field Type Label Description
tracking_data Tracking tracking_data required Common tracking information

ActionTrackingEventRequest.Type

Name Number Descirption
EMPTY 0
TOUCH 1 Action type is touch
CLICK 2 Action type is click

Tracking.DeviceType

Name Number Descirption
EMPTY 0
OTHER 1
DESKTOP 2
MOBILE_PHONE 3
TABLET 4
CAMERA 5
TV 6
GAMES_CONSOLE 7
PAYMENT_TERMINAL 8
WRISTWATCH 9

Feeder

Service for handling visitor’s events.

Method Name Request Type Response Type Description
GenerateVisitor .google.protobuf.Empty GenerateVisitorResponse Allows customers to generate an unique visitor ID
SendActionTrackingEvent ActionTrackingEventRequest .google.protobuf.Empty Allows customers to track conversion on their website / app
SendCustomEvent CustomEventRequest .google.protobuf.Empty Allows customers to track custom conversion on their website / app
SendCampaignActivatedEvent CampaignActivatedEventRequest .google.protobuf.Empty Allows customers to retrieve the users that have been enrolled in a specific variation and count them as an activated visitor in the reporting of the campaign
SendTransactionEvent TransactionEventRequest .google.protobuf.Empty Allows customers to track purchase on their website / app
SendVisitEvent VisitEventRequest .google.protobuf.Empty Allows customers to track visit that occurs on screens and pages of their website/app
Allocate AllocationRequest AllocationResponse Allows customers allocate the variation of the campaign to the visitor

Scalar Value Types

.proto Type Notes C++ Type Java Type Python Type
double double double float
float float float float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long
uint32 Uses variable-length encoding. uint32 int int/long
uint64 Uses variable-length encoding. uint64 long int/long
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long
sfixed32 Always four bytes. int32 int int
sfixed64 Always four bytes. int64 long int/long
bool bool boolean boolean
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String stri/unicode
bytes May contain any arbitrary sequence of bytes. string ByteString str