segment-boneyard / analytics-wordpress

[DEPRECATED] The hassle-free way to integrate analytics into any WordPress site.
https://segment.com/docs/platforms/wordpress/
GNU General Public License v2.0
41 stars 34 forks source link

Guard against duplicate "Completed Order" calls. #54

Open sperand-io opened 9 years ago

sperand-io commented 9 years ago

Not sure how best to handle just yet. This is especially problematic for cases where users bookmark their order confirmation page.

JustinSainton commented 9 years ago

Most of the eCom platforms will have a couple options here:

1) Purchase Meta: You can set a purchase meta flag that denotes that the call has been sent. 2) Order status transitions: I know for sure that WP eCommerce logs the status (and old status, if one exists). You could send the call conditionally, based on the old status. If there is no "old" status that was "approved" - then you would send the call.

sperand-io commented 9 years ago

Thanks so much @JustinSainton! You're the best. @ianstormtaylor and I are syncing on plugin maintenance on Wednesday — we'll follow up after that.

JustinSainton commented 9 years ago

:+1: