Optimly Connect
Install Optimly Connect
Bind a website, install the canonical Site Insights snippet, and configure CSP.
Use the extension when you want Optimly to identify the active site, associate it with the correct brand, and give you installation instructions that match the detected platform.
Before you start
You need:
- Chrome with Optimly Connect installed;
- an Optimly account;
- permission to manage the relevant Optimly brand;
- access to change the website or a developer/agency contact who can;
- the production hostname open in the active tab.
Connect the site
- Open the public website you want to measure.
- Select the Optimly Connect extension.
- Sign in to Optimly when prompted.
- Review the detected hostname and platform. Correct the platform if the evidence is incomplete.
- If more than one authorized brand matches, choose the brand that owns this website.
- Select Connect website.
- Copy the exact snippet returned by Optimly. Do not assemble or edit a site key manually.
- Install it once in the site's shared layout or site-wide custom-code area.
- Publish through the website's normal review and deployment workflow.
- Return to the production page, reload it, and select Verify installation.
Canonical snippet
Optimly generates a site-specific version of this snippet:
<script>
window.optimly = window.optimly || {
q: [],
track: function (eventName, options) {
this.q.push([eventName, options]);
},
};
</script>
<script
defer
data-site="YOUR_PUBLIC_SITE_KEY"
src="https://app.optimly.ai/site-insights/v1.js"
></script>
The queue bootstrap appears first so an explicit success event can be retained while the deferred beacon downloads. The public site key identifies the collector configuration; it is not an account credential and cannot read private Optimly data.
Test mode
If Optimly gives you a test-mode snippet, it includes:
data-test="true"
Test events are visible to installation health but excluded from customer performance metrics. Remove the attribute only when the Site Insights site is ready for live collection.
Content Security Policy
If the site has a Content Security Policy, allow the Optimly application origin in both places:
script-srcforhttps://app.optimly.ai/site-insights/v1.js;connect-srcfor the configuration and event collector requests.
Keep the rest of the site's policy unchanged and use the normal security-review process.
Next: Verify the installation.