Skip to main content

Session ID and Customer ID Handling

A correct implementation of tracking hinges on consistent user/session identifiers. GoWit uses a session_id to tie all events together within a user’s journey, and an optional customer_id to further unify user activity:

Session ID

This is the primary key for attribution, linking the ad view/click to a later conversion. Despite the name, treat it as a persistent session or user token rather than a short-lived session. It must remain stable across pageviews and interactions within a reasonable attribution window. In practice:

  • Generate a UUID for each new user session (if the user has no existing session cookie).
  • Store it in a first-party cookie or localStorage so it persists across pages and browser reloads.
  • Do not reset it on browser close or new tab if possible; ideally, use an expiration (e.g. 7 days) to cover typical conversion windows.
  • Include this session_id in every ad request and every tracking event (impression, click, sale) for that user’s session.

The session ID ensures GoWit can look back and find the relevant ad touchpoints when a conversion comes in.

Customer ID

This is a stable identifier for a logged-in user (e.g. your internal user ID). If your users can log in, passing customer_id with events enables cross-device and long-term attribution beyond a single session. GoWit can use it to match a click on one device to a purchase on another. Requirements:

  • It should be unique per end-user and stable over time (don’t reuse IDs for different users).
  • Include it on all event types whenever available (impressions, clicks, sales).

If not provided, attribution is limited to same-device sessions – a user who switches devices or browsers will appear as a new session to the attribution system.

GoWit’s backend uses session_id (and customer_id if present) to attribute sales to prior ad interactions. No additional linking logic is required on your side – just ensure these IDs are set correctly and consistently. The session and customer IDs you send with events should match those used in the initial ad request so that all data aligns.