Shopify Integrations Overview
Shopify provides multiple methods to integrate analytics platforms, tag managers, and marketing pixels into your store. This section covers the most common integrations and Shopify-specific implementation details.
Available Integrations
Analytics Platforms
- Native Shopify integration (limited events)
- Manual theme implementation (full control)
- GTM implementation (flexible, recommended)
- Checkout tracking requires Shopify Plus or checkout.liquid access
Tag Management
- Theme-based installation (recommended)
- Shopify app installation (limited features)
- Checkout limitations on non-Plus stores
- Works with Shopify's native data layer
Marketing Pixels
- Native Shopify Sales Channel integration
- Manual theme implementation
- Conversions API (CAPI) for server-side events
- Enhanced measurement with Shopify data
Shopify-Specific Integration Considerations
Theme Architecture (Shopify 2.0 / Online Store 2.0)
Shopify 2.0 themes (like Dawn) use a modular section-based architecture:
- Scripts must be added to
theme.liquidfor global availability - Individual sections can have their own scripts
- App blocks can inject code into specific theme locations
- Custom liquid files require theme development knowledge
Checkout Access Limitations
Shopify Basic, Shopify, Advanced:
- Limited checkout customization
- Cannot add custom scripts to checkout
- Analytics must use Shopify's Additional Scripts (after payment)
- GTM container loads only after checkout completion
Shopify Plus:
- Full access to
checkout.liquid - Custom scripts can be added to all checkout steps
- GTM can fire events during checkout process
- Greater control over checkout tracking
Data Layer Availability
Shopify provides native data layer events for:
- Page views (
page_viewed) - Product views (
product_viewed) - Collection views (
collection_viewed) - Search (
search_submitted) - Cart updates (
product_added_to_cart,product_removed_from_cart) - Checkout events (Plus stores only during checkout)
See Shopify Data Layer Structure for full details.
Performance Impact
App-Based Integrations:
- Shopify apps can impact store performance
- Multiple tracking apps = multiple script loads
- Consider consolidating through GTM when possible
- Monitor Largest Contentful Paint (LCP)
Theme-Based Integrations:
- Scripts in
theme.liquidload on every page - Use async/defer attributes when possible
- Minimize inline JavaScript
- Leverage Shopify's CDN for external scripts
Integration Best Practices
1. Consolidate Through GTM
Instead of adding multiple pixels directly to your theme:
- Install GTM once in your theme
- Add all tracking pixels through GTM
- Easier to manage and update
- Better performance (single container load)
2. Respect Customer Privacy
Shopify Customer Privacy API:
// Check if customer has consented to tracking
if (window.Shopify.customerPrivacy.shouldShowGDPRBanner()) {
// Show consent banner
}
// Wait for consent before firing marketing pixels
document.addEventListener('visitorConsentCollected', (event) => {
const consent = event.detail;
if (consent.marketing) {
// Initialize marketing pixels
}
if (consent.analytics) {
// Initialize analytics
}
});
3. Test Across Store Sections
Always test integrations across:
- Home page - General page view tracking
- Collection pages - Product list impressions
- Product pages - Product detail views
- Cart - Add to cart, remove from cart
- Checkout - Purchase tracking (Plus stores)
- Order confirmation - Transaction completion (all stores)
4. Monitor Data Quality
See Events Not Firing for debugging steps.
Common data quality issues:
- Duplicate events from multiple implementations
- Missing checkout events (non-Plus stores)
- Currency/value discrepancies
- Bot traffic in analytics
Next Steps
Choose your integration to get started:
For general integration concepts, see the global integrations hub.