logAdClick (line
97)
A function to log an ad click.
In order for the browser and operating system information to be correctly logged, PHP must be set up correctly to utilise an up to date browscap.ini file: see http://www.php.net/manual/en/ref.misc.php#ini.browscap.
void
logAdClick
(integer $viewerId, integer $adId, integer $creativeId, integer $zoneId)
-
integer
$viewerId: The viewer ID (was userid).
-
integer
$adId: The advertisement ID (was bannerid).
-
integer
$creativeId: The creative ID (doesn't exist yet, use null).
-
integer
$zoneId: The zone ID.
logAdImpression (line
74)
A function to log an ad impression.
In order for the browser and operating system information to be correctly logged, PHP must be set up correctly to utilise an up to date browscap.ini file: see http://www.php.net/manual/en/ref.misc.php#ini.browscap.
void
logAdImpression
(integer $viewerId, integer $adId, integer $creativeId, integer $zoneId)
-
integer
$viewerId: The viewer ID (was userid).
-
integer
$adId: The advertisement ID (was bannerid).
-
integer
$creativeId: The creative ID (doesn't exist yet, use null).
-
integer
$zoneId: The zone ID.
logAdRequest (line
51)
A function to log an ad requests.
In order for the browser and operating system information to be correctly logged, PHP must be set up correctly to utilise an up to date browscap.ini file: see http://www.php.net/manual/en/ref.misc.php#ini.browscap.
void
logAdRequest
(integer $viewerId, integer $adId, integer $creativeId, integer $zoneId)
-
integer
$viewerId: The viewer ID (was userid).
-
integer
$adId: The advertisement ID (was bannerid).
-
integer
$creativeId: The creative ID (doesn't exist yet, use null).
-
integer
$zoneId: The zone ID.
logBenchmark (line
317)
A function to log benchmarking data to a file.
A file called "debug.log" is created in the cache directory to store this information.
void
logBenchmark
(string $page, string $queryString, double $benchmark, [string $extra = ''])
-
string
$page: The name of the script being benchmarked.
-
string
$queryString: The query string parameters passed to the page.
-
double
$benchmark: The elapsed time of the benchmark.
-
string
$extra: Any extra information to be logged.
logTrackerClick (line
249)
A function to log a tracker click.
In order for the browser and operating system information to be correctly logged, PHP must be set up correctly to utilise an up to date browscap.ini file: see http://www.php.net/manual/en/ref.misc.php#ini.browscap.
void
logTrackerClick
(integer $viewerId, integer $trackerId)
-
integer
$viewerId: The viewer ID (was userid).
-
integer
$trackerId: The tracker ID.
logTrackerImpression (line
125)
A function to log a tracker impression.
In order for the browser and operating system information to be correctly logged, PHP must be set up correctly to utilise an up to date browscap.ini file: see http://www.php.net/manual/en/ref.misc.php#ini.browscap.
Note that the $phpAds_config['rawDbhost'] variable will only be defined in the event that Max is configured for multiple databases. Normally, this will not be the case, so the server_ip field will be blank.
mixed
logTrackerImpression
(integer $viewerId, integer $trackerId)
-
integer
$viewerId: The viewer ID (was userid).
-
integer
$trackerId: The tracker ID.
logVariableValues (line
202)
A function to log a tracker impression variable values.
Note that the $phpAds_config['rawDbhost'] variable will only be defined in the event that Max is configured for multiple databases. Normally, this will not be the case, so the server_ip field will be blank.
void
logVariableValues
(integer $trackerId, integer $serverRawTrackerImpressionId, string $serverRawIp)
-
integer
$trackerId: The tracker ID.
-
integer
$serverRawTrackerImpressionId: The unique tracker impression id on the raw database server.
-
string
$serverRawIp: The IP address of the raw database server, or null if Max is not running in multiple database server mode.
_insert (line
438)
A function to insert ad requests, ad impressions, ad clicks and tracker clicks into the raw tables. Does NOT work with tracker impressions.
void
_insert
(string &$table, integer &$viewerId, integer &$adId, integer &$creativeId, integer &$zoneId, string &$country, array &$zoneInfo, array &$userAgentInfo, integer &$maxHttps)
-
string
$table: A reference to the raw table name to insert into.
-
integer
$viewerId: A reference to the viewer ID.
-
integer
$adId: A reference to the advertisement ID.
-
integer
$creativeId: A reference to the creative ID.
-
integer
$zoneId: A reference to the zone ID.
-
string
$country: A reference to a variable to hold the viewer's country code.
-
array
$zoneInfo: A reference to an array to store information about the URL the viewer used to access the page containing the zone.
-
array
$userAgentInfo: A reference to an array to store information about the viewer's web browser and operating system.
-
integer
$maxHttps: A reference to an integer to store if the call to Max was performed using HTTPS or not.
_prepareLogInfo (line
377)
A function to get various information that needs to be logged.
void
_prepareLogInfo
(string &$country, array &$zoneInfo, array &$userAgentInfo, integer &$maxHttps)
-
string
$country: A reference to a variable to hold the viewer's country code.
-
array
$zoneInfo: A reference to an array to store information about the URL the viewer used to access the page containing the zone.
-
array
$userAgentInfo: A reference to an array to store information about the viewer's web browser and operating system.
-
integer
$maxHttps: A reference to an integer to store if the call to Max was performed using HTTPS or not.
_viewersHostOkayToLog (line
334)
A function to check if the information to be logged should be logged or ignored, on the basis of the viewer's IP address or hostname.
boolean
_viewersHostOkayToLog
()