Initializes Cello Referral Component in your product.Returns a promise that is resolved once the whole initialization process is finished or rejected if the boot command failed.
The solution above is designed so that you don’t have to wait for the library to finish loading before you call the command - follow it and use the window.cello object to avoid that particular race condition.
For any other commands, or when you are sure that the command is called after the library has finished loading, you can opt to use the regular command syntax:
First name of the product user.
This data is used in the personalization of the referral experience, e.g. email notifications and the personalized message to referees.
Required for select features
Product user country, if known. ISO 3166 Alpha-2 standard e.g. DE.
If the country is not on the supported payout countries list, the Referral Component will not be booted for this user.
If no country is passed, Cello will still be booted.
Note: this uses the country your product has on file, which may differ from the user’s actual PayPal payout country. See the unsupported countries guidance for tradeoffs before using this to gate visibility.
The language, in which the Referral Component will be loaded in ISO 639-1.
Default: undefined. If undefined, we use default language set for your product.
Note: the language must be enabled for your product by Cello - if the language is not enabled, this parameter has no effect and the component falls back to your product’s default language. Contact Cello support to enable additional languages.
Hides the entire default Cello launcher button. Use this when you want to provide your own launcher element via customLauncherSelector.
Default: false.
Note: this hides the button, not just the notification badge. To hide only the badge on a custom launcher element, add data-cello-badge="false" to your HTML element instead - see Configure notification badge. There is no hideDefaultBadge boot option.
Callback handler for user interactions within the Referral Component.
Receives two parameters: action (string) and payload (any).
Currently supports linkCopied action which provides the copied URL as payload.
A fulfilled promise from showAnnouncement only means the SDK accepted the request. It does not mean the announcement is visible to the user.The announcement is anchored to the element matched by your Announcement Selector using document.querySelector (first match in DOM order). If that element is hidden, zero-sized, or off-screen, the announcement renders but is invisible. If you see Promise {<fulfilled>: undefined} but no announcement, run document.querySelectorAll("<your selector>") in the console - the result must be exactly one visible element.See Troubleshooting: announcement not showing for the full diagnostic flow.
First name of the product user.
This data is used in the personalization of the referral experience, e.g. email notifications and the personalized message to referees.
Required for select features