squig.link Integration
A built-in integration feature that connects modernGraphTool with the squig.link service.
Overview
The squig.link Integration enhances modernGraphTool by providing seamless integration with the squig.link ecosystem. It enables shop links, analytics tracking, and sponsor banners.
squig.link features are only active when modernGraphTool is hosted on *.squig.link domains.
Features
- Shop Links: Display "Buy Now" links for devices with matching shop entries
- Analytics: Google Analytics integration with multi-measurement-ID support
- Sponsor Banners: Display sponsor content on first visit
- Configurable Options: Flexible configuration for different deployment scenarios
Configuration
squig.link Integration is configured in config.js:
// In config.js
SQUIGLINK: {
ENABLED: true,
ANALYTICS_MEASUREMENT_IDS: [],
ANALYTICS_SITE: "",
LOG_ANALYTICS: true,
ENABLE_ANALYTICS: true,
ENABLE_CROSS_SITE_SEARCH: true,
ENABLE_SPONSOR: true,
}
Configuration Options
ENABLED: Master toggle for all squig.link featuresANALYTICS_MEASUREMENT_IDS: Array of Google Analytics 4 measurement IDs for multi-tag supportANALYTICS_SITE: Site name used for analytics event attributionLOG_ANALYTICS: Log analytics events to console for debuggingENABLE_ANALYTICS: Toggle analytics tracking on or offENABLE_CROSS_SITE_SEARCH: Deprecated — useCROSS_SITE_SEARCH.ENABLEDinstead. Still read as a fallback for existing configs.ENABLE_SPONSOR: Toggle sponsor banner display
Cross-site device search is no longer a squig.link-only feature — it now works on any host and is
configured under its own CROSS_SITE_SEARCH section. See Cross-Site Search.
On squig.link deployments it still falls back to crawling each site's phone_book.json if the
aggregate index can't be reached.
Usage
Cross-site Search
Search for headphone measurements across all participating squig.link sites. Results link directly to the matching site's graph tool with the device loaded.
Shop Links
When a loaded device has a matching entry in the squig.link shop links database, a "Buy Now" button is displayed linking to the sponsor.
Analytics
When enabled, user interactions are tracked via Google Analytics 4 (gtag.js) for site usage insights.
Sponsor Banners
On first visit, a sponsor dialog may be displayed with content loaded from the squig.link network.