Squarespace Integration
Installation Guide
Add the GunUpdate widget to Squarespace using Code Injection. Requires Business plan or higher.
1 Add Script via Code Injection
Go to Settings → Advanced → Code Injection → Footer. Paste:
<script src="https://cdn.gunupdate.com/widget/gunupdate-widget.js"
data-store="YOUR_API_KEY"
data-platform="squarespace"
data-auto-detect="true"
data-mode="compatibility"
data-theme="auto"
defer></script>
The widget auto-detects product pages and injects itself below the Add to Cart button.
2 Save & Test
Save, then visit any product page. The widget appears automatically on pages with an Add to Cart button.
Per-Page Placement
To add the widget to a specific page only, use a Code Block on that page:
<div id="gunupdate-widget"
data-store="YOUR_API_KEY"
data-mode="builder"
data-theme="auto"
data-platform="squarespace">
</div>
Widget Modes
compatibility
"Does this fit my gun?" — customer uploads photo or selects model, gets yes/no answer + compatible products from your store.
builder
Interactive gun builder — clickable hotspot zones on a gun silhouette. Customers explore accessory categories visually.
configurator
Full experience — build + compatibility check + smart recommendations. Best for stores with 50+ gun accessories.
Data Attributes Reference
| Attribute | Required | Description |
|---|---|---|
| data-store | Yes | Your API key |
| data-product-id | Yes | Product ID on your platform |
| data-product-name | No | Product name for better matching |
| data-product-sku | No | SKU for precise matching |
| data-mode | No | compatibility | builder | configurator |
| data-theme | No | light | dark | auto |
| data-platform | No | Platform identifier for analytics |
| data-lang | No | Language code (default: en) |
Requirements
- • Squarespace Business plan+
- • Code Injection access
- • GunUpdate API key