Documentation Index
Fetch the complete documentation index at: https://docs.glood.ai/llms.txt
Use this file to discover all available pages before exploring further.
Installation Guide
Complete guide to installing and setting up the Glood Hydrogen SDK in your Shopify Hydrogen project.Prerequisites
Before installing the Glood SDK, ensure you have:- Node.js 18+ - Required for Hydrogen projects
- React 18+ - Hydrogen uses React 18 features
- Shopify Hydrogen 2024.10.1+ - Compatible Hydrogen version
- TypeScript 5.4+ - Recommended for full type safety
- Glood API Key - Contact Glood team to obtain your API key
Step 1: Install the Package
Install the Glood Hydrogen SDK using your preferred package manager:npm
yarn
pnpm
Step 2: Environment Configuration
Add your Glood API key to your environment variables:.env file
Environment Variables
Set up environment variables for different environments:TypeScript Environment Types
Add environment types for TypeScript projects:Step 3: Configure Content Security Policy
Add Glood domains to your CSP configuration to enable pixel tracking:Step 4: Initialize Glood Client
Create and configure the Glood client in your root layout:Basic Setup
Environment-Specific Setup
Step 5: Verify Installation
Check Debug Logs
Enable debug mode and check browser console:Test Event Tracking
Navigate through your store and verify events are being tracked:- Visit product page - Should see
product_viewedevents - Search for products - Should see
search_submittedevents - View cart - Should see
cart_viewedevents - Navigate pages - Should see
page_viewedevents
Verify Network Requests
In browser DevTools Network tab, look for requests to:https://events.glood.ai(recommendations pixels)https://s-pixel.glood.ai(search pixels)https://w-pixel.glood.ai(wishlist pixels)
Complete Implementation Example
Here’s a complete working example:Common Setup Issues
Issue: CSP Violations
Symptoms: Console errors about blocked requests to Glood domains Solution: Ensure all Glood domains are added toconnectSrc:
Issue: Missing API Key
Symptoms: Console error “Glood: apiKey is required” Solution: Verify environment variable is set:Issue: Invalid Shopify Domain
Symptoms: Warning about non-standard domain format Solution: Use your actual Shopify domain:Issue: Analytics Not Working
Symptoms: No debug logs, no events tracked Solution: Verify Analytics wrapper and loaderData:Issue: TypeScript Errors
Symptoms: TypeScript compilation errors Solution: Install type dependencies:Next Steps
After successful installation:- Configure Apps - Customize app settings
- Set Up CSP - Detailed CSP configuration
- Review Examples - Implementation patterns
- Test Integration - Verify everything works
Getting Help
If you encounter issues during installation:- 📖 Configuration Guide - Detailed configuration options
- 🔧 API Reference - Complete API documentation
- 💬 GitHub Discussions - Community support
- 🐛 Report Issues - Bug reports and feature requests
Package Information
- Package Name:
@glood/hydrogen - License: MIT
- Repository: github.com/LoopClub/glood-hydrogen
- Documentation: docs.glood.ai
- Support: support@glood.ai