Goldilocks Docs
Developers

Developer Guide

Technical documentation for integrating Goldilocks

Welcome to the Goldilocks Developer Guide. This section covers technical integration and advanced customization options for the widget.

Who This Is For

This documentation is for:

  • Web developers integrating the widget
  • Technical admins configuring advanced features

Integration Options

The simplest integration - add our JavaScript widget to your website:

<script
  src="https://api.goldilocks.chat/goldilocks.js"
  data-key="your-api-key"
  async
></script>

Full widget integration guide →

JavaScript API

Control the widget programmatically:

// Open widget
gl_chat('open');

// Send message
gl_chat('send', 'Hello');

// Set contact context
gl_chat('identify', { id: 'cust_123', page: 'checkout' });

Widget API reference →

Quick Start

1. Get Your API Key

  1. Go to Settings > Account
  2. Find the API Keys section
  3. Copy your API key (click to reveal, then copy)

2. Add the Widget

Add to your HTML before </body>:

<script
  src="https://api.goldilocks.chat/goldilocks.js"
  data-key="YOUR_API_KEY"
  async
></script>

3. Test

Visit your site and click the chat bubble.

Documentation

TopicDescription
Widget IntegrationBasic and advanced widget setup
Widget OptionsConfiguration and JavaScript API
Contact TrackingIdentify contacts for personalized support

Security

API Keys

Your API key is designed for client-side use:

  • Domain restricted (when enabled)
  • Limited to widget operations
  • Safe to include in frontend code

Domain Restrictions

When domain restrictions are enabled, your widget only loads on allowed domains. Configure allowed domains in Settings > Account (or Widget page where embed code is generated).

Support

Developer Support

For integration help:

Bug Reports

Report issues:

  • Include reproduction steps
  • Note browser/environment
  • Attach console errors if any