0

Complementary infos about 'Completed Order' segmantic event

Hi Segment community,

I need a bit more informations about 'Completed Order' segmantic event.

1 / Marketplace vs . SaaS

I can easily see how this event fit with a SaaS model. Users proceed to payments, and it goes to revenues. But what if my project is a very basic marketplace? With spends, earnings, and fees for us. Is this event still compliant (or enough)?

2/ Probable mistake in your doc

The piece of code you're giving as an example is probably wrong with these properties:

total: 30,

revenue: 25,

shipping: 3,

tax: 2,

discount: 2.5,

25 + 3 + 2 -2.5 = 27.5   right?

3/ Mandatory properties

Am I obliged to use all of the properties? Such as 'shipping' or 'tax'? My startup knows no shipping, and I can't see something useful with tax values.

The main reason of why I'm moving to Segment is for analysis solutions (Google Analytics, Mixpanel, and more).

Which property will be treated as a revenue in Mixpanel? The 'revenue' as indicated? (25 in the example), or the `total` (30 in the example)?

4replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • HeyJessy, and thanks so much for writing in. I'm answering your questions inline below: 

    1. Our ecommerce spec is compliant with Google Analytics, WooCommerce, Magento and others - and the `Completed Order` event supports the fields as laid out in our spec here. Your events should be fine as long as you only include fields we map to. For example, if you're passing `revenue`, but want to subtract various sundry fees, you could perform your own calculation to come up with the correct  `total` before passing that value into your `track` event.

    2. How you calculate monetary values is completely up to you. In this case, we started with a product that was $27.50 - with a $2.50 discount, the product costs $25, plus $5 shipping and handling, brings our `total` to $30.

    3. No, you're not required to use all the properties. 

    Note that our ecommerce spec is based on Google Analytics's ecommerce spec  because we believe GA is a powerful tool to analyze ecommerce data. That said, the spec is not  yet 100 percent compatible with Mixpanel (although that's something we're actively working on). Segment won't pass both `total` and `revenue` to Mixpanel. We'll first pass `revenue`, but if a `revenue` is missing from your event, we'll pass `total`. If both are present, we'll only pass `revenue`.

    Hope this helps!

    Reply Upvote 1
  • Thank you for your answer :)

    Crystal clear!

    Reply Upvote 1
  • Hi Brennan,

     

    I'm jumping into this conversation .

    There are a few guides available on how to track events for E-commerce, SaaS, ...

    Any chance to get one for market places  ;) ? 

    Reply Upvote
  • Hey Romain - apologies, I'm not quite sure what you're asking. Our ecommerce spec is not different for the type or style of each platform, including for ecommerce sites and marketplaces, which are largely the same thing. If you can clarify, happy to provide any and all information I have! :)

    Reply Upvote