GTM Server-Side Tracking

Server-side tracking (also known as server-side tagging or Conversion APIs) sends event data directly from the server to advertising platforms, bypassing browser limitations and improving data accuracy.

Template Configuration for Server-Side Events

What Are Server-Side Events?

Traditional tracking relies on browser-based pixels (client-side). Server-side events send data from your server directly to platforms like Facebook, Google, and TikTok.

Client-Side vs Server-Side

AspectClient-SideServer-Side
Data SourceUser’s browserYour server
Ad Blocker ImpactBlockedNot affected
Data AccuracyCan be incompleteMore complete
Privacy ComplianceLimited controlFull control
Setup ComplexitySimpleMore involved

Benefits of Server-Side Tracking

1. Better Data Accuracy

  • Not affected by ad blockers (used by 30%+ of users)
  • Works regardless of browser settings
  • More reliable than cookies

2. Improved Attribution

  • Better match rates for conversions
  • More accurate return on ad spend (ROAS)
  • Helps with iOS 14+ privacy changes

3. Enhanced Privacy Compliance

  • Data processed on your server
  • Full control over what data is sent
  • Better GDPR/CCPA compliance

4. Longer Cookie Windows

  • Server-side cookies aren’t limited by browser restrictions
  • Better tracking across longer customer journeys

Supported Platforms

The GroPulse app supports server-side events for:

PlatformAPI NameRequired Credentials
Google Analytics 4Measurement ProtocolAPI Secret
FacebookConversions API (CAPI)Access Token
TikTokEvents APIAccess Token
PinterestConversions APIToken
Twitter/XConversions APIToken
LinkedInConversions APIToken
SnapchatConversions APIToken
RedditConversions APIToken

Events Tracked Server-Side

EventDescriptionPlatforms
purchaseCompleted ordersAll
begin_checkoutCheckout initiatedAll
add_to_cartItems added to cartAll
view_itemProduct page viewsGA4, FB, TikTok
view_item_listCollection viewsGA4, FB
page_viewGeneral page viewsGA4

Setting Up Server-Side Events

Prerequisites

  1. Paid Plan: Server-side events require a Pro or Advanced plan
  2. Platform Credentials: API tokens for each platform
  3. Events Enabled: Corresponding events enabled in Data Layer Settings

Step 1: Enable Events

  1. Go to Data Layer Settings
  2. Enable the events you want to track
  3. Save your settings

Step 2: Configure Platform APIs

Navigate to the Template page and enter API credentials for each platform:

Google Analytics 4

  1. Toggle GA4 ON
  2. Enter Measurement ID
  3. Enter Measurement Protocol API Secret

Getting the API Secret:

  1. Go to GA4 Admin → Data Streams
  2. Select your web stream
  3. Click “Measurement Protocol API secrets”
  4. Generate a new secret

Facebook Conversions API

  1. Toggle Facebook pixel ON
  2. Enter Pixel ID
  3. Enter Conversion API Access Token

Getting the Access Token:

  1. Go to Facebook Events Manager
  2. Select your pixel → Settings
  3. Under “Conversions API”, click “Generate access token”
  4. Copy and save the token securely

TikTok Events API

  1. Toggle TikTok pixel ON
  2. Enter Pixel ID
  3. Enter Access Token

Getting the Access Token:

  1. Go to TikTok Ads Manager → Events
  2. Select your pixel → Settings
  3. Under “Events API”, generate token

Step 3: Download and Import Template

  1. Click Download GTM Template
  2. Import into Google Tag Manager
  3. Publish your changes

How Server-Side Events Work

Event Flow

Customer Action → Shopify Store → GroPulse Server → Platform APIs
                                       ↓
                            - Facebook CAPI
                            - GA4 Measurement Protocol
                            - TikTok Events API
                            - Other platforms

Data Sent

Server-side events include:

  • Event data: Event name, timestamp, URL
  • User data: Email (hashed), phone (hashed), IP address
  • Product data: Product IDs, prices, quantities
  • Order data: Order ID, total value, currency

Data Privacy

All personally identifiable information (PII) is:

  • Hashed using SHA-256 before transmission
  • Never stored on GroPulse servers
  • Sent securely via HTTPS

Event Deduplication

When running both client-side and server-side tracking, deduplication prevents counting events twice.

How It Works

  1. Each event gets a unique Event ID
  2. Client-side sends: event_id: "abc123"
  3. Server-side sends: event_id: "abc123"
  4. Platform recognizes same ID and deduplicates

The App Handles This Automatically

The GroPulse app automatically:

  • Generates unique event IDs
  • Includes the same ID in both client and server events
  • Ensures accurate conversion counting

Testing Server-Side Events

Facebook

  1. Add a Test Event Code in the Template page
  2. Complete test actions on your store
  3. Go to Facebook Events Manager → Test Events
  4. Verify events appear with “Server” source

Google Analytics 4

  1. Go to GA4 → DebugView
  2. Perform test actions
  3. Look for events with the server icon

TikTok

  1. Go to TikTok Events Manager
  2. Check the Events API tab
  3. Verify events are being received

Server-Side Analytics (Advanced Plan)

With the Advanced plan, you get access to the Server Event Analytics dashboard:

Dashboard Features

  • Total Events Today: Count of all server-side events
  • Success Rate: Percentage of successfully delivered events
  • Failed Events: Events that failed to deliver
  • Processing Time: Average time to process events

Events by Platform

Visual breakdown of events sent to each platform:

  • Pie chart showing distribution
  • Success/failure counts per platform
  • Platform-specific error rates

Events by Type

Bar chart showing:

  • Purchase events
  • Add to cart events
  • View item events
  • Other event types

Failed Events Log

Detailed log of failed events including:

  • Platform
  • Event type
  • Error message
  • Timestamp

Server Event Logs (Pro & Advanced Plans)

View detailed logs of all server-side events:

Log Information

FieldDescription
TimeEvent timestamp
PlatformTarget platform
Event Typepurchase, add_to_cart, etc.
StatusSuccess or Failed
Processing TimeMilliseconds to process
ValueOrder/item value
ErrorError message if failed

Filtering Options

  • Date Range: Select specific time period
  • Platform: Filter by Facebook, GA4, etc.
  • Status: Success or Failed only
  • Event Type: Filter by specific events

Troubleshooting

Events Not Sending

  1. Check Plan: Server-side requires Pro or Advanced
  2. Verify Credentials: Ensure API tokens are correct
  3. Check Event Status: Events must be enabled in Data Layer Settings
  4. Review Logs: Check Server Event Logs for errors

Low Match Rates

If platform match rates are low:

  1. Ensure customer email is captured
  2. Verify phone numbers include country code
  3. Check that customer data is passed correctly

Failed Events

Common error causes:

ErrorSolution
Invalid access tokenRegenerate and update token
Rate limit exceededEvents are queued, wait for processing
Invalid pixel IDVerify pixel ID is correct
Permission deniedCheck app permissions in platform

Duplicate Events

If seeing duplicate conversions:

  1. Verify template is up to date
  2. Check that event IDs are being sent
  3. Review platform deduplication settings

Best Practices

  1. Run Both Client and Server: Use both for maximum coverage
  2. Monitor Regularly: Check analytics dashboard weekly
  3. Update Tokens: Tokens may expire; regenerate periodically
  4. Test After Changes: Always test when updating configurations
  5. Review Error Logs: Address failed events promptly

Next Steps

Last updated on February 16, 2026

Was this article helpful?

PREVIOUS

Connect Google Tag Manager to Shopify

Powered by Support Genix