Repository navigation
Record WooCommerce purchase revenue; stop counting checkouts as revenue - #1
Merged
Merged
Conversation
LinkForty sums a conversion's `value` as revenue. The purchase event now sends the order total as `value` (keeping `revenue` with the same total for existing filters), and begin_checkout sends its cart total as `cart_total` so a started checkout is not counted as revenue. The events docblock, README, readme.txt and the event contract in CONTRIBUTING.md now say `value` is revenue, and that the pixel drops nested objects rather than flattening them.
7 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LinkForty sums a conversion's
valueas revenue. The pixel'strack(name, properties)reads the amount fromproperties.valueonly.purchasenow sends the order total asvalue.revenueis still sent with the same total, so alinkforty_purchase_propertiesfilter written against 0.1.0 keeps working.begin_checkoutsends the cart total ascart_totalinstead ofvalue. Asvalueit was summed as revenue: every checkout page view added its cart total. This renames a documented property, so it's listed as breaking in the changelog (0.x).add_to_cartis unchanged (it sendsprice, which isn't summed).LinkForty_Events::trackdocblock, README, readme.txt and the event contract in CONTRIBUTING.md now sayvalueis revenue. CONTRIBUTING also said the pixel flattens nested objects; it drops them.Test plan
composer lint— no syntax errorscomposer phpcs— cleanpurchaserequest carries"value": <order total>and the dashboard's Web tab shows it as conversion valuebegin_checkoutcarriescart_totaland novalue