Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
stylenone
Note

This article relates to both journy.io's SDKs and Twilio Segment SDKs.

Table of Contents
stylenone

...

journy.io’s Ruby library lets you record data from your platform, from your Ruby code.

...

The identify call has the following fields:

Field

Type

Description

user_id

String

ID for this user in your database. Optional if anonymous_id is provided.

anonymous_id

String

The ID associated with the user when you don’t know who they are. Optional if user_id is provided.

traits

Hash

A Hash of traits you know about the user. Things like: email, firstname, lastname or friends.

context, optional

Hash

A Hash that can include things like user_agent or ip.

integrations, optional

Hash

Specifies which destinations this should be sent to.

timestamp, optional

Time

Represents the time when the action took place. This is most useful if you’re importing historical data. If the identify just happened, leave it blank and we’ll use the server’s time.

message_id, optional

String

Unique identifier for each message that lets you find an individual message across the API.

Identifying users happen incremental: You can identify users with a subset of traits; and later make another identify call with another subset of traits. The result of both identify calls will be the union of all traits.

...

The group call has the following fields:

FIELDS

TYPE

DESCRIPTION

user_id

String

ID for this user in your database. Optional if anonymous_id is provided.

anonymous_id

String

The ID associated with the user when you don’t know who they are. Optional if user_id is provided.

group_id

String

The ID of the group.

traits optional

Hash

A hash of traits you know about the group. For a company, they might be things like name, address, or phone.

context, optional

Hash

A Hash that can include things like user_agent or ip.

integrations, optional

Hash

Specifies which destinations this should be sent to.

timestamp, optional

Time

Represents the time when the action took place. This is most useful if you’re importing historical data. If the identify just happened, leave it blank and we’ll use the server’s time.

message_id, optional

String

Unique identifier for each message that lets you find an individual message across the API.

Note

To identify a group, without adding a user, you can use anonymousId with the same value of the groupId. It goes like this:

Code Block
Analytics.group({ 
   anonymous_id: 'xyz789', # Tesla — unique Id from database
   group_id: 'xyz789', # Tesla — same unique Id from database
   traits: { 
      name: 'Tesla Inc', 
      industry: 'Automotive' }
})

...

The track call has the following fields:

Field

Type

Description

user_id

String

ID for this user in your database. Optional if anonymous_id is provided.

anonymous_id

String

The ID associated with the user when you don’t know who they are. Optional if user_id is provided.

event

String

The name of the event you’re tracking. We recommend human-readable names like Song Played or Status Updated.

properties, optional

Hash

A Hash of properties for the event. If the event was Product Added to their cart, it might have properties like price or product.

context, optional

Hash

A Hash that can include things like user_agent or ip.

integrations, optional

Hash

Specifies which destinations this should be sent to.

timestamp, optional

Time

Represents the time when the action took place. This is most useful if you’re importing historical data. If the identify just happened, leave it blank and we’ll use the server’s time.

message_id, optional

String

Unique identifier for each message that lets you find an individual message across the API.

Find details on best practices in event naming as well as the track method payload in the journy.io Spec.

...

The page call has the following fields:

Field

Type

Description

user_id

String

ID for this user in your database. Optional if anonymous_id is provided.

anonymous_id

String

The ID associated with the user when you don’t know who they are. Optional if user_id is provided.

name

String

The name of the page, for example Signup or Home.

category optional

String

The category of the page. Useful for things like ecommerce where many pages might live under a larger category. Note: if you only pass one string to page we assume it’s a name, not a category. You must include a name if you want to send a category.

properties, optional

Hash

A Hash of properties for the page.

context, optional

Hash

A Hash that can include things like user_agent or ip.

integrations, optional

Hash

Specifies which destinations this should be sent to.

timestamp, optional

Time

Represents the time when the action took place. This is most useful if you’re importing historical data. If the identify just happened, leave it blank and we’ll use the server’s time.

message_id, optional

String

Unique identifier for each message that lets you find an individual message across the API.

Find details on the page payload in the journy.io Spec.

...

FIELD

TYPE

DESCRIPTION

on_error optional

Proc

A handler which is called whenever errors are returned from the API. Useful for debugging and first time destinations.

max_queue_size optional

FixNum

The max number of messages to put in the queue before refusing to queue more (defaults to 10,000).

batch_size optional

FixNum

The max number of events/identifies to send in a single batch (defaults to 100). The API servers will not respond to messages over a certain size, so 100 is a safe default.

stub optional

TrueClass|FalseClass

If true, the requests don’t hit the server and are stubbed to be successful (defaults to false).

...

Tip: Need help integrating journy.io to your web-site and/or App?

Reach out to our support team

...

or book time to make it together

...