Breadcrumbs

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

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)

    260fe49d-fc0f-4032-8902-d931278fb888-image.png

  • In the browser, you can trigger an ‘identify’ event by using window.td.identify(<user-id>)

  • 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:

5708d676-0ce1-4d0a-999b-46099c6153de-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.