5 min read
Server Side Conversion Tracking That Preserves the Original Traffic Source
Connect trusted backend conversions to earlier browser or app activity without losing source, campaign, visitor, or session evidence.
· Tina
The short version
Your server usually knows when an important action actually happened. It knows when an account was created, when a subscription became active, and when a payment completed. The missing part is where that customer came from.
So, when the server sends the conversion, it also needs enough identity or session information to connect it to the earlier browser or app activity. Then you can see the visitor, source, session, and customer behind the event.
Decide which system owns the event
Use the browser or mobile SDK for activity observed directly on the client, such as a page view, screen view, or button interaction. Use the Events API for outcomes that the backend can confirm, such as account activation or a trusted business event.
Do not send the same conversion independently from the client and server unless both paths share an idempotency strategy. Otherwise one customer action can become two events.
For payment events, use the payment integration or revenue event path that owns the transaction. A completed charge should use the stable provider transaction ID so a retry cannot create duplicate revenue.
Send a stable identity
The backend should use the application user ID from the authenticated server context. If the customer was identified earlier in the browser or app, that durable ID connects the server event to the existing visitor history.
Do not trust a customer ID supplied only by an editable client request. Resolve the signed in account on the server and send the identity that the server has verified.
If the event belongs to a specific app visit, include externalSessionId. More than 30 minutes without activity starts another visit. If the event is a background action with no active visit, omit the session ID. The event remains visible without inventing a visit or active visitor.
Preserve when the event happened
Send the original event time, especially when delivery is delayed. A queue retry on Tuesday should not make a conversion that happened on Monday appear to have occurred on Tuesday.
Use the same stable event identifier for every retry. Delivery failures happen, and safe retries are part of a reliable integration. A new identifier on every attempt turns a retry into another conversion.
Keep acquisition evidence in the earlier journey
The server event does not need to copy every UTM value from the browser. It needs a trusted identity or session connection to the history where those values were originally captured.
This distinction prevents stale campaign values from being copied into unrelated conversions. The visitor timeline shows the source evidence. The attribution model decides which eligible touchpoint receives credit.
If no reliable identity, session, customer, or supported attribution key exists, keep the event unattributed. Do not guess a source from the most recent campaign report.
Verify one event from end to end
Create a test visitor from a known campaign. Sign in, trigger the backend conversion, and wait for the Events API delivery status to report completion. Open Realtime and the visitor profile. Confirm that the event appears once, uses the original occurrence time, and belongs to the correct canonical visitor.
For an app visit event, confirm that it shares the intended visit. For a background event, confirm that it appears without increasing visits or active visitors. Then check that the earlier campaign and landing page remain visible in the customer history.
So send the event from the system that knows it happened. Use the customer or session that the server has verified, keep the original time, and reuse the same event ID if delivery has to be tried again.
Connect backend outcomes to real acquisition journeys with the Grometrics Events API and visitor timeline.
CONNECT YOUR PAYMENTS
Grometrics works with Stripe, RevenueCat, Gumroad, Shopify, and more. Setup takes about 5 minutes.
Connect payments →RELATED POSTS