Tracking ecommerce events

Hi all, we are looking into tracking ecommerce transactions.

We have two separate services for this. We have one where we use the js tracker which provides a lot of support in this regard with the ‘addTrans’ and ‘addItem’ methods Tracking Events - Snowplow Docs

The second service we need to use the php tracker Tracking an event - Snowplow Docs

Will these events use the same fields/columns in the data model or will these two validate to the same values so we don’t get duplicates? I was a bit unsure when reading through the documentation as the fields provided are not mapped 1 to 1.

Hi @brajjany

Yes, they are the same columns in the atomic.events table.

Not sure I’ve understood correctly this question. They validate against the same schema.
About duplicates, the deduplication is based on the event_id and timestamp so it doesn’t involve other values of the event. If you have duplicates caused by events tracked from client and server side you should build that deduplication on top of your data modelling. But, as said, not sure I understood correctly. Please, let me know if this doesn’t answer your question!

2 Likes

If I understand what you’re asking about duplicates to mean that the same events will be tracked both from the client and the server, then yes, both will be tracked.

I would suggest that this can be handled in your SQL model however, the source of the data can be identified by app_id, for example (or v_tracker alternatively), so your SQL can decide which it wants to use. In the tracking you’d just need to ensure that the orderId (or some alternative identifier for the transaction) is the same for both client and server.

3 Likes

Thanks for your reply! Sorry for the late response.

I was a bit unclear with “duplicates”. I think what I was wondering about is if we will get several ecommerce columns between the javascript tracker and the php tracker. Are they resolving to the same schema that is?

Yes - both will use the same columns in the atomic.events table (e.g., ti_, tr_ columns).

2 Likes