Skip to content

Commit

Permalink
Fix grouping logic
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed Nov 19, 2022
1 parent c6d8437 commit 8f9a356
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions lhc_web/lib/core/lhchat/lhchatstatistic.php
Original file line number Diff line number Diff line change
Expand Up @@ -2226,18 +2226,32 @@ public static function getProactiveStatistic($params)

'INV_CONVERSIONS_INIT' => erLhAbstractModelProactiveChatCampaignConversion::getCount(array_merge_recursive($params['filter'], array('filternot' => array('conv_event' => '')))),

'INV_UNIQ_CONVERSIONS' => erLhAbstractModelProactiveChatCampaignConversion::getCount(array_merge_recursive($params['filter'], array('group' => 'vid_id', 'filtergt' => array('conv_int_time' => 0)))),
'INV_UNIQ_CONVERSIONS' => erLhAbstractModelProactiveChatCampaignConversion::getCount(array_merge_recursive($params['filter'], array('limit' => false, 'filtergt' => array('conv_int_time' => 0))),
'count',
false,
'count(distinct vid_id)'),

'INV_UNIQ_CONVERSIONS_INIT' => erLhAbstractModelProactiveChatCampaignConversion::getCount(array_merge_recursive($params['filter'], array('group' => 'vid_id', 'filternot' => array('conv_event' => '')))),
'INV_UNIQ_CONVERSIONS_INIT' => erLhAbstractModelProactiveChatCampaignConversion::getCount(array_merge_recursive($params['filter'], array('limit' => false, 'filternot' => array('conv_event' => ''))),
'count',
false,
'count(distinct vid_id)'),

// Statistic based on unique_id field
'INV_CUSTOM_CONVERSIONS' => erLhAbstractModelProactiveChatCampaignConversion::getCount(array_merge_recursive($params['filter'], array('filternot' => array('unique_id' => ''), 'filtergt' => array('conv_int_time' => 0)))),

'INV_CUSTOM_CONVERSIONS_INIT' => erLhAbstractModelProactiveChatCampaignConversion::getCount(array_merge_recursive($params['filter'], array('filternot' => array('unique_id' => '','conv_event' => '')))),

'INV_CUSTOM_UNIQ_CONVERSIONS' => erLhAbstractModelProactiveChatCampaignConversion::getCount(array_merge_recursive($params['filter'], array('group' => 'unique_id', 'filternot' => array('unique_id' => ''), 'filtergt' => array('conv_int_time' => 0)))),

'INV_CUSTOM_UNIQ_CONVERSIONS_INIT' => erLhAbstractModelProactiveChatCampaignConversion::getCount(array_merge_recursive($params['filter'], array('group' => 'unique_id', 'filternot' => array('unique_id' => '', 'conv_event' => '')))),
'INV_CUSTOM_UNIQ_CONVERSIONS' => erLhAbstractModelProactiveChatCampaignConversion::getCount(array_merge_recursive($params['filter'], array('limit' => false, 'filternot' => array('unique_id' => ''), 'filtergt' => array('conv_int_time' => 0))),
'count',
false,
'count(distinct unique_id)'
),
'INV_CUSTOM_UNIQ_CONVERSIONS_INIT' => erLhAbstractModelProactiveChatCampaignConversion::getCount(
array_merge_recursive($params['filter'], array('limit' => false, 'filternot' => array('unique_id' => '', 'conv_event' => ''))),
'count',
false,
'count(distinct unique_id)'
),
);

return $stats;
Expand Down

0 comments on commit 8f9a356

Please sign in to comment.