The CDN integration feature allows you to serve Experience OS assets (and optionally, images that you upload through our system) from your own CDN as opposed to Experience OS. This means that:
- Your site doesn't have an additional external dependency.
- You can select the CDN vendor, to both comply with your current contract with your CDN and to make sure that there are servers as close to your visitors as possible.
- Your servers can optimize loading time, as they have full control.
CDN integrations are not supported if you implemented Experience OS via Salesforce.
Go to Settings › General Settings. Under the Dynamic Yield script, click Enable CDN Integration. Note: If our script has been implemented, click the script status or the code icon to reveal the link).
Choose an upload method:
- SSH-based SFTP
- explicit-SSL passive-mode FTPS
- Enter the hostname, username, and password used by the upload process.
- Configure the Upload Directory (after the username is FTP-authorized, the directory will be used for the upload).
- Configure the public path.
- Select CDN supports HTTPS only if your CDN actually permits it.
- Save your configurations.
- Test your configuration by clicking the additional actions icon actions_icon.png to reveal the options menu.
The configuration is activated only upon receiving a successful test confirmation. You can pause or delete the CDN configuration at any time.
We recommend that you perform the following steps:
- Set the Upload Directory to api/[section-id]/.
- Create a directory on your server named api/[section-id]/images.
- In Upload Dir > api.js, set 5-minute expiration for api_dynamic.js.
- in Upload Dir > api_static.js, set 24 hour expiration.
- in Upload Dir > images, set expiration for all resources (the recommended period is one year or longer).
- Set FTP/FTPS/SFTP as open to only the following IPs:
After you configure the CDN settings and activate the hosted CDN, you can serve API scripts for the CDN of your choice. API scripts continue to be served and available on Akamai.
When serving iframes for Smarts, a URL to api_script.js is generated by Dynamic Yield. By default, we use our Akamai resources.
- Set Public Path as web access path to served resources. Map it to the hostname.
- Select Serve experiment scripts.
Images used in Smarts features are hosted by default on Akamai. If you configure uploading to a client-hosted CDN, Public Path is set, and Host images is selected, then the client-hosted CDN can be used to store images and serve them when Dynamic Content campaigns are rendered. Note that a folder named “images” must be set up on the client-side CDN for the images to upload and render properly.
A decision on whether to use Akamai or client-hosted CDN for Smarts features is made upon uploading the image in the Dynamic Yield console (and not on a per-render basis).
After everything is configured, the Dynamic Yield script on your site must be adjusted so its links point to your new CDN.
- For most implementations, use the following example and make sure to adjust the red text to point to your CDN:
- If you implemented Experience OS via Magento, adjust your script directly in Magento as described in the implementation procedures.
It's important to verify that your scripts are loading correctly by clicking the new source link and confirming that you're receiving the same result as if clicking on the original link.
Updated about 1 month ago