Skip to content

Record WooCommerce purchase revenue; stop counting checkouts as revenue - #1

Merged
onamfc merged 1 commit into
mainfrom
fix/woocommerce-purchase-value
Oct 17, 2026
Merged

onamfc merged 1 commit into
mainfrom
fix/woocommerce-purchase-value

Conversation

@onamfc

@onamfc onamfc commented Oct 17, 2026

Copy link
Copy Markdown
Member

Summary

LinkForty sums a conversion's value as revenue. The pixel's track(name, properties) reads the amount from properties.value only.

  • purchase now sends the order total as value. revenue is still sent with the same total, so a linkforty_purchase_properties filter written against 0.1.0 keeps working.
  • begin_checkout sends the cart total as cart_total instead of value. As value it 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_cart is unchanged (it sends price, which isn't summed).
  • The LinkForty_Events::track docblock, README, readme.txt and the event contract in CONTRIBUTING.md now say value is revenue. CONTRIBUTING also said the pixel flattens nested objects; it drops them.

Test plan

  • composer lint — no syntax errors
  • composer phpcs — clean
  • On a test store: place an order through a LinkForty link; the pixel's purchase request carries "value": <order total> and the dashboard's Web tab shows it as conversion value
  • Visit checkout with a non-empty cart; begin_checkout carries cart_total and no value

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.
@onamfc
onamfc merged commit 4f1169f into main Oct 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant