Visitor Log

Visitor log is the means of a visitor to acknowledge their visit. Guest Manager provides portal-wise visitor log information. Visitor information for guests that accessed the WiFi with any plug-in, except the Clickthrough plug-in, is recorded in the visitor log. Information like visitor name, visitor’s birth date, last visit of the visitor and much more is provided in visitor logs. The visitor logs can also be exported in a CSV format.

JSON Table

Parameter Data Type Description Default/Sample Value
success boolean Whether the API call was successful or not. true
message String A message indicating the API success or failure. “Record(s) Found”
data application/json A JSON object for the response data.
data/totalCount int The number of records fetched. 1
data/visitorLog application/json A JSON object for the visitor log
data/visitorLog/uid ObjectId The ID of the guest user. This is of the mongo objectId type. “5a5f59848c907b06f54c5341”
data/visitorLog/pid int Id of the portal, to which the plugin being used to have gate access was used by visited, belongs 18
data/visitorLog/pgid int Id of the plugin being used by visitor to have gate access 8
data/visitorLog/sid int Id of the server from which the visitor had gate access
data/visitorLog/lid int Id of the location from where visitor had gate access
data/visitorLog/picture_url String Url from where the user profile image is accessible
data/visitorLog/portal_name String Name of the portal, to which the plugin being used to have gate access was used by visited, belongs vvv
data/visitorLog/plugin_name String Name of the plugin being used by visitor to have gate access. Web Form
data/visitorLog/username String Login name of the vistor [email protected]
data/visitorLog/first_name String First name of the visitor
data/visitorLog/last_name String Last name of the visitor
data/visitorLog/gender String Gender of the visitor
data/visitorLog/birth_day int Day of the month on which visitor was born
data/visitorLog/birth_month int Month in which visitor was born
data/visitorLog/birth_year int Year in which visitor was born
data/visitorLog/location String Location of the visitor
data/visitorLog/email String Email Id of the visitor [email protected]
data/visitorLog/age_range int Age group to which the visitor belongs
data/visitorLog/phone_number int Phone number of visitor
data/visitorLog/login_location String Location from which visitor had gate access
data/visitorLog/visit_count int Number of visits made by the visitor 1
data/visitorLog/languages String Languages know by the visitor
data/visitorLog/friends_count int Number of friends visitor has
data/visitorLog/followers_count int Number of followers visitor has
data/visitorLog/date_created Date Date on which the log was created for the visitor 2018-01-17 14:11:16.000000″,
data/visitorLog/last_visit Date Date on which visitor last had gate access 2018-01-17 14:11:16.000000
data/visitorLog/membership_id Membership_id is field which stores any external value which is not available on Guest Manager.
data/visitorLog/marketing_optin boolean A true or false value indicating whether to receive marketing option
email or not.
true
data/visitorLog/followed int Number of users followed after twitter login.
data/visitorLog/already_followed int Number of users already followed after twitter login.
data/visitorLog/follow_skipped int Number of users skpiied followed after twitter login.
data/visitorLog/host
data/visitorLog/skip_visit_count int Number of visits using skip splash page.
data/visitorLog/last_skip_visit int Time of recent skip.

Copy Sample JSON
Sample JSON
{
    "success": true,
    "message": "Record(s) Found",
    "data": {
        "totalCount": 1,
        "visitorLog": [
            {
                "pid": 18,
                "pgid": 8,
                "uid": "5a5f59848c907b06f54c5341",
                "sid": null,
                "lid": null,
                "picture_url": null,
                "portal_name": "vvv",
                "plugin_name": "Web Form",
                "username": "[email protected]",
                "first_name": null,
                "last_name": null,
                "gender": null,
                "birth_day": null,
                "birth_month": null,
                "birth_year": null,
                "location": null,
                "email": "[email protected]",
                "age_range": null,
                "phone_number": null,
                "login_location": null,
                "visit_count": 1,
                "languages": null,
                "friends_count": null,
                "followers_count": null,
                "last_visit": "2018-01-17 14:11:16.000000",
                "date_created": "2018-01-17 14:11:16.000000",
                "membership_id": null,
                "marketing_optin": true,
                "followed": null,
                "already_followed": null,
                "follow_skipped": null,
                "host": null,
                "skip_visit_count": null,
                "last_skip_visit": null
            }
        ]
    }
}
API Calls

/v1.14/visitorlogs

/v1.14/visitorlogs/exportcsv

Get Visitor Log

Description This API is used to fetch the visitor logs from the Guest Manager. Visitor information for guests that accessed the WiFi with any plug-in,
except the Clickthrough plug-in, is recorded in the visitor log. Guest Manager users with the Administrator role or the Analyst role can access this API.
Syntax
GET <Base_URL>/visitorlogs?filter=<value>&sort=<value>

Here,

  • filter

    It takes a JSON value of the form:
    {“property”:”prop_name”,”value”:”prop_value”,”operator”:”comparison_operator”}
    Here,

    • property

      Property is a parameter in the visitor log on which the logs have to be filtered. For example, username.

    • value

      It specifies the property value to be used for filtering.

    • operator

      It is the comparison operator to be used for filtering the logs. The applicable operators are ‘=’, ‘!=’, ‘<>’, ‘<‘, ‘<=’, ‘>’, ‘>=’, ‘like’.

  • sort

    It takes a JSON value of the form:
    {“property”:”prop_name”,”direction”:”value”}
    Here,

    • property

      It is a parameter in the log on which the logs have to be sorted. For example, username.

    • direction

      It specifies sorting order. The applicable values are “asc” and “desc”.

Sample code
https://analyticsdemo.mojonetworks.com/api/v1.14/visitorlogs?filter=[{“property”:”username”,”value”:”[email protected]”,”operator”:”=”}]&sort=[{“property”:”username”,”direction”:”asc”}]
Request Body  This API call does not require any request body parameters.
Response Body  If the API call is successful, the HTTP response status is 200.
he response body contains the visitor log.

Export Visitor Log

Description This API is used to export the visitor logs in the CSV format from the Guest Manager. Visitor information for guests that accessed the WiFi with any plug-in, except the Clickthrough plug-in, is recorded in the visitor log.
Guest Manager users with the Administrator role or the Analyst role can access this API.
Syntax
GET <Base_URL>/visitorlogs/exportcsv?filter=<value>&sort=<value>

Here,

  • filter

    It takes a JSON value of the form:
    {“property”:”prop_name”,”value”:”prop_value”,”operator”:”comparison_operator”}
    Here,

    • property

      Property is a parameter in the visitor log on which the logs have to be filtered. For example, username.

    • value

      It specifies the property value to be used for filtering.

    • operator

      It is the comparison operator to be used for filtering the logs. The applicable operators are ‘=’, ‘!=’, ‘<>’, ‘<‘, ‘<=’, ‘>’, ‘>=’, ‘like’.

  • sort

    It takes a JSON value of the form:
    {“property”:”prop_name”,”direction”:”value”}
    Here,

    • property

      It is a parameter in the log on which the logs have to be sorted. For example, username.

    • direction

      It specifies sorting order. The applicable values are “asc” and “desc”.

Sample code https://marketverticalanalytics.airtightnw.com/api/v1.14/visitorlogs/exportcsv?filter=[{“property”:”username”,”value”:”[email protected]”,”operator”:”=”}]&sort=[{“property”:”username”,”direction”:”asc”}]
Request Body This API call does not require any request body parameters.
Response Body If successful, the API exports the visitor log to the CSV format and starts downloading the CSV file.