An Inx_Api_DataAccess_DataAccess object can be used to retrieve data regarding links and clicks.
An Inx_Api_DataAccess_DataAccess object can be used to retrieve data regarding links and clicks. Link data can be retrieved using an Inx_Api_DataAccess_LinkData object, click data by using an Inx_Api_DataAccess_ClickData object. Both can be obtained via this class. An Inx_Api_DataAccess_LinkData object can retrieve link data with the following filters:
An Inx_Api_DataAccess_ClickData object can retrieve click data with the following filters:
Inx_Api_DataAccess_LinkData and Inx_Api_DataAccess_ClickData retrieve the information as result set: Inx_Api_DataAccess_LinkDataRowSet for link data and Inx_Api_DataAccess_ClickDataRowSet for click data. Using these result sets it is easy to navigate through the data retrieved by the various methods.
The following snippet returns an Inx_Api_DataAccess_LinkDataRowSet containing all link data for the given recipient id:
$oDataAccess = $oSession->getDataAccess(); $oLinkData = $oDataAccess->getLinkDataWithNewLinkType(); ... $oLinkDataRowSet = $oLinkData->selectByRecipient( $iId );
The following snippet returns an Inx_Api_DataAccess_ClickDataRowSet containing all click data for the given recipient id:
$oDataAccess = $oSession->getDataAccess(); $oClickData = $oDataAccess->getClickData(); $oRecipientContext = $oSession->createRecipientContext(); $oEmail = $oRecipientContext->getMetaData()->getEmailAttribute(); ... ClickDataRowSet rowSet = cd.selectByRecipient( id, rc, new Attribute[]{email} );
API version 1.11.1 allows you to filter by the type of the clicked link and to retrieve all clicks filtered only by date. Offering all possible combinations would have made figuring out which method is the right one a tedious job. Therefore, these filter types are only available using the new fluent query interface. The query API also allows to specify arrays of IDs. The following snippet demonstrates how to filter the clicks by two mailings, two link types and a start date:
$oDataAccess = $oSession->getDataAccess(); $oClickData = $oDataAccess->getClickData(); $oRecipientContext = $oSession->createRecipientContext(); $oEmail = $oRecipientContext->getMetaData()->getEmailAttribute(); $aMailingIds = array( 1234, 4711 ); $aLinkTypes = array( Inx_Api_DataAccess_LinkDataRowSet::LINK_TYPE_UNIQUE_COUNT, Inx_Api_DataAccess_LinkDataRowSet::LINK_TYPE_OPENING_COUNT ); $sOneDayAgo = date( 'c', strtotime( '-1 day' ) ); ... $oClickDataQuery = $oClickData->createQuery( $oRecipientContext, array( email ) ); $oClickDataRowSet = $oClickDataQuery->mailings( $aMailingIds )->linkTypes( $aLinkTypes )->after( $sOneDayAgo ).executeQuery();
API version 1.12.1 allows you to filter links with a fluent query interface, similar to the fluent query interface for selecting clicks. Filter options newly available with this API version are only accessible through the new query. The following snipped demonstrates by example how to filter links with the new fluent query interface.:
$oQuery = session->getDataAccess()->getLinkDataWithNewLinkType()->createQuery(); $oResult = $oQuery->linkType(Inx_Api_DataAccess_LinkDataRowSet::LINK_TYPE_UNIQUE_COUNT)-> recipientIds(array(1001, 1002))->executeQuery();
Note: All data provided by Inx_Api_DataAccess_DataAccess is read only!
For more information about link and click data, see the Inx_Api_DataAccess_LinkData and Inx_Api_DataAccess_ClickData documentation.
Located in /Api/DataAccess/DataAccess.php (line 100)
Returns the click data object which can be used to access the click data.
Returns the click data object which can be used to access the click data.
Returns the link data object which can used to access the link data.
Returns the link data object which can used to access the link data.
Returns the link data object which can used to access the link data. In this method unique counted image links are not counted as unique links. opening-count.
Returns the link data object which can used to access the link data.
In this method unique counted image links are not counted as unique links. These links have the new type opening-count.
Documentation generated on Thu, 17 Sep 2015 14:27:23 +0200 by phpDocumentor 1.3.2