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.
Note: In all examples included on this page, the data field is a user-definable series of key-value pairs. The format is percent-encoded.
Using remote_action
, pairs are separated by an ampersand ("&"); using XML or JSON pairs are separated by the HTML entity of an ampersand ("&").
Keys and values are separated by an equal sign ("=").
With this action, interactive kiosks will have the ability to provide an interface via dynamic content such as HTML5 to request data input from the end users. All the data is then passed back locally to Broadsign Control Player via the data capture action and associated with the corresponding campaign. The collected data is reported back to Broadsign Server in order for each interactive campaign to report its captured data in the campaign data report.
Call the data capture action using one of the following:
WebSocket Server:
-
JSON – You can pass parameters from within your HTML5 file using JSON.
Note: Ensure that you select Enable Remote Control in the Remote Control tab of the configuration profile. See The Remote Control Tab.
Note: If using JSON via the WebSocket server, any firewall present on Broadsign Control Player should be configured to access port 2326 directly for use.
Port 2324:
- remote_action – An application that ships with Broadsign Control Player, using command line.
- XML – If you want to develop your own applications, you can communicate directly with Broadsign Control Player API using XML.
Note: Ensure that you select Enable Remote Control in the Remote Control tab of the configuration profile. See The Remote Control Tab.
Note: Any firewall present on Broadsign Control Player should be configured to either allow bsp.exe to open ports, or configure port 2324 or port 2326 directly for use.
Note: The Triggers Action is the only exception to this rule. It uses port 2325. See Triggers Action.
You can call this action on Windows and Ubuntu Linux, and find it along the following paths:
- Windows (64-bit):
- Ubuntu Linux:
/opt/broadsign/suite/bsp/bin/
C:\Program Files\BroadSign\bsp\bin
With the command-line remote_action tool, the action name data_capture is to be used. The executable can be found in Broadsign Control 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=Brent&phone=5143991184&email=brent@broadsign.com"
Extra 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 Broadsign Control 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&&email=test@test.com"/>\r\n\r\n
Note: You must terminate the request with \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.
Note: Each command sent requires a unique identifier (id). The application can use a simple incrementing value here.
Data Capture - XML Parameters
Note: Any firewall present on Broadsign Control Player should be configured to either allow bsp.exe to open ports, or configure port 2324 or port 2326 directly for use.
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 ("&"). 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 The Remote Control Tab.
{
"rc": {
"version": "1",
"id": "1",
"action": "data_capture",
"campaign_id": "12345",
"data": "name=John+Smith&email=test@test.com"
}
}
Note: Each command sent requires a unique identifier (id). The application can use a simple incrementing value here.
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 Action - JSON Parameters
Note: If using JSON via the WebSocket server, any firewall present on Broadsign Control Player should be configured to access port 2326 directly for use.
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 ("&"). 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). |
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.