Skip to content

campaign_domains ​

php
array campaign_domains( number $campaignId [, $domainsGroup=false [, $type=false]] )

Returns an array with sent (index 0), bounce (index 1), open (index 2), click (index 3) and unsubscribe (index 4) counts by domain for campaign $campaignId. If $domainsGroup is provided, groups the data by domain. Use $type to specify the desired data types. Available types:

  • sent - number of sent messages
  • bounced - number of bounces
  • opened - number of opens
  • clicked - number of clicks
  • optedout - number of unsubscribes

Example:

php
print_r(campaign_domains(1));

Result:

Array
 (
     [sare.pl] => Array
         (
             [0] => 2
             [1] => 0
             [2] => 0
             [3] => 0
             [4] => 0
         )

     [example.com] => Array
         (
             [0] => 1
             [1] => 0
             [2] => 0
             [3] => 0
             [4] => 0
         )

 )