This application note provides a gentle starting point for learning about the Visitor Data Collection functionality of Blocks. While it shows the basic steps for collecting visitor data based on mobile phones, it provides no useful functionality beyond the data collection as such.
You need a computer with a running the Blocks server software and a web browser to use this application note. Your Blocks server must also have the additional Visitor Data Collection license (you can check this under Manage/Licenses).
There's a complete PIXILAB-blocks-root folder containing everything you need to run this application note. Download this ZIP file and follow the in the general setup instructions to get up and running.
Then follow these steps to run this application.
Repeat the steps above using another phone or a separate browser (not just another browser window on your computer using the same browser as used above, if any).
As mentioned at the beginning of this application not, all it does is collect data from visitor's phones. The resulting data ends up in the record directory of your Blocks server, in the subdirectory named after the data type collected, which in this case is HelloWorldData. Herein you'll find a folder named with the identity given to the visitor's phone, beginning with a P followed by a number. There's one such folder for each unique data record, containing at least a TSV file with a log of all the actions taken by the visitor affecting the data record. A TSV file is similar to its more well known CSV cousin, but uses tab characters as separators instead of commas. The content of the file can be viewed in a text editor, or opened using a spreadsheet such as Microsoft Excel or Apple Numbers. Here's an example of what it can look like:
This log file contains a complet transcript of all changes applied to the data record. This can be used to analyze where the visitor has been, in what order and how long each location is visited, for example. The data columns are:
The collection of fields match what data you want to collect, and is defined in the script managing the data collection. The name of this record type is then specified in the "Identify Individual Visitors by" field on the Identity tab of the Visitor Spot's settings.
The script defining the data record as well as how data is collected and used here is at script/user/HelloWorld.ts. This script consists mostly of comments providing detailed explanations on what's going on. You need to have the recommended set of development tools (or equivalent) to check out or modify this example.