Server-side tracking sends events directly from the Analyzely server to Google Analytics 4, bypassing browser limitations and ad blockers. This provides more accurate and complete tracking data.
Note: Server-Side Tracking is a Pro plan feature. Upgrade your plan to access this feature.
Overview
Server-side tracking offers several advantages:
- More accurate data: Not blocked by ad blockers or browser privacy features
- Better conversion tracking: Critical purchase events are reliably captured
- Refund tracking: Enables tracking of refunds (not possible client-side)
- Improved attribution: More complete data for attribution models
- Privacy compliance: Works with consent frameworks
How Server-Side Tracking Works
Client-Side (Traditional) Tracking
Customer's Browser → Google Analytics
↑
(can be blocked)
Server-Side Tracking
Customer's Browser → Shopify → Analyzely Server → Google Analytics
↑
(cannot be blocked)
Combined Approach
Analyzely uses both client-side and server-side tracking:
- Client-side: Captures browse events (page views, product views)
- Server-side: Captures critical events (purchases, refunds)
This hybrid approach provides comprehensive coverage.
Prerequisites
Before enabling server-side tracking:
- Active Pro subscription (Monthly or Yearly)
- Google account connected
- Measurement ID configured
- For auto-setup: Edit permission granted to Google Analytics
Accessing Server-Side Settings
- Open the Analyzely app from your Shopify Admin
- Go to Analytics Setup
- Find the Server-Side Events section
Enabling Server-Side Events
Step 1: Toggle Server-Side Events
- Locate the Server-Side Events toggle
- Click to switch it to ON
- The toggle will show “Enabled” with a green badge
Step 2: Configure the API Secret
The Measurement Protocol API Secret is required for server-side events.
Automatic Setup (Recommended)
If using automatic Measurement ID:
- The API secret may be fetched automatically
- The field will populate with the secret value
- If auto-fetch succeeds, you will see a confirmation message
Manual Setup
If you need to enter the API secret manually:
- Go to Google Analytics
- Click Admin (gear icon)
- In the Property column, click Data Streams
- Click on your web stream
- Scroll down and click Measurement Protocol API secrets
- Click Create to generate a new secret
- Give it a name (e.g., “Analyzely Server-Side”)
- Copy the secret value
- Paste it into the API secret field in Analyzely
Step 3: Save Your Settings
- Click Save in the save bar
- Wait for confirmation
- Server-side events are now active
Creating an API Secret in Google Analytics
Detailed Steps
- Access Google Analytics Admin
- Go to analytics.google.com
- Click the gear icon (Admin) in the bottom left
- Navigate to Data Streams
- In the Property column, click Data Streams
- Click on your web data stream
- Access Measurement Protocol
- Scroll down in the stream details
- Click Measurement Protocol API secrets
- Create New Secret
- Click Create button
- Enter a nickname (e.g., “Analyzely Server-Side”)
- Click Create
- Copy the Secret
- The secret value will be displayed
- Click the copy icon to copy it
- Paste into Analyzely
Important: Treat the API secret like a password. Do not share it publicly.
What Events Use Server-Side Tracking
Purchase Event
The most critical event for server-side tracking:
- Why: Captures revenue even if customer has ad blockers
- How: Triggered when Shopify confirms the order
- Data: Full transaction details, products, revenue
Refund Event
Only available with server-side tracking:
- Why: Refunds happen after customer leaves (no client-side)
- How: Triggered when you process a refund in Shopify
- Data: Transaction ID, refund amount, products
Checkout Events (When Server-Side Enabled)
Additional accuracy for:
- Begin checkout
- Add shipping info
- Add payment info
Understanding the Hybrid Approach
Events by Tracking Method
| Event | Client-Side | Server-Side |
|---|---|---|
| View Category | Yes | No |
| View Product | Yes | No |
| Search | Yes | No |
| Add to Cart | Yes | No |
| Begin Checkout | Yes | Yes (enhanced) |
| Shipping Info | Yes | Yes (enhanced) |
| Payment Info | Yes | Yes (enhanced) |
| Purchase | Yes | Yes (primary) |
| Refund | No | Yes (only) |
Why Both Matter
- Client-side: Faster, captures browsing behavior immediately
- Server-side: More reliable, captures transactions accurately
Together, they provide the most complete picture.
Verifying Server-Side Events
In Analyzely Dashboard
Check the Analytics Setup Overview:
- Server-side events should show as “Enabled”
- Green checkmark indicates active status
In Google Analytics Realtime
- Go to GA4 > Reports > Realtime
- Make a test purchase on your store
- Look for the
purchaseevent - Server-side events may have a slight delay (seconds)
In Google Analytics Debug View
- Go to GA4 > Admin > DebugView
- Make a test transaction
- Server-side events will appear with server indicators
Common Issues and Solutions
API Secret Not Working
Symptoms: Events not appearing, error messages
Solutions:
- Verify the secret is copied correctly (no extra spaces)
- Ensure the secret is from the correct property
- Try creating a new secret
- Check that the data stream matches your Measurement ID
Events Still Being Blocked
Understanding: Server-side purchase events should always work
If still having issues:
- Verify server-side is enabled (toggle ON)
- Check API secret is saved
- Wait a few minutes for events to process
- Check Google Analytics Realtime
Duplicate Events
Symptoms: Same purchase appearing twice
Solutions:
- This is usually prevented automatically
- Server-side events use transaction ID for deduplication
- Check for other GA implementations on your store
- Remove any manual GA purchase tracking code
Permission Denied for Auto-Setup
Symptoms: Cannot automatically fetch API secret
Solutions:
- Re-authenticate with Google
- Grant “Manage Analytics” permission
- Or use manual API secret setup
Best Practices
Always Enable for Accuracy
Server-side tracking should be enabled if you have a Pro plan:
- Improves data accuracy by 10-30%
- Captures events blocked by ad blockers
- Essential for reliable revenue tracking
Keep API Secret Secure
- Do not share the secret publicly
- Do not include in client-side code
- Regenerate if compromised
Monitor for Issues
Regularly check:
- Dashboard shows server-side enabled
- Realtime events are appearing
- Revenue data matches Shopify reports
Test After Changes
After any configuration changes:
- Make a test purchase
- Verify it appears in GA4
- Check refund tracking if applicable
Impact on Your Data
Before Server-Side
- Some purchases may be missed (ad blockers)
- Refunds cannot be tracked
- Data may be 10-30% lower than actual
After Server-Side
- Nearly all purchases captured
- Refunds tracked automatically
- Data matches reality more closely
Data Comparison
| Metric | Client-Only | With Server-Side |
|---|---|---|
| Purchase tracking | 70-90% | 95-99%+ |
| Revenue accuracy | Lower | Higher |
| Refund tracking | Not possible | Fully tracked |
| Ad blocker impact | High | Minimal |
Technical Details
How It Works
- Purchase happens: Customer completes checkout
- Shopify webhook: Shopify notifies Analyzely
- Server processing: Analyzely formats the event
- Measurement Protocol: Event sent to GA4 using API secret
- GA4 receives: Event processed and attributed
Measurement Protocol
Server-side events use Google’s Measurement Protocol:
- Direct API communication
- Secure and authenticated
- Supports all eCommerce parameters
Event Timing
- Client-side: Immediate (on page load)
- Server-side: 1-30 seconds (after Shopify confirmation)