From 395c427b4551d70103880c15a0b49bf14ca32526 Mon Sep 17 00:00:00 2001 From: Rhys Williams Date: Thu, 7 Jul 2016 08:20:31 +1000 Subject: [PATCH] Multiple 'track' events attached to action - only one fires. Change include_once() to include() to output the tracking snipper for each track event that is attached to an action. E.g. Attaching a track event to woocommerce_thankyou action makes Segment Analytics "Completed Order" track event never fire. --- analytics-wordpress.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/analytics-wordpress.php b/analytics-wordpress.php index 93baf1a..778ec06 100644 --- a/analytics-wordpress.php +++ b/analytics-wordpress.php @@ -130,7 +130,7 @@ public static function track( $event, $properties = array(), $options = array(), // Set the proper `library` option so we know where the API calls come from. $options['library'] = 'analytics-wordpress'; - include_once( SEG_FILE_PATH . '/templates/track.php' ); + include( SEG_FILE_PATH . '/templates/track.php' ); } /**