joinCampaign([campaignParams,])
Send a request to join a user to a referral program/campaign.
Params
Param | Required | Type | Description |
---|---|---|---|
campaign.id | required | String | the id of the program/campaign the user should be added to. Note: this campaign/program must belong to your account. |
referrer | optional | String | the referrer's referral code - if passed in, a referral linking will be attempted. No referral will be made if the user was already referred. |
Response
Examples
Joining a referred user in a gated referral program so a user can become a referrer
In both browser and Server-side examples, we're able to provide an optional referrerId to link the referrer to the joining user if they were referred.
In this example we use the getReferrerId utility to fetch a referrerId from the browser session. If a referrer Id was saved before .joinCampaign is called, it
Last updated