wMobile Performance Logging: SQL Queries

by Fred Block on May 27, 2013

Many customers are asking if wMobile provides user usage information for those users logging in and out of wMobile. The short answer is "Yes" and "No". The "No" reply comes because there is currently no built-in user interface to provide this data. The "Yes" reply comes because there is a "performance log" table that wMobile uses to track usage information and access to this data is always available using SQL queries. To run your queries, you can use Microsoft SQL Server Management Studio, GoldMine using the SQL Query tab of the Filters and Groups tool, or any other method as long as it provides access to the SQL Server database used by GoldMine/wMobile and you have security rights to read the database.

To get started you will need to be sure that performance logging is enabled (by default, it is not). Here are the steps:

1) Start Manager Console: Start > W-Systems > wMobile Phone Edition > wMobile Manager Console.
2) In Manager Console's main menu, click: Tools > System Settings.
3) In the System Settings tree list, navigate to Configuration > Common > PerfLog.
4) Click on the PerfLog node to display the properties in the Properties pane on the right.
5) Click on the PerfLogEnabled property and set the value to True.
6) Click OK.

NOTE: Most likely wMobile will need to restart components and you will be prompted to allow this. In the Restart Components dialog presented, click OK to initiate the restarting procedures. When the processing completes, the dialog will close.

Access to Performance Logs Using SQL Queries

We are providing two SQL queries for your use. As you see fit you may adjust these queries as needed but we highly recommend using SELECT queries only and that you do not directly manipulate the data in the WT_PerfLog table.

Query #1 Overview:

This query provides a row for each time a user clicks a hyperlink, button, etc. within wMobile. The results display the UserId (you provide for this query), AppItem (the item accessed), AppName (the wMobile edition you specify), and LogTime (the time the AppItem was accessed). This provides you with a look at the "items" in wMobile the user navigated to and from. If the query remains "as-is" which is sorted by LogTime, you will see the order in which these items were accessed.

Query #1 SQL:

Example query:
SELECT  UserId, AppItem , AppName, LogTime FROM WT_PerfLog
WHERE UserId = 'DCIOBANU' AND AppName = 'wMobilePhone'
AND  LogTime >= '2013-04-29' AND  LogTime < '2013-04-30'
ORDER BY LogTime

The example query items shown in 'RED' are the variables you will need to change to fit your needs. In order, they are as follows:
'USERNAME' = The GoldMine username used to log into wMobile.
'wMobilePhone' = The wMobile edition; either 'wMobilePhone' or 'wMobileDesktop'.
'2013-04-29'= The start date of the logs to view.
'2013-04-30'= The start date plus 1 of the logs to view. NOTE: This date must be one day "after" the actual date you want included (i.e. start date). In this example, 04-29 and 04-30 will return only dates from 4-29; likewise, 5-6 and 5-7 will return only dates from 5-6.

Query #2 Overview:

This query provides a row for each user and each wMobile edition used. Further, it provides the number of hyperlinks, buttons, etc. that were clicked within wMobile. Lastly, these results are based on a "date range" and the FirstClickTime and LastClickTime are the first and last clicks within the date range. The results display the UserId (you provide for this query), AppName (the wMobile edition you specify), Clicks (number of clicks), FirstClickTime (the time of the first click within the date range), and LastClickTime (the time of the last click within the date range). This provides you with a look at the "number of clicks" (actually hyperlinks, button clicks, etc.) in wMobile. If the query remains "as-is", it is sorted by UserId first and then by AppName.

Query #2 SQL:

Example query:
SELECT UserId, AppName, COUNT(AppItem) AS Clicks,
MIN(LogTime) AS FirstClickTime, MAX(LogTime) AS LastClickTime
FROM WT_PerfLog
WHERE LogTime >= '2013-01-01' AND  LogTime < '2013-05-01'
GROUP BY UserId, AppName
ORDER BY UserId, AppName

The example query items shown in 'RED' are the variables you will need to change to fit your needs. In order, they are as follows:
'2013-01-01'= The start date of the logs to view.
'2013-05-01'= The start date plus 1 of the logs to view. NOTE: This date must be one day "after" the actual date you want included (i.e. start date). In this example, 01-01-2013
and 05-01-2013 will return only dates starting with: 01-01-2013 and ending with: 04-30-2013.

Find similar articles in these categories:

PRODUCT: wMobile

AUDIENCE: Administrators

Fred Block
Application Specialist at W-Systems
More From This Author »