\SSGoogleAnalytics
Synopsis
class SSGoogleAnalytics
{
- // members
- private static $trackingCode;
- private static $domain;
- private static $loggingCallback;
- private Tracker $gaTracker;
- private Session $gaSession;
- private Visitor $gaVisitor;
- // methods
- public void __construct()
- public static void setTrackingCode()
- public static string getTrackingCode()
- public static void setDomain()
- public static string getDomain()
- public static void setLoggingCallback()
- public static string getLoggingCallback()
- public Tracker getGATracker()
- public void setGATracker()
- public Visitor getGAVisitor()
- public void setGAVisitor()
- public Session getGASession()
- public void setGASession()
- public null trackPageview()
- public null trackEvent()
- public null trackTransaction()
Members
private
- $domain
—
string
The domain to use - $gaSession
—
GoogleAnalytics\Session
An instance of GoogleAnalytics\Session - $gaTracker
—
GoogleAnalytics\Tracker
An instance of GoogleAnalytics\Tracker - $gaVisitor
—
GoogleAnalytics\Visitor
An instance of GoogleAnalytics\Visitor - $loggingCallback
—
string
The logging callback to use - $trackingCode
—
string
The tracking code to use
Methods
public
- __construct() — Creates the object using the statically configured tracking code and domain
- getDomain() — Gets the domain in use
- getGASession() — Get a GA Session, if one doesn't exist in on the object or in the session, then build a new one from the utmb cookie
- getGATracker() — Get a GA tracker instance setting one with defaults if one doesn't exist
- getGAVisitor() — Get a GA visitor, if one doesn't exist build one and set it from the utma cookie
- getLoggingCallback() — Gets the logging callback
- getTrackingCode() — Gets the tracking code in use
- setDomain() — Set the domain to use
- setGASession() — Set a GA Session to the object and the silverstripe php session
- setGATracker() — Set a GA tracker
- setGAVisitor() — Set a GA Visitor
- setLoggingCallback() — Sets logging callback to use
- setTrackingCode() — Set the tracking code to use
- trackEvent() — Track an event using the Visitor and Session from this object
- trackPageview() — Track a page view using the Visitor and Session from this object
- trackTransaction() — Track a transaction using the Visitor and Session from this object