Google Analytics 4 (GA4) is Google's latest analytics platform, offering advanced insights into user behavior and conversions. This guide covers GA4 integration options specifically for Zyro websites.
Integration Methods
Zyro offers two ways to integrate GA4:
1. Built-in Integration (Basic)
Best for: Simple page view tracking with minimal setup
Pros:
- Quick and easy setup
- No code knowledge required
- Maintained by Zyro
- Automatic updates
Cons:
- Limited to basic page views
- No custom event tracking
- Limited configuration options
- Less flexibility
Setup: Add GA4 Measurement ID in Zyro Settings → Integrations
2. Custom Code Integration (Advanced)
Best for: Full GA4 features and custom event tracking
Pros:
- Full control over GA4 configuration
- Custom event tracking
- Enhanced measurement configuration
- Advanced features (user ID, custom dimensions)
- Consent mode support
Cons:
- Requires basic code knowledge
- Manual setup and maintenance
- Need to update code manually
Setup: Add GA4 tracking code in Zyro Settings → Website code → Header code
Which Method Should You Choose?
Use Built-in Integration If:
- You only need basic page view tracking
- You want the simplest setup possible
- You don't need custom events or advanced tracking
- You're not familiar with code
- You're just starting with analytics
Use Custom Code Integration If:
- You need custom event tracking (forms, buttons, etc.)
- You want to track eCommerce events
- You need advanced GA4 features
- You want to configure enhanced measurement
- You need consent mode or GDPR compliance
- You want to track user interactions beyond page views
What You Can Track
Built-in Integration Tracks:
Custom Code Integration Can Track:
- Everything from built-in integration, plus:
- Form submissions
- Button clicks
- Product views and purchases
- Video plays
- File downloads
- Scroll depth
- Custom events
- User IDs
- Custom dimensions
- Conversion events
Zyro-Specific Considerations
AI-Generated Content
- Zyro's AI tools create consistent page structures
- Easier to implement tracking across similar pages
- Template changes may affect custom event tracking
Mobile-First Design
- Zyro templates are mobile-responsive
- GA4 automatically tracks device types
- Test tracking on mobile devices
- Consider mobile-specific events (swipe, touch)
Limited Code Access
- Zyro provides header/footer code injection
- No direct theme file access
- All tracking must work client-side
- Cannot modify server-side code
Performance Optimization
- Zyro sites are fast by default
- GA4 loads asynchronously (minimal impact)
- Use GTM to consolidate multiple tags
- Monitor Core Web Vitals
Common Use Cases
Portfolio Website
Recommended: Built-in integration Track:
- Page views
- Project page visits
- Contact form submissions (requires custom code)
Business Website
Recommended: Custom code integration Track:
- Page views
- Form submissions (contact, quote requests)
- Button clicks (CTAs)
- Phone number clicks
- File downloads (brochures, PDFs)
eCommerce Store
Recommended: Custom code integration + GTM Track:
- Product page views
- Add to cart events
- Checkout initiation
- Purchase completion
- Product performance
- Shopping behavior
Landing Page
Recommended: Custom code integration Track:
- Page views
- Form submissions
- Button clicks
- Scroll depth
- Video plays (if applicable)
Integration Comparison
| Feature | Built-in | Custom Code |
|---|---|---|
| Setup Difficulty | Easy | Medium |
| Page Views | ✓ | ✓ |
| Enhanced Measurement | Limited | ✓ |
| Custom Events | ✗ | ✓ |
| Form Tracking | ✗ | ✓ |
| eCommerce Tracking | ✗ | ✓ |
| Consent Mode | ✗ | ✓ |
| Custom Dimensions | ✗ | ✓ |
| Debug Mode | ✗ | ✓ |
| GTM Integration | ✗ | ✓ |
Getting Started
Ready to install GA4 on your Zyro site?
For Built-in Integration:
- Get your GA4 Measurement ID from Google Analytics
- Go to Zyro Settings → Integrations
- Add your Measurement ID
- Save and publish
For Custom Code Integration:
- Get your GA4 tracking code from Google Analytics
- Follow our detailed setup guide
- Configure custom events if needed
- Test and verify tracking
Switching Between Methods
From Built-in to Custom Code:
- Remove GA4 Measurement ID from Zyro Settings → Integrations
- Save settings
- Add custom GA4 code to Website code → Header code
- Save and publish
- Verify tracking works
Important: Remove built-in integration first to avoid duplicate tracking.
From Custom Code to Built-in:
- Remove custom GA4 code from Website code → Header code
- Save settings
- Add GA4 Measurement ID to Zyro Settings → Integrations
- Save and publish
- Verify tracking works
Note: You'll lose custom event tracking when switching to built-in.
Next Steps
- Set Up GA4 on Zyro - Detailed installation guide
- Configure Custom Events - Track forms, buttons, and more
- Install GTM - Advanced tag management