Skip to main content

B2B SaaS

This guide explains how B2B SaaS companies should send core user and account lifecycle data to Intilery.

Overview#

Most B2B SaaS companies have a few common, core lifecycle events for users and accounts. We understand that account hierarchies can be unique and complex, but by following this spec you can take advantage of account-based tools on the Intilery platform.

Events#

The B2B SaaS category has the following semantic events:

Account Created#

This event should be sent when a new account is created.

Properties#

This event supports the following semantic properties:

PROPERTYTYPEDESCRIPTION
account_nameStringThe name of the account being created.
context.groupIdStringThe id of the account being created.

Example#

{  "userId": "019mr8mf4r",  "type": "track",  "event": "Account Created",  "properties": {    "account_name": "Initech"  },  "context": {      "groupId": "acct_123"      }}

Account Deleted#

This event should be sent when an account is deleted.

Properties#

This event supports the following semantic properties:

PROPERTYTYPEDESCRIPTION
account_nameStringThe name of the account being deleted.
context.groupIdStringThe id of the account being deleted.

Example#

{  "userId": "019mr8mf4r",  "type": "track",  "event": "Account Deleted",  "properties": {    "account_name": "Initech"  },  "context": {      "groupId": "acct_123"      }}

Signed Up#

This event should be sent when a user signs up for your service.

Good to know: Intilery’s best practice is to use an “Object-Action” naming convention, which in this case would be “User Signed Up”. However, because in the B2B case this may not be a specific user, we omit that noun in our example. You may include or omit it as needed for your implementation.

Properties#

This event supports the following semantic properties:

PROPERTYTYPEDESCRIPTION
typeStringThe type of signup, e.g. invited, organic.
first_nameStringThe first name of the user.
last_nameStringThe last name of the user.
emailStringThe email of the user.
phoneStringThe phone number of the user.
usernameStringThe username of the user.
titleStringThe title of the user.
context.groupIdStringThe id of the account the user is joining.

Example#

{  "userId": "019mr8mf4r",  "type": "track",  "event": "Signed Up",  "properties": {    "type": "organic",    "first_name": "Peter",    "last_name": "Gibbons",    "email": "pgibbons@example.com",    "phone": "410-555-9412",    "username": "pgibbons",    "title": "Mr"  },  "context": {      "groupId": "acct_123"      }}

Signed In#

This event should be sent when a user signs in to your service.

Good to know: Intilery best practice is to use an “Object-Action” naming convention, which in this case would be “User Signed In”. However, because in the B2B case this may not be a specific user, we omit that noun in our example. You may include or omit it as needed for your implementation.

Properties#

This event supports the following semantic properties:

PROPERTYTYPEDESCRIPTION
usernameStringThe username of the user logging in.
context.groupIdStringThe id of the account being created.

Example#

{  "userId": "019mr8mf4r",  "type": "track",  "event": "Signed In",  "properties": {    "username": "pgibbons"  },  "context": {      "groupId": "acct_123"      }}

Signed Out#

This event should be sent when a user signs out for your service. You should also call analytics.reset() to refresh the cookie when a Signed Out event occurs.

Good to know: Intilery's best practice is to use an “Object-Action” naming convention, which in this case would be “User Signed Out”. However, because in the B2B case this may not be a specific user, we omit that noun in our example. You may include or omit it as needed for your implementation.

Properties#

This event supports the following semantic properties:

PROPERTYTYPEDESCRIPTION
usernameStringThe username of the user logging in.
context.groupIdStringThe id of the account being created.

Example#

{  "userId": "019mr8mf4r",  "type": "track",  "event": "Signed Out",  "properties": {    "username": "pgibbons"  },  "context": {      "groupId": "acct_123"      }}

Invite Sent#

This event should be sent when a user invites another user.

Properties#

This event supports the following semantic properties:

PROPERTYTYPEDESCRIPTION
invitee_emailStringThe email address of the person receiving the invite.
invitee_first_nameStringThe first name of the person receiving the invite.
invitee_last_nameStringThe last name of the person receiving the invite.
invitee_roleStringThe permission group for the person receiving the invite.

Example#

{  "userId": "019mr8mf4r",  "type": "track",  "event": "Invite Sent",  "properties": {    "invitee_email": "pgibbons@example.com",    "invitee_first_name": "Peter",    "invitee_last_name": "Gibbons",    "invitee_role": "Owner"  },  "context": {      "groupId": "acct_123"      }}

Account Added User#

This event should be sent when a user is added to a group.

Properties#

This event supports the following semantic properties:

PROPERTYTYPEDESCRIPTION
roleStringThe permission group for this user in this account.
context.groupIdStringThe id of the account being created.

Example#

{  "userId": "019mr8mf4r",  "type": "track",  "event": "Account Added User",  "properties": {    "role": "Owner"  },  "context": {      "groupId": "acct_123"      }}

Account Removed User#

This event should be sent when a user is removed from a group or account.

Properties#

This event supports the following semantic properties:

PROPERTYTYPEDESCRIPTION
context.groupIdStringThe id of the account being created.

Example#

{  "userId": "019mr8mf4r",  "type": "track",  "event": "Account Removed User",  "properties": {},  "context": {      "groupId": "acct_123"      }}

Trial Started#

This event should be sent when a trial is started.

Properties#

This event supports the following semantic properties:

PROPERTYTYPEDESCRIPTION
trial_start_dateDateThe date when the trial starts. It is an ISO-8601 date string.
trial_end_dateDateThe date when the trial ends. It is an ISO-8601 date string.
trial_plan_nameStringThe name of the plan being trialed.
context.groupIdStringThe id of the account being created.

Example#

{  "userId": "019mr8mf4r",  "type": "track",  "event": "Trial Started",  "properties": {      "trial_start_date": "2018-08-28T04:09:47Z",      "trial_end_date": "2018-09-20T04:09:47Z",      "trial_plan_name": "Business"  },  "context": {      "groupId": "acct_123"      }}

Trial Ended#

This event should be sent when a trial ends.

Properties#

This event supports the following semantic properties:

PROPERTYTYPEDESCRIPTION
trial_start_dateDateThe date when the trial starts. It is an ISO-8601 date string.
trial_end_dateDateThe date when the trial ends. It is an ISO-8601 date string.
trial_plan_nameStringThe name of the plan being trialed.
context.groupIdStringThe id of the account being created.

Example#

{  "userId": "019mr8mf4r",  "type": "track",  "event": "Trial Ended",  "properties": {      "trial_start_date": "2018-08-28T04:09:47Z",      "trial_end_date": "2018-09-20T04:09:47Z",      "trial_plan_name": "Business"  },  "context": {      "groupId": "acct_123"      }}