SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class SessionStats

Variables

NameVisibilityDescription
$do_tracking (static)
Should tracking be done? Determined at request start time
$untracked (static)
Prefixes of URLs to ignore

Functions

NameVisibilityDescription
autoDetectSourceMediumprivate (static)Auto-generate UTM params based on the initial request referrer
initpublic (static)Check whether this content should be tracked, and enable tracking in this case
numPageviewspublic (static)Return the number of page views for a given url
referrerpublic (static)The initial HTTP referrer when the session was first started
timeOnSitepublic (static)How long the user has been on the site
timeStartpublic (static)Time the session started
totalPageviewspublic (static)Return the total number of page views
trackPageViewpublic (static)Track a page view in the session
trackSessionprotected (static)Session level tracking - utm tags, referrer, etc
uniquePageviewspublic (static)Return the total number of unique page views
utmCampaignpublic (static)Value of the 'utm_campaign' query string parameter
utmContentpublic (static)Value of the 'utm_content' query string parameter
utmMediumpublic (static)Value of the 'utm_medium' query string parameter
utmSourcepublic (static)Value of the 'utm_source' query string parameter
utmTermpublic (static)Value of the 'utm_term' query string parameter

private autoDetectSourceMedium

array SessionStats::autoDetectSourceMedium ( string $referrer );

Auto-generate UTM params based on the initial request referrer

public init

unknown SessionStats::init ( );

Check whether this content should be tracked, and enable tracking in this case

public numPageviews

int SessionStats::numPageviews ( int $url );

Return the number of page views for a given url

public referrer

string SessionStats::referrer ( );

The initial HTTP referrer when the session was first started

public timeOnSite

DateInterval SessionStats::timeOnSite ( );

How long the user has been on the site

public timeStart

DateTime SessionStats::timeStart ( );

Time the session started

public totalPageviews

int SessionStats::totalPageviews ( );

Return the total number of page views

public trackPageView

void SessionStats::trackPageView ( );

Track a page view in the session

protected trackSession

void SessionStats::trackSession ( );

Session level tracking - utm tags, referrer, etc

public uniquePageviews

int SessionStats::uniquePageviews ( );

Return the total number of unique page views

public utmCampaign

string SessionStats::utmCampaign ( );

Value of the 'utm_campaign' query string parameter
from the most recent request which contained this parameter

public utmContent

string SessionStats::utmContent ( );

Value of the 'utm_content' query string parameter
from the most recent request which contained this parameter

public utmMedium

string SessionStats::utmMedium ( );

Value of the 'utm_medium' query string parameter
from the most recent request which contained this parameter

public utmSource

string SessionStats::utmSource ( );

Value of the 'utm_source' query string parameter
from the most recent request which contained this parameter

public utmTerm

string SessionStats::utmTerm ( );

Value of the 'utm_term' query string parameter
from the most recent request which contained this parameter