HomeGuidesRecipesAPI
HomeGuidesAPILog In
Guides
These docs are for v10. Click to read the latest docs for v31.

Device (Location) Log

The device and location as its name suggests, stores the technologies used to access Infiniti together with any location data that can be obtained during a user's session.

🚧

Analytics Module

Only available in environments with an analytics module license.

🚧

Web Only

Device and Location Log data is captured via the Infiniti Produce App only

Location data is categorized into high and low accuracy readings. Infiniti always adds a low accuracy record by default and then attempts a second high accuracy reading where the Infiniti application is hosted on a secure server and the user has agreed to do so, usually by answering yes to a security question like the one below.

461

Regardless of the low or high accuracy reading Infiniti can attempt to convert the IP address into a more reportable regional field such as Country, City, Region, etc. Infiniti must request regional information from an external service. By default, Infiniti makes requests to http://freegeoip.net.

📘

http://freegeoip.net has been recently deprecated and you will need to change the location service URL as per below to another service.

Free services generally have a small daily limit (eg: 1000 requests) if you wish to use the location log for a large number of calls you will need to sign up to one the services for a paid account.

It is possible for server administrators to disable or set a different location service URL by adding LocationApiURL setting in Produce's appsettings.json file. The following location services are supported and examples are provided below.

ServiceAppSetting ValueNotes
https://ipapi.cohttp://ipapi.co//jsonIs available over SSL.
https://ipinfo.iohttps://ipapi.io//jsonIs available over SSL.
https://api.ipinfoab.comhttp://api.ipinfoab.com/v3/ip-city/?key={{keyGoesHere}}&ip=&format=jsonRequires the registration to get a key. Is available over SSL
https://ipstack.comhttp://api.ipstack.com/?access_key={{keyGoesHere}}&output=jsonRequires the registration to get a key. Is available over SSL for paid accounts
http://ip-api.comhttp://ip-api.com/json/
"AppSettings": {
    "LocationApiURL": "http://ipapi.io/<ipaddress>/json",
    "Theme": "Cerulean"
  },
  "ConnectionStrings": {
    "DefaultConnection": "Password=infiniti;Persist Security Info=True;User ID=infiniti;Initial Catalog=InfinitiDev;Data Source=server1234"
  },
  ...

🚧

External Location Requests

Where it is not appropriate to make a call to the a location service the feature can be disabled by adding the following global option to the Infiniti database.

INSERT INTO [Global_Options]
([BusinessUnitGuid]
,[OptionCode]
,[OptionDescription]
,[OptionValue])
VALUES
('00000000-0000-0000-0000-000000000000'
,'STORE_LOCATION'
,'Make external calls to extract region information (Country,City,Etc) for device log'
,'false')
GO

The device log captures the specific fields below

FieldNotes
BrowserUser's Browser e.g.: Chrome, Edge, Android, Chrome Mobile, IE, Firefox etc
BrowserVersionMajor and BrowserVersionMinorBrowser Version eg: for Edge 15.15063 the major version is 15 and 15063 is the minor.
Country and Country CodeRetrieved Country Full name and two digit code
DeviceUsers Device eg: Apple, Samsung etc.
IPAddressThe external facing IP address of the client device that the user is logged in at.
LanguagesList of languages available in the user's current browser
Longitude and LatitudeUser's Longitude and Latitude
LocationAccuracyLow accuracy reflects a location sourced only from an IP address. High accuracy uses device GPS if available or other network location information. A user must agree on their device for high accuracy information to be recorded.
LoginTimeUtcThe time the current login session was created in Coordinated Universal Time (UTC).
MetroCodeThe code for the local metro area the user is located in, if available (usually only for USA)
ModelThe model of the device the user is logged in at e.g: iPad
OSOS The operating system for the device
OSVersionMajor and OSVersionMinorThe version of the OS of the user's device e.g. for Android 7.1 major is 7 and minor is 1.
PlatformThe platform of the device the user is logged in to e.g. WinNT
PostalCodePostal/zip code of the location of the user
Region and RegionCodeThe region, state, county or province the user is located.
TimeZoneThe timezone the user is located in if available
UserGuidUser identifier
UsernameUsers login username

📘

Raw Device Log Data

To access the raw device log data the following query can be run against the Infiniti Database.

SELECT TOP (1000) [IPAddress]
,[OS]
,[OSVersionMajor]
,[OSVersionMinor]
,[City]
,[Country]
,[CountryCode]
,[Region]
,[RegionCode]
,[PostalCode]
,[TimeZone]
,[Browser]
,[BrowserVersionMajor]
,[BrowserVersionMinor]
,[Device]
,[Model]
,[Platform]
,[Latitude]
,[Longitude]
,[Languages]
,[UserGuid]
,[LoginTimeUtc]
,[LocationAccuracy]
FROM [Analytics_DeviceLog]