Learn how to install Cello Referral Component into your web application
productId
and PRODUCT_SECRET
from your Cello dashboard’s Access Keys page for the right environment (Sandbox or Production)
*.cello.so
domains. If your application has strict CSP headers, add script-src 'unsafe-inline' https://assets.cello.so https://assets.sandbox.cello.so
to your CSP configuration to prevent CORS-related loading issues.head
tag of your HTML:
window.Cello
for communication between your page and Cellowindow.cello.cmd
and maintains the command interfaceOption 1: Named user whitelist
Option 2: Show/Hide Referral Component conditionally
show()
and hide()
methods.For example, you may decide to only show the Referral component after the user has completed onboarding. In that case, when a user first logs in, boot the component with hideDefaultLauncher = true
configuration option. Then, when the onboarding is complete, use cello.show()
to show the Cello button.cello-open=true
param to your URL.
For example, add a link to the referral component to your email communication to help your users access the sharing options directly from the email.
invite
, rewards
and edit-payments
values to the param for the Referral Component to open a specific tab automatically e.g.:
Error 1200: Invalid Tenant
Error 1100: Invalid JWT token
Failed to load resource: the server responded with a status of 401 () [Cello]: "User is not authorized to load the widget"
PRODUCT_SECRET
.productUserId
is not passed as a string
in the payload for the JWT token creation.productId
.issuedAt
(iat
) date cannot be older than 24h or set in the future.Error: User is not authorized to load the widget
productUserId
as a string
into the payload for the JWT token creation.
[Cello]: Cannot read properties of null (reading ‘__H')
http
in your script’s source: src="http://assets.cello.so/app/latest/cello.js"
. Please use https
.
cello.hide()
function, you can hide the Floating Action Button or the Referral Component when other components are open. Implement this function in your frontend.cello.hide()
function to hide the Cello Floating Action Button on specific pages.
productUserId
that is required in the user authentication?productUserId
is the internal user id that you are using inside your product to uniquely identify users.
<body>
tag. That being said, you need to just make sure that the injected HTML code is not being overridden by your angular app. This can be achieved in various ways. The safest choice would be not to use <body>
as your AppRoot element as it would create a race condition.