Skip to content

Commit

Permalink
allow forcing server side ecommerce tracking for all events
Browse files Browse the repository at this point in the history
  • Loading branch information
diosmosis committed Jan 19, 2025
1 parent 567f54d commit da8f368
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions classes/WpMatomo/Ecommerce/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ protected function set_order_been_tracked( $order_id ) {
protected function should_track_background() {
return ( defined( 'DOING_AJAX' ) && DOING_AJAX )
|| ( defined( 'REST_REQUEST' ) && REST_REQUEST )
|| $this->settings->get_global_option( 'track_mode' ) === TrackingSettings::TRACK_MODE_TAGMANAGER
|| did_action( 'wp_footer' );
|| ( defined( 'MATOMO_TRACK_ECOMMERCE_SERVER_SIDE' ) && MATOMO_TRACK_ECOMMERCE_SERVER_SIDE )
|| did_action( 'wp_footer' )
|| $this->settings->get_global_option( 'track_mode' ) === TrackingSettings::TRACK_MODE_TAGMANAGER;
}

protected function make_matomo_js_tracker_call( $params ) {
Expand Down

0 comments on commit da8f368

Please sign in to comment.