Skip to content

t_campaign_domains ​

php
array  t_campaign_domains ( string $kampania [, array|boolean $okres, integer|boolean $limit])

Returns summary statistics for transactional mailings in the selected campaign and time range, grouped by recipient domain.

Parameters

In $kampania, specify the name of the campaign to retrieve statistics for.

In $okres, specify the time range to retrieve statistics for in the campaign.

  • If omitted, returns statistics for the entire campaign duration.
  • array($okres_od, $okres_do) - returns statistics for the specified time range (timestamps).
  • A single numeric value - returns statistics from the specified timestamp to the present. In $limit, specify the number of records (domains) to return.

Returned statistics

  1. Number of messages sent in the selected time range
  2. Number of messages received in the selected time range
  3. Number of clicked messages in the selected time range
  4. Number of addresses that unsubscribed from the campaign
  5. Number of bounces in the campaign

Example

php

$kampania = 'transactional_campaign';

$tydzien_temu = strtotime('-7 days');
$wynik = t_campaign_domains($kampania, $tydzien_temu, 2);

print_r($wynik);

Result

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

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

)