Prerequisites
Before you can send Cello signup events, you need to make sure that you are able to capture the referral codeucc
during signup or demo booking:
- When users sign up in your web app
- When users sign up in your mobile app
- When users book a demo using Hubspot or Typeform forms or scheduling
Attribution based on organization levelIf the buying persona is the organization and you want to attribute purchases at the organization level, always provide the ID of the organization in the parameter
payload.newUserId
Tracking signup events
For a SaaS application signup flow, you will track a signup event or equivalent. Depending on how you create a new user and which payment gateway you are using, you can choose from the following options to send Cello signup events.Option 1: Using Stripe - I create Stripe Customer at Signup
Use this option if your payment gateway is Stripe and you create a Stripe customer at signup
metadata
to Stripe Customer Object on customer creation.
cello_ucc
- ucc, a referral code identifying the referrer. You can retrieve this code using attribution scriptgetUcc ()
method, you have installed as a prerequisite to this guide.new_user_id
- a unique user ID in your system, identifying the new user who just signed up. This should be the same ID (productUserId
) you will use to boot the Referral component, when this user logs into your appnew_user_organization_id
(optional) - add this, if your referrers can refer an organization rather then a single user and you want to reward based on that.
Now that the customer is created in Stripe with Cello metadata, a
customer.created
event will be sent with Stripe Webhook, which we will count as a signup event in Cello.Option 2: Using Chargebee - I create Chargebee customer at signup
Use this option if your payment gateway is Chargebee and you create a Chargebee customer at signup
You can also choose to use Chargebee custom fields (CF_) to add referral data to the event. Learn more about custom fields in the Chargebee documentation
cello_ucc
- ucc, a referral code identifying the referrer. You can retrieve this code using attribution scriptgetUcc ()
method, you have installed as a prerequisite to this guide.new_user_id
- a unique user ID in your system, identifying the new user who just signed up. This should be the same ID (productUserId
) you will use to boot the Referral component, when this user logs into your appnew_user_organization_id
(optional) - add organization ID, if your referrers can refer an organization and you want to reward them for organization account expansion.
Now that the customer is created in Chargebee with Cello metadata, a
Customer Created
event will be sent with Chargebee Webhook, which we will count as a signup event in Cello.Option 3: Using Cello API POST /events API endpoint
Use this option for all other use cases. For example:
- You use Stripe or Chargebee, but customer is created in the payment gateway at purchase.
- Your payment gateway is Paddle, Recurly or other, including in-house built payment gateways
new-signup
event to the Cello API with the following values in the payload:
ucc
- ucc, a referral code identifying the referrer. You can retrieve this code using attribution scriptgetUcc ()
method, you have installed as a prerequisite to this guide.newUserId
- a unique ID in your system, identifying the new user who just signed up. Can also be organization ID, if your referrers can refer organizations and you want to reward them for organization account expansion.newUser.id
- unique ID of the new user (not the organization, if you are rewarding on organization level). This should be the same ID (productUserId
) you will use to boot the Referral component, when this user logs into your appnewUser.email
- new user emailnewUser.name
- new user namenewUser.organizationId
(optional) - add organization ID, if your referrers can refer an organization and you want to reward them for organization account expansion.
POST /events
call to send a new-signup
event:
Tracking “demo attended” event
Use this option if your product follows a sales-led model where successful conversions are driven by users attending a demo call.
demo-attended
event to the Cello API with the following values in the payload:
ucc
- ucc, a referral code identifying the referrer. You can retrieve this code using attribution scriptgetUcc ()
method, you have installed as a prerequisite to this guide.newUserId
- a unique ID in your system, identifying the new user who just signed up. Can also be organization ID, if your referrers can refer organizations and you want to reward them for organization account expansion.newUser.id
- unique ID of the new user (not the organization, if you are rewarding on organization level). This should be the same ID (productUserId
) you will use to boot the Referral component, when this user logs into your appnewUser.email
- new user emailnewUser.name
- new user namenewUser.organizationId
(optional) - add organization ID, if your referrers can refer an organization and you want to reward them for organization account expansion.
POST /events
call to send a new-signup
event: