@@ -59,6 +59,9 @@ public static function add_order_attribution_meta( $order, $assoc_args = array()
5959 '_wc_order_attribution_session_pages ' => wp_rand ( 1 , 10 ),
6060 '_wc_order_attribution_session_start_time ' => self ::get_random_session_start_time ( $ order ),
6161 '_wc_order_attribution_session_entry ' => $ product_url ,
62+ '_wc_order_attribution_utm_content ' => $ utm_content ,
63+ '_wc_order_attribution_utm_source ' => self ::get_source ( $ source_type ),
64+ '_wc_order_attribution_referrer ' => self ::get_referrer ( $ source_type ),
6265 '_wc_order_attribution_source_type ' => $ source_type ,
6366 );
6467
@@ -67,7 +70,6 @@ public static function add_order_attribution_meta( $order, $assoc_args = array()
6770 $ campaign_data = self ::get_campaign_data ();
6871 $ meta = array_merge ( $ meta , $ campaign_data );
6972 } else {
70- $ meta ['_wc_order_attribution_utm_content ' ] = $ utm_content ;
7173 }
7274 }
7375
@@ -398,8 +400,6 @@ private static function get_seasonal_campaign_data() {
398400 '_wc_order_attribution_utm_campaign ' => $ campaign_name ,
399401 '_wc_order_attribution_utm_content ' => $ campaign ['content ' ],
400402 '_wc_order_attribution_utm_term ' => $ campaign ['term ' ],
401- '_wc_order_attribution_utm_source ' => 'email ' ,
402- '_wc_order_attribution_utm_medium ' => 'email ' ,
403403 );
404404 }
405405
@@ -427,8 +427,6 @@ private static function get_promotional_campaign_data() {
427427 '_wc_order_attribution_utm_campaign ' => $ campaign_name ,
428428 '_wc_order_attribution_utm_content ' => $ campaign ['content ' ],
429429 '_wc_order_attribution_utm_term ' => $ campaign ['term ' ],
430- '_wc_order_attribution_utm_source ' => 'social ' ,
431- '_wc_order_attribution_utm_medium ' => 'cpc ' ,
432430 );
433431 }
434432
@@ -456,8 +454,6 @@ private static function get_product_campaign_data() {
456454 '_wc_order_attribution_utm_campaign ' => $ campaign_name ,
457455 '_wc_order_attribution_utm_content ' => $ campaign ['content ' ],
458456 '_wc_order_attribution_utm_term ' => $ campaign ['term ' ],
459- '_wc_order_attribution_utm_source ' => 'google ' ,
460- '_wc_order_attribution_utm_medium ' => 'cpc ' ,
461457 );
462458 }
463459
@@ -489,8 +485,6 @@ private static function get_general_campaign_data() {
489485 '_wc_order_attribution_utm_campaign ' => $ campaign_name ,
490486 '_wc_order_attribution_utm_content ' => $ campaign ['content ' ],
491487 '_wc_order_attribution_utm_term ' => $ campaign ['term ' ],
492- '_wc_order_attribution_utm_source ' => 'email ' ,
493- '_wc_order_attribution_utm_medium ' => 'email ' ,
494488 );
495489 }
496490
0 commit comments