Skip to main content
Version: Current platform

SDK Installation

Install the browser SDK on every storefront page where you want tracking, overlays, recommendations, or chatbot campaigns to run.

Script install​

Upsurge hosts the production SDK and API on separate platform domains. Load the core script from cdn.upsur.ge, set baseUrl to the dashboard/API origin, and replace the public site ID placeholder.

<script>
window.UpsurgeQueue = window.UpsurgeQueue || [];
window.UpsurgeQueue.push([
'init',
{
siteId: 'site_replace_me',
baseUrl: 'https://dashboard.upsur.ge',
},
]);
</script>
<script async src="https://cdn.upsur.ge/sdk/upsurge.min.js"></script>

SDK 2.0 does not accept an API key or the old positional-key form. It exchanges the site ID for a 15-minute runtime token in memory and refreshes it automatically.

Do not use the merchant or CDN origin as baseUrl

baseUrl controls API traffic and must be https://dashboard.upsur.ge in production. The CDN hostname serves the SDK asset; the merchant storefront hosts neither the SDK nor the Upsurge APIs.

Validation checklist​

  • The script loads with a 200 response.
  • The site ID belongs to the storefront domain you are testing.
  • The browser console has no initialization errors.
  • A test event appears in analytics after sending your first tracking call.