Skip to content

mailing_agent ​

php
array mailing_agent ( number $limit, number|array $shipmentId [, number|boolean $shipmentIdMax=false] )

Returns open and click counts by browser and operating system for the currently processed address in mailing $shipmentId (or an array of mailing IDs). If $shipmentIdMax is provided, collects data for mailings from $shipmentId to $shipmentIdMax.

Example:

php
print_r(mailing_agent(10, 3));

Result:

Array
(
    [open_browser] => Array
        (
            [3] => Array
                (
                    [count] => 1
                    [name] => Firefox
                    [icon] => firefox.png
                )

        )

    [open_system] => Array
        (
            [19] => Array
                (
                    [count] => 1
                    [name] => Linux
                    [icon] => linux.png
                )

        )

    [open_device] => Array
        (
            [2] => Array
                (
                    [count] => 1
                    [name] => Desktop
                    [icon] => desktop.png
                )

        )

    [open_browser_type] => Array
        (
            [Browser] => 1
        )

    [click_browser_type] => Array
        (
            [unknown] => 1
        )

    [open_device_type] => Array
        (
            [desktop] => 1
        )

    [click_device_type] => Array
        (
        )

)