We have an ecommerce platform where our users setup online stores for their businesses. We need to track when their visitors complete purchases so we can know about store activity to underestand our users better. For example we want to cohort our users based on those than have >100 purchases vs <= 100.
To do this, we are thinking of making a `Store Checkout Completed` that is a server fired event that we send via the HTTP API.
Our approach is this:
- device_id is always nil since the person that triggered the event is the visitor not our user. Amplitude HTTP docs say that the device_id isn't required if we specify the user id (which we always do in this case)
- we set the user id to be the user id of our actual user on our platform
- we've set the event to be Activity type of "inactive" since the user isn't generating this event, it's done on behalf of them
Are there any gotchas here we need to worry about? We are already doing something like this for our subscription events since "Subscription Renewal Completed" is done out of band when a user's subscription is renewed. The only diff here is this event is not triggered solely by our system but instead our user's shopper.