stats

stats

stats

Functions for site and object statistics reports

Metadata

deploy()

Deploy table structure for stats subsystem.

Arguments

Name Type Required Default Options Description
bDropTable boolean No false
dsn String Yes
dbtype String Yes
dbowner String Yes

fPurgeStatistics()

deletes records older than a certain date

Arguments

Name Type Required Default Options Description
purgeDate date Yes
dsn string No [runtime expression]

getActiveVisitors()

Returns a query of current sessions

Arguments

Name Type Required Default Options Description
dsn string No [runtime expression]
order string Yes sessionTime Field to order by
orderDirection string Yes asc Order by ascending or descending

getBranchStatsByDate()

Returns log results for a branch inbetween two specified dates

Arguments

Name Type Required Default Options Description
navId uuid No
dsn string No [runtime expression]
before date No
after date No

getBranchStatsByDay()

Returns log results for a branch on a particular day

Arguments

Name Type Required Default Options Description
navId string No
day date Yes
showAll boolean No false
dsn string No [runtime expression]

getBranchStatsByWeek()

Returns log results for a branch over a period of weeks

Arguments

Name Type Required Default Options Description
navId string No
day date Yes
showAll boolean No false
dsn string No [runtime expression]

getBrowser()

Arguments

Name Type Required Default Options Description
user_agent String No [runtime expression]

getBrowsers()

Returns log results for browsers used

Arguments

Name Type Required Default Options Description
dsn string No [runtime expression]
dateRange string Yes all
maxRows string Yes 20 Maximum number of results returned

getDownloadStats()

Returns log results for all downloaded objects

Arguments

Name Type Required Default Options Description
dsn string No [runtime expression]

getGoogleStats()

Returns log results for google referals

Arguments

Name Type Required Default Options Description
dsn string No [runtime expression]
maxRows string Yes 20 Maximum number of results returned
dateRange string Yes all

getLocales()

Returns log results for locales

Arguments

Name Type Required Default Options Description
dsn string No [runtime expression]
maxRows string Yes 20 Maximum number of results returned
dateRange string Yes all

getMostViewed()

Returns log results for most viewed objects

Arguments

Name Type Required Default Options Description
dsn string No [runtime expression]
typeName string No Filter by typeName
maxRows string Yes 20 Maximum number of results returned
dateRange string Yes all
dbowner string No [runtime expression]

getOS()

Returns log results for operating systems

Arguments

Name Type Required Default Options Description
dsn string No [runtime expression]
maxRows string Yes 20 Maximum number of results returned
dateRange string Yes all

getOwnedBy()

Returns a break down of content tyoe owned by each user

Arguments

Name Type Required Default Options Description
None

getPageStats()

Returns full log results

Arguments

Name Type Required Default Options Description
dsn string No [runtime expression]
before date No
after date No

getPageStatsByDate()

Returns log results for a particular page inbetween two specified dates

Arguments

Name Type Required Default Options Description
pageId uuid No
dsn string No [runtime expression]
before date No
after date No

getPageStatsByDay()

Returns log results for a particular page on a particular day

Arguments

Name Type Required Default Options Description
pageId string No
day date Yes
showAll boolean No false
dsn string No [runtime expression]
dbowner string No [runtime expression]

getPageStatsByWeek()

Returns log results for a particular page over a period of weeks

Arguments

Name Type Required Default Options Description
pageId string No
day date Yes
showAll boolean No false
dsn string No [runtime expression]
dbowner string No [runtime expression]

getReferers()

Returns log results for referers

Arguments

Name Type Required Default Options Description
dsn string No [runtime expression]
maxRows string Yes 20 Maximum number of results returned
dateRange string Yes all
filter string No all

getSearchStats()

Returns full log results for site searches

Arguments

Name Type Required Default Options Description
dsn string No [runtime expression]
dateRange string Yes all

getSearchStatsMostPopular()

Returns results for the most popular site searches

Arguments

Name Type Required Default Options Description
dsn string No [runtime expression]
dateRange string Yes all

getSearchStatsNoResults()

Returns results for site searches that return no results

Arguments

Name Type Required Default Options Description
dsn string No [runtime expression]
dateRange string Yes all

getSessions()

Returns the number of sessions in a given time frame

Arguments

Name Type Required Default Options Description
dsn string No [runtime expression]
dateRange string Yes all

getUserOS()

Arguments

Name Type Required Default Options Description
user_agent String No [runtime expression]

getVisitorPath()

Returns log results for pages viewed by visitor in a session

Arguments

Name Type Required Default Options Description
dsn string No [runtime expression]
sessionId string Yes ID of visitor session

getVisitors()

Returns log results for visitors

Arguments

Name Type Required Default Options Description
dsn string No [runtime expression]
maxRows string Yes 20 Maximum number of results returned
dateRange string Yes all
remoteIP string No filter by IP Address

getVisitorStatsByDate()

Returns log results for a particular page inbetween two specified dates

Arguments

Name Type Required Default Options Description
dsn string No [runtime expression]
before date No
after date No

getVisitorStatsByDay()

Returns log results for a particular page on a particular day

Arguments

Name Type Required Default Options Description
day date Yes
showAll boolean No false
dsn string No [runtime expression]

getVisitorStatsByWeek()

Returns log results for a particular page over a period of weeks

Arguments

Name Type Required Default Options Description
day date Yes
showAll boolean No false
dsn string No [runtime expression]

logEntry()

Add entry to stats log for page

Arguments

Name Type Required Default Options Description
pageId uuid Yes
navId uuid Yes
remoteIP string Yes
userId string Yes
dsn string No [runtime expression]
sessionId string Yes sessionId for visitor
browser string Yes browser used by visitor
referer string No [runtime expression] The referer that pointed the user to this page
locale string No unknown The locale of user
os string No unknown The operating system of user

logSearch()

Add entry to stats log for search queries

Arguments

Name Type Required Default Options Description
dsn string No [runtime expression]
searchString string Yes Search string inputted by user
results numeric Yes Number of results returned by search
lCollections string Yes List of collections search against
referer string Yes [runtime expression] The referer that pointed the user to this page
remoteIP string Yes [runtime expression] Remote address of user performing search