Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

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

Open
laabidi21 opened this issue Oct 22, 2020 · 2 comments

Comments

@laabidi21
Copy link

laabidi21 commented Oct 22, 2020

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
Copy link
Author

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

@laabidi21
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant