Server-side tracking requires you to define what information you want (or need) to send to your analytics and/or marketing destination.
In addition to collecting common data like revenue and order ID, you can also choose to:
- Grab data from the browser like IP address and user-agent information
- Customer information like email address and phone number
- Attribution data like cookie values, UTM parameters, and click IDs
And if you need to integrate with consent tools like OneTrust and Cookiebot then you’ll need to collect each user’s consent choices to be routed with your server-side hits.
Think of it like this:
- Aggregate the data requirements from all of your analytics and marketing destinations
- Complete a red (not collecting this data), yellow (unsure if collecting) green (collecting) exercise with the data that you are sending to your server-side solution (GTM SS, Elevar, etc).
For a basic example lets assume you want to implement server-side tracking for TikTok, Impact Radius, and Postie.
TikTok’s requirements state you need the following events:
- Add to Cart
- Product View
- Collection View
- Initiate Checkout
- Complete Payment
And within each event the following variables are required:
- external_id
- email
- phone number
- content_id
- content_name
- price
- value
- content_category
- currency
- eventId
Impact Radius requirements state you need the following events:
And within the purchase event the following variables are required:
- CampaignId
- ActionTrackerId
- EventDate
- ClickId
- CustomerId
- CustomerEmail
- CustomerStatus
- PromoCode
- CurrencyCode
- ItemCategory
- ItemSku
- ItemSubtotal
- ItemQuantity
- ItemName
Postie requirements state you need the following events:
- Email signup
- Add to cart
- Initiate checkout
- purchase
And within the events the following variables are required:
- order ID
- order revenue
- order tax
- order shipping
- product name
- customer city
- customer state code
- customer country code
- customer first name
- customer last name
- street address 1
- street address 2
- shipping city
- shipping state
- shipping zip
- shipping country
- email address
That’s a lot of data to collect!
And do you notice how the naming conventions differ a bit?
Naturally some of these overlap which you will need to merge into one final list of events and variables needed to cover each of the 3 channels.
If you are DIY’ing your setup using GTM server-side container by using GA4 tags to route data to your server container then you’ll need to configure each of your events (e.g. add to cart, view content, purchase0 to include the required variables for all 3 tags (e.g. price, sku, category, email, address info, etc).
If you’re using a pre-configured solution like Elevar (fully managed or the GTM server-side option) then this data mapping has already been done for you.
Next, lets look at how to get data from your website to the server.