Signup

Indicates a new user has signed up for an account.

❗️

Deprecated API Warning

This page documents a no-longer supported version of the Boomtrain JavaScript Library (versions 4.x and below). The new p13n.js library, documented here is the currently supported library for integrating with ZetaHub.

When a new user signs up for an account or identifies for the first time, call signup. This function will do the following automatically:

  1. Identify this user with the specified user_id, merging any anonymous browsing history for this user into the newly-created profile and ensuring that subsequent behavior is tracked to this identity.
  2. Track an event called started_membership to indicate the signup along with any attributes of this signup event. This event can be useful for triggering welcome campaigns.
  3. Set attributes or preferences for this user's new profile in the Boomtrain Marketing Engine.

If a different identified user was browsing at the time this function is called, the new identity passed into this function will supersede the previous identity, and the newly signed-up user's identity will be used for subsequent behavioral tracking in this browser.

_bt.signup(identifier, [attributes], [callback])

The signup call has the following fields:

FieldDescription
identifierObjectAn identifier for this new user, either a user_id or an email address. This value must be a case-insensitive unique identifier for your user. See Identifier Format below for details.
attributes optionalObjectAn object containing key:value pairs indicating attributes to be set on this user and tracked as metadata in the started_membership event. See Attributes Format below for more information.
callback optionalFunctionA function that is executed after this function completes and the browser is now identified according to the newly-signed up user.

Identifier Format

The signup function allows you to mark a user signup with either a unique user ID or an email address. These must be specified exactly as either a user_id or an email property of the object, and only one of these two may be specified. When an email is specified, this email will be added to the contacts field for this user in the Boomtrain Marketing Engine.

_bt.signup(
  {'user_id':'example_user'}, 
  {'newsletter':true}
);
_bt.signup(
	{'email':'[email protected]'}, 
  {'newsletter':true}
);

Attributes Format

Attributes can be provided to be set as user attributes on the new user. These attributes will be attached to the user's profile in the Boomtrain Marketing Engine, and they will also be added as metadata on the started_membership event.

While attributes can have any form, the following attributes are reserved and specially-handled by Boomtrain:

FieldDescription
first_nameStringFirst name of the user.
last_nameStringLast name of the user.
emailStringEmail address of the user. Note that this will be added as a contact to this user's profile in the Boomtrain Marketing Engine. Note that if a different email is provided in the identifier part of this call from this value, this field will be ignored.
signed_up_atISO-8601 Timestamp StringTime at which this user signed up. Note that this attribute will be automatically set to the current timestamp if not provided.
_bt.signup(
	{ 'user_id':'example_user'}, 
  {	'first_name': 'Marty',
  	'last_name': 'McFly',
    'signed_up_at': '1955-11-12T10:04:00+08:00'
    'email':'[email protected]',
    'newsletter':true,
    'favorite_car':'DeLorean',
    'soundtrack':'Power of Love',
    'friends': ['Doc Brown', 'Einstein', 'Jennifer'],
    'rivals': ['Biff Tannen', 'Principal Strickland']
  },
  callbacktothefuture()
);