Data Capture Action

The Data Capture action captures user-definable data from interactive sign/kiosk applications.

For example, you can associate names, addresses, phone numbers or email addresses with the campaign playing the interactive content.

With this action, interactive kiosks will have the ability to provide an interface via dynamic content such as Flash to request data input from the end users. All the data is then passed back locally to the Broadsign Player via the the Data Capture action and associated with the corresponding campaign. The collected data is reported back to the Broadsign main server in order for each interactive campaign to report its captured data in the campaign data report.

data_capture Action

You can call the Player API with the Data Capture action using one of the following methods:

    • remote_action: Exposes the data_capture action via the command-line remote_action tool.
    • XML: Exposes the data_capture action through simple XML commands sent to port 2324.
    • Flash: Flash applications can call the API via ActionScript and the data_capture action.

With the command-line remote_action tool, the action name data_capture is to be used. The executable can be found in the Broadsign Player’s installation bin directory. For example, to submit a phone number, name and email address associated with Campaign ID 12345, the command should be as follows:

remote_action data_capture -c 12345 -D "name=Steve&phone=5143991184&email=steve@broadsign.com"

Additional options for the data_capture action include the Campaign ID with which the data is associated:

-c, --campaign_id

The campaign data:

-D, --data

Show the campaign data associated with the campaign_id variable:

-O, --show_data

Clear all the campaign data associated with the campaign_id variable:

-C, --clear

Your interactive application can submit XML data to the Broadsign Player by sending an XML message to the monitor_remote port (2324):

<rc version="1" id="1" action="data_capture" campaign_id="12345" data="name=John+Smith&&amp;email=test@test.com"/>\r\n\r\n 

The player will respond with the following document:

<rc id="1" version="1" action="data_capture" status="1"/>

A status result of “1” indicates that the action succeeded.

Data Capture – XML Parameters
Parameter Description
version The version is always “1”.
id Contains the identifier of the request.
action The kind of action to be taken; always data_capture.
campaign_id The ID of the campaign playing interactive content, to which the user-definable data will adhere.
status Confirms the status of the data capture. Always “1” (active) or “0” (inactive).
data A user-definable series of key-value pairs. Format is percent-encoded. Pairs are separated by the HTML entity of an ampersand (“&amp;”). Keys and values are separated by an equal sign (“=”).
show_data Shows the data associated with a campaign (via the campaign_id variable).
clear Clears all the data associated with a campaign (via the campaign_id variable).

Your interactive application can submit JSON data to the player via the WebSocket server of monitor_remote (port 2326). You will need to enable the WebSocket server. For more information, see Configuration Profiles – Players – The Remote Control Tab.

{
    "rc": {
        "version": "1",
        "id": "1",
        "action": "data_capture",
        "campaign_id": "12345",
        "data": "name=John+Smith&amp;email=test@test.com"
    }
}

The player will output the following JSON document:

{
    "rc": {
        "action": "data_capture",
        "id": "1",
        "status": "1",
        "version": "1"
    }
}

A status result of “1” indicates that the action succeeded.

Data Capture API – JSON Parameters
Parameter Description
version The version is always “1”.
id Contains the identifier of the request.
action The kind of action to be taken; always data_capture.
campaign_id The ID of the campaign playing interactive content, to which the user-definable data will adhere.

data A user-definable series of key-value pairs. Format is percent-encoded. Pairs are separated by the HTML entity of an ampersand (“&amp;”). Keys and values are separated by an equal sign (“=”).
status Confirms the status of the data capture. Always “1” (active) or “0” (inactive).
show_data Shows the data associated with a campaign (via the campaign_id variable).
clear Clears all the data associated with a campaign (via the campaign_id variable).

The Player API can be used from Flash as follows:

// Start ActionScript 2.0
var theSocket:XMLSocket = new XMLSocket();

theSocket.onConnect=function() {
  theSocket.send(new XML(" action=\"data_capture\" campaign_id=\"12345\" data=\"name=John+Smith&amp;email=test@test.com\"/>\r\n\r\n"));
}

theSocket.onXML=function(myXML) {
  // XXX: parse and use the returned XML here
  trace(myXML);
  theSocket.close();
}

theSocket.connect("localhost", 2324);

Broadsign will store the data provided by the player, and associate it with the Campaign ID.

You can retrieve the data in one of two ways:

Value pairs are user-definable; the column headers for the report are dynamically generated. For all data captured for a given campaign, each unique set of keys will be presented in a distinct table of its own. This allows for multiple different kinds of data to be captured and analyzed separately, without having to define a specific report structure.

The campaign data report shows the campaign details summary and then a column for each entry from the key value pair information entered by the interactive application. The report can be exported in HTML, CSV or PDF.

The Data Capture report