developer-documentation icon indicating copy to clipboard operation
developer-documentation copied to clipboard

the statistics of a campaign: sent - opened - unsubscribed - clicked - bounced

Open laabidi21 opened this issue 4 years ago • 2 comments

find the statistics of a campaig: the contacts to send and the contacts who opened the email ... (sent - opened - unsubscribed - clicked - bounced). OR retrieve contacts(sent - opened - unsubscribed - clicked - bounced) after sending an email. recovery will be by campaignId.

PHP 7.2 Mautic 3.0.1

$MauticAPI= $api->newApi("data", $auth, $apiUrl); $limit = 30; $offset = 0; $option = ['dateFrom' => "2020-09-25", 'dateTo' => "2020-10-22", 'timeUnit' => "m", 'filter' => ['campaignId' => $Campaign_id], 'dataset' => ['send', 'opened', 'unsubscribed', 'clicked', 'bounced'], 'limit' => $limit, 'offset' => $offset]; $WIDGETS = $MauticAPI->get('emails.in.time', $option );

Result -> {"success":1,"cached":false,"execution_time":0.009031057357788086,"data":{"chartType":"line","chartHeight":220,"chartData":{"labels":["Sep 2020","Oct 2020"],"datasets":[{"label":"Sent emails","data":[0,6],"backgroundColor":"rgba(78,93,157,0.1)","borderColor":"rgba(78,93,157,0.8)","pointHoverBackgroundColor":"rgba(78,93,157,0.75)","pointHoverBorderColor":"rgba(78,93,157,1)"},{"label":"Read emails","data":[0,0],"backgroundColor":"rgba(0,180,156,0.1)","borderColor":"rgba(0,180,156,0.8)","pointHoverBackgroundColor":"rgba(0,180,156,0.75)","pointHoverBorderColor":"rgba(0,180,156,1)"},{"label":"Clicked","data":[0,0],"backgroundColor":"rgba(253,149,114,0.1)","borderColor":"rgba(253,149,114,0.8)","pointHoverBackgroundColor":"rgba(253,149,114,0.75)","pointHoverBorderColor":"rgba(253,149,114,1)"},{"label":"Unsubscribed","data":[0,0],"backgroundColor":"rgba(253,185,51,0.1)","borderColor":"rgba(253,185,51,0.8)","pointHoverBackgroundColor":"rgba(253,185,51,0.75)","pointHoverBorderColor":"rgba(253,185,51,1)"},{"label":"Bounced","data":[0,0],"backgroundColor":"rgba(117,117,117,0.1)","borderColor":"rgba(117,117,117,0.8)","pointHoverBackgroundColor":"rgba(117,117,117,0.75)","pointHoverBorderColor":"rgba(117,117,117,1)"}]}}}

for exemple: Sent emails {"label":"Sent emails","data":[0,6], -> it means that the email is sent to 6 contacts I don't want to have the number of contacts who received the emails, but the IDs of the contacts.

can someone help me in this shots ? THX


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

laabidi21 avatar Oct 22 '20 11:10 laabidi21

@escopecz how I can access the statistics of an Email or campaign .. the statistics of a campaign: sent - opened - unsubscribed - clicked - bounced ?

laabidi21 avatar Oct 23 '20 06:10 laabidi21

@npracht how I can access the statistics of an Email or campaign .. the statistics of a campaign: sent - opened - unsubscribed - clicked - bounced ?

laabidi21 avatar Oct 30 '20 08:10 laabidi21