JGoogleEmbedAnalytics
Extends \JGoogleEmbedGoogle Analytics embed class for the Joomla Platform.
since |
3.1.4 |
---|---|
deprecated |
4.0 Use the |
package |
Joomla.Platform |
Methods
__construct
Constructor.
__construct(\Joomla\Registry\Registry $options = null, \JUri $uri = null)
since |
3.1.4 |
---|
Arguments
- $options
\Joomla\Registry\Registry
Google options object- $uri
\JUri
URL of the page being rendered
addCall
Add an analytics call
addCall(string $method, array $params = array()) : array
since |
3.1.4 |
---|
Arguments
- $method
string
The name of the function- $params
array
The parameters for the call
Response
array
The added call
addCustomVar
Add a custom variable to the analytics
addCustomVar(integer $slot, string $name, string $value, integer $scope = 3) : array
since |
3.1.4 |
---|
Arguments
- $slot
integer
The slot to store the variable in (1-5)- $name
string
The variable name- $value
string
The variable value- $scope
integer
The scope of the variable (1: visitor level, 2: session level, 3: page level)
Response
array
The added call
addEvent
Track an analytics event
addEvent(string $category, string $action, string $label = null, string $value = null, boolean $noninteract = false) : array
since |
3.1.4 |
---|
Arguments
- $category
string
The general event category- $action
string
The event action- $label
string
The event description- $value
string
The value of the event- $noninteract
boolean
Don't allow this event to impact bounce statistics
Response
array
The added call
createCall
Create a javascript function from the call parameters
createCall(string $method, array $params = array()) : string
since |
3.1.4 |
---|
Arguments
- $method
string
The name of the function- $params
array
The parameters for the call
Response
string
The created call
createCustomVar
Get the code to create a custom analytics variable
createCustomVar(integer $slot, string $name, string $value, integer $scope = 3) : string
since |
3.1.4 |
---|
Arguments
- $slot
integer
The slot to store the variable in (1-5)- $name
string
The variable name- $value
string
The variable value- $scope
integer
The scope of the variable (1: visitor level, 2: session level, 3: page level)
Response
string
The created call
createEvent
Get the code to track an analytics event
createEvent(string $category, string $action, string $label = null, string $value = null, boolean $noninteract = false) : string
since |
3.1.4 |
---|
Arguments
- $category
string
The general event category- $action
string
The event action- $label
string
The event description- $value
string
The value of the event- $noninteract
boolean
Don't allow this event to impact bounce statistics
Response
string
The created call
deleteCall
Delete a call from the stack
deleteCall(integer $index = null) : array
since |
3.1.4 |
---|
Arguments
- $index
integer
Index of call to delete (defaults to last added call)
Response
array
The deleted call
echoBody
Method to output the body for the API
echoBody() : null
since |
3.1.4 |
---|
Response
null
echoHeader
Method to output the javascript header for the embed API
echoHeader() : null
since |
3.1.4 |
---|
Response
null
getBody
Method to retrieve the body for the API
getBody() : string
since |
3.1.4 |
---|
Response
string
The body
getCode
Method to get the tracking code
getCode() : string
since |
3.1.4 |
---|
Response
string
The Google Analytics tracking code
getHeader
Method to retrieve the header for the API
getHeader() : string
since |
3.1.4 |
---|
Response
string
The header
getOption
Get an option from the JGoogleEmbed instance.
getOption(string $key) : mixed
since |
3.1.4 |
---|
Arguments
- $key
string
The name of the option to get.
Response
mixed
The option value.
isAsync
Checks if the javascript is set to be asynchronous
isAsync() : boolean
since |
3.1.4 |
---|
Response
boolean
True if asynchronous
isSecure
Method to retrieve the javascript header for the embed API
isSecure() : string
since |
3.1.4 |
---|
Response
string
The header
listCalls
List the analytics calls to be executed
listCalls() : array
since |
3.1.4 |
---|
Response
array
A list of calls
setCode
Method to set the tracking code
setCode(string $code) : \JGoogleEmbedAnalytics
since |
3.1.4 |
---|
Arguments
- $code
string
The Google Analytics tracking code
Response
\JGoogleEmbedAnalytics
The object for method chaining
setOption
Set an option for the JGoogleEmbed instance.
setOption(string $key, mixed $value) : \JGoogleEmbed
since |
3.1.4 |
---|
Arguments
- $key
string
The name of the option to set.- $value
mixed
The option value to set.
Response
\JGoogleEmbed
This object for method chaining.
useAsync
Load javascript asynchronously
useAsync() : \JGoogleEmbedAnalytics
useSync
Load javascript synchronously
useSync() : \JGoogleEmbedAnalytics
Properties
uri
URI of the page being rendered.
since |
3.1.4 |
---|
Type(s)
\JUri