class
JGoogleEmbedAnalytics extends JGoogleEmbed
Google Analytics embed class for the Joomla Platform.
Methods
__construct(
Registry $options = null,
JUri $uri = null)
Constructor.
string
isSecure()
Method to retrieve the javascript header for the embed API
string
getHeader()
Get code to load Google Analytics javascript
string
getBody()
Google Analytics only needs to be included in the header
null
echoHeader()
Method to output the javascript header for the embed API
null
echoBody()
Method to output the body for the API
mixed
getOption(
string $key)
Get an option from the JGoogleEmbed instance.
setOption(
string $key,
mixed $value)
Set an option for the JGoogleEmbed instance.
string
getCode()
Method to get the tracking code
setCode(
string $code)
Method to set the tracking code
boolean
isAsync()
Checks if the javascript is set to be asynchronous
useAsync()
Load javascript asynchronously
useSync()
Load javascript synchronously
array
addCall(
string $method,
array $params = array())
Add an analytics call
array
listCalls()
List the analytics calls to be executed
array
deleteCall(
int $index = null)
Delete a call from the stack
string
createCall(
string $method,
array $params = array())
Create a javascript function from the call parameters
array
addCustomVar(
int $slot,
string $name,
string $value,
int $scope = 3)
Add a custom variable to the analytics
string
createCustomVar(
int $slot,
string $name,
string $value,
int $scope = 3)
Get the code to create a custom analytics variable
array
addEvent(
string $category,
string $action,
string $label = null,
string $value = null,
boolean $noninteract = false)
Track an analytics event
string
createEvent(
string $category,
string $action,
string $label = null,
string $value = null,
boolean $noninteract = false)
Get the code to track an analytics event
Details
__construct(
Registry $options = null,
JUri $uri = null)
string
isSecure()
Method to retrieve the javascript header for the embed API
Get code to load Google Analytics javascript
string
getBody()
Google Analytics only needs to be included in the header
Method to output the javascript header for the embed API
null
echoBody()
Method to output the body for the API
mixed
getOption(
string $key)
Get an option from the JGoogleEmbed instance.
JGoogleEmbed
setOption(
string $key,
mixed $value)
Set an option for the JGoogleEmbed instance.
string
getCode()
Method to get the tracking code
Method to set the tracking code
boolean
isAsync()
Checks if the javascript is set to be asynchronous
Load javascript asynchronously
Load javascript synchronously
array
addCall(
string $method,
array $params = array())
array
listCalls()
List the analytics calls to be executed
array
deleteCall(
int $index = null)
Delete a call from the stack
string
createCall(
string $method,
array $params = array())
Create a javascript function from the call parameters
array
addCustomVar(
int $slot,
string $name,
string $value,
int $scope = 3)
Add a custom variable to the analytics
string
createCustomVar(
int $slot,
string $name,
string $value,
int $scope = 3)
Get the code to create a custom analytics variable
array
addEvent(
string $category,
string $action,
string $label = null,
string $value = null,
boolean $noninteract = false)
string
createEvent(
string $category,
string $action,
string $label = null,
string $value = null,
boolean $noninteract = false)
Get the code to track an analytics event