Knowledge Center next icon How does stitching in Tracedock work
Jan 23, 2024
2 minutes read

How does stitching in Tracedock work

Issue

In TraceDock, it is possible to send events from your server (server-side events) instead of from the browser. In order to connect these events to a user, we use ‘stitching’. Stitching is done by identifying the user in the browser (using an identify event) and connecting this to the server-side event.

Product

  • Mobile Marketing Cloud
    • Tracedock

How does stitching work

  • In the configuration of a server-side event, you must specify which field should be used to stitch. This can be done by selecting the icon on the right, next to a property in the mappings, like so (the blue check-mark means that it is set up as a stitch-field)

    image.png
  • In the browser, you can trigger an ‘identify’ event by using window.td.identify(<user-id>)
    • <user-id> should be replaced by the identifier of the user. This can be the user-id, but it can also be a cart id or any other unique identifier.
  • Now that the configuration is set up and the user is identified, you can send your server-side event to TraceDock. When sending the server-side event, the value of (in this case) client_id should be the same value that was used in the identify event in step 1. TraceDock will connect the previous identify event to the server-side event and replace the value of ‘client_id’ with the anonymous id that TraceDock generates.

Example

A user goes to a website and logs in. After the user logs in, we know the id of the user, so we trigger an identify event (window.td.identify(12345).

The user buys a product, so we send a server-side transaction event to TraceDock with the following body:

image.png

When processing the server-side transaction event, we can connect the event to the identify event. We replace the value of “client_id” with the anonymous id that TraceDock generates and all other events that the user triggered are connected to the same user.

group icon
Get support

Can’t find the answer you are looking for?
Ask for the help of our chatbot, or get in touch with our support team.

Contact Support
Is this region a better fit for you?
Go
close icon