Skip to main content
Version: 2026.07

Connect a Storefront

Upsurge hosts the production browser SDK and platform APIs. The core SDK loads from cdn.upsur.ge; event, configuration, and widget requests go to dashboard.upsur.ge. Register the storefront domain first so platform traffic can be associated with the correct site.

Get the site ID​

Use the path that matches your workspace state.

Complete the five-step setup wizard. The success screen provides the public site ID and installation snippet.

The site ID is public. Browser security comes from the short-lived, origin-bound runtime token that the SDK obtains automatically—not from keeping the site ID secret or relying on CORS.

Add the browser script​

Replace site_replace_me with the site ID from the dashboard. The production CDN and dashboard origins are fixed platform addresses.

Add this as early as practical in the storefront <head>:

storefront.html
<script>
window.UpsurgeQueue = window.UpsurgeQueue || [];
window.UpsurgeQueue.push([
'init',
{
siteId: 'site_replace_me',
baseUrl: 'https://dashboard.upsur.ge',
conversionEventType: 'purchase',
respectDoNotTrack: true,
},
]);
</script>
<script
async
src="https://cdn.upsur.ge/sdk/upsurge.min.js"
></script>
Keep the CDN and API origins separate

Load the script from https://cdn.upsur.ge, but set baseUrl to https://dashboard.upsur.ge. If baseUrl is omitted, the SDK defaults to the merchant storefront and incorrectly attempts to call /api/v1/* there.

Queue calls made before the script loads​

Because the script is asynchronous, add early calls as arrays:

<script>
window.UpsurgeQueue.push([
'trackProductView',
{
product_id: 'SKU-TRAIL-123',
product_name: 'Trail Runner',
product_price: 129.0,
currency: 'USD',
},
]);
</script>

After initialization, the tracker is available as window.upsurge and you can call its methods directly.

Optional initialization choices​

  • conversionEventType can be purchase (default) or checkout_complete.
  • respectDoNotTrack defaults to false; enable it when your consent policy requires browser DNT to disable tracking.
  • enableFingerprinting defaults to false and should remain opt-in.
  • automatic initial page-view and single-page-app navigation tracking are enabled by default.

Continue to Send and verify the first event.

Cookie settings

Choose what Upsurge may use on this site. You can change this any time from the footer.

  • Essential

    Keeps the site working and remembers your language.

    Always on
  • Analytics

    Helps us understand which pages and features people use.

  • Personalization

    Tailors content and recommendations to what you’re looking at.

  • Marketing

    Measures which campaigns bring people to the site.

Email support

Or write to hello@upsur.ge