Step 1: Add Candu Script Tags
To get started adding Candu content to your application, you will need to add the Candu script tag into the <head> of your site to give Candu permission to embed content.
To find your Candu Script, go into the Candu Dashboard Settings > Installation tab from the top bar menu. Copy the top code block as seen below:
It will look something like this:
Each installation script will have a unique Client Token. The Client Token is used to access Content via the Candu SD and can also be found in the Workspaces tab under Access Keys.
If you intend to send Candu user data via an integration like Segment.com, you must also pass us UserIDs via the install script. We need a unique identifier to map and identify Users between your application and the third-party integration.
It is most common to use an ID, which is usually a number like '7480', but if you do not assign IDs like this, you can alternatively use email addresses as the unique identifier.
Step 2: Whitelist Your Domains
Before any content can be added or published, you must whitelist all domains where you want Candu content to appear.
Go to Settings > Workspaces
Add your domain to the list under 'Whitelisted Domains'
Please note that you can use wildcards here as needed. Add a * before or after the URL to add a wildcard. For example, if you want to use Candu on many different pages within your product or across multiple domains, you can simply put a * as a domain.
If you encounter CORS errors when publishing content, it likely concerns whitelisting. To check, try whitelisting just the wildcard and clear the cache.
Once you've added the script tag to the head of your site and whitelisted your domains, you can start creating Candu content and use the Candu Chrome Extension to embed content to any existing <div> on the page.
Guides on Previewing, Publishing & Embedding Content.
Step 3: Send Candu Data for Segmentation/Variables (Optional)
Suppose you want to personalize your Candu content using Segmentation and Variables. In that case, you must send us data directly via the install script, Webhooks, or connect to a third-party data source like Segment.com.
We recommend setting up Signed Identities to ensure your user data is as secure as possible. Note: Only workspace Owners and Admins can turn Signed Identities on/off.
ℹ️ Can't get content to appear? Check our Troubleshooting guide for potential resolutions. You can always contact us at [email protected]