\Tracker
Tracker class
This may be used by external scripts, so should not directly contain framework references.
Synopsis
class Tracker
{
- // members
- public static array $tracking_stores = ;
- public static array $finders = ;
- public static array $store_instances = ;
- public static $identity_cache = NULL;
- // methods
- public static void clear_stores()
- public static void add_store()
- public static void clear_finders()
- public static void add_finder()
- public static void init()
- public static void find_identities()
- public static void track()
- public static void query()
- public static void get_store_inst()
- public static void get_properties()
- public static void trackingJS()
- public static void get_metadata()
Tasks
Line | Task |
---|---|
282 | implement: generate a property bag and encode it, put in tracker URL |
283 | implement: need to know the URL of the controller that processes the tracking request. Is this |
284 | implement: just a script? |
Members
public
- $finders
—
array
A map of finders, which are applied in sequence in order to identify the user. - $identity_cache
—
null
Store the TrackingIdentity we find in here. - $store_instances
—
array
A map from store names to instances of the store, which are created on demand. - $tracking_stores
—
array
A map of store names to TrackingStoreDef objects.
Methods
public
- add_finder()
- add_store() — Add a tracking store.
- clear_finders()
- clear_stores()
- find_identities() — Return a map of type => ID from the identity finders. Each finder is given the opportunity to tell us what it thinks is the identity of
- get_metadata() — Get all properties that are known by the tracker. This iterates over the registered trackers, and asks eash in turn for matching metadata properties, and merges the result.
- get_properties() — Retrieve a set of properties from tracking stores. If a store is named, then properties are only retrieved from that store. If not, the stores are attempted in order.
- get_store_inst() — Get the instance of the named tracking store. This is created and initialised on demand.
- init() — Call this method in mysite/_config.php before setting any Tracker config. Calling without parameters will set up the tracker with a default tracking store for simplest use.
- query()
- track() — Track some properties. This adds the properties to a store.
- trackingJS() — Require tracking js. The JS needs to work in statically cached environment,