Class JGoogleEmbedAnalytics

Description

Google Analytics embed class for the Joomla Platform.

  • since: 12.3

Located in /libraries/joomla/google/embed/analytics.php (line 19)

JGoogleEmbed
   |
   --JGoogleEmbedAnalytics
Method Summary
 array addCall (string $method, [array $params = array()])
 array addCustomVar (int $slot, string $name, string $value, [int $scope = 3])
 array addEvent (string $category, string $action, [string $label = null], [string $value = null], [boolean $noninteract = false])
 string createCall (string $method, [array $params = array()])
 string createCustomVar (int $slot, string $name, string $value, [int $scope = 3])
 string createEvent (string $category, string $action, [string $label = null], [string $value = null], [boolean $noninteract = false])
 array deleteCall ([int $index = null])
 null getBody ()
 string getCode ()
 string getHeader ()
 boolean isAsync ()
 array listCalls ()
 JGoogleEmbedAnalytics setCode (string $code)
Variables

Inherited Variables

Inherited from JGoogleEmbed

JGoogleEmbed::$options
JGoogleEmbed::$uri
Methods
addCall (line 99)

Add an analytics call

  • return: The added call
  • since: 12.3
  • access: public
array addCall (string $method, [array $params = array()])
  • string $method: The name of the function
  • array $params: The parameters for the call
addCustomVar (line 190)

Add a custom variable to the analytics

  • return: The added call
  • since: 12.3
  • access: public
array addCustomVar (int $slot, string $name, string $value, [int $scope = 3])
  • int $slot: The slot to store the variable in (1-5)
  • string $name: The variable name
  • string $value: The variable value
  • int $scope: The scope of the variable (1: visitor level, 2: session level, 3: page level)
addEvent (line 225)

Track an analytics event

  • return: The added call
  • since: 12.3
  • access: public
array addEvent (string $category, string $action, [string $label = null], [string $value = null], [boolean $noninteract = false])
  • string $category: The general event category
  • string $action: The event action
  • string $label: The event description
  • string $value: The value of the event
  • boolean $noninteract: Don't allow this event to impact bounce statistics
createCall (line 158)

Create a javascript function from the call parameters

  • return: The created call
  • since: 12.3
  • access: public
string createCall (string $method, [array $params = array()])
  • string $method: The name of the function
  • array $params: The parameters for the call
createCustomVar (line 207)

Get the code to create a custom analytics variable

  • return: The created call
  • since: 12.3
  • access: public
string createCustomVar (int $slot, string $name, string $value, [int $scope = 3])
  • int $slot: The slot to store the variable in (1-5)
  • string $name: The variable name
  • string $value: The variable value
  • int $scope: The scope of the variable (1: visitor level, 2: session level, 3: page level)
createEvent (line 243)

Get the code to track an analytics event

  • return: The created call
  • since: 12.3
  • access: public
string createEvent (string $category, string $action, [string $label = null], [string $value = null], [boolean $noninteract = false])
  • string $category: The general event category
  • string $action: The event action
  • string $label: The event description
  • string $value: The value of the event
  • boolean $noninteract: Don't allow this event to impact bounce statistics
deleteCall (line 131)

Delete a call from the stack

  • return: The deleted call
  • since: 12.3
  • access: public
array deleteCall ([int $index = null])
  • int $index: Index of call to delete (defaults to last added call)
getBody (line 292)

Google Analytics only needs to be included in the header

  • since: 12.3
  • access: public
null getBody ()

Redefinition of:
JGoogleEmbed::getBody()
Method to retrieve the body for the API
getCode (line 28)

Method to get the tracking code

  • return: The Google Analytics tracking code
  • since: 12.3
  • access: public
string getCode ()
getHeader (line 255)

Get code to load Google Analytics javascript

  • return: Javascript code
  • since: 12.3
  • access: public
string getHeader ()

Redefinition of:
JGoogleEmbed::getHeader()
Method to retrieve the header for the API
isAsync (line 56)

Checks if the javascript is set to be asynchronous

  • return: True if asynchronous
  • since: 12.3
  • access: public
boolean isAsync ()
listCalls (line 117)

List the analytics calls to be executed

  • return: A list of calls
  • since: 12.3
  • access: public
array listCalls ()
setCode (line 42)

Method to set the tracking code

  • return: The object for method chaining
  • since: 12.3
  • access: public
JGoogleEmbedAnalytics setCode (string $code)
  • string $code: The Google Analytics tracking code
useAsync (line 68)

Load javascript asynchronously

  • return: The object for method chaining
  • since: 12.3
  • access: public
JGoogleEmbedAnalytics useAsync ()
useSync (line 82)

Load javascript synchronously

  • return: The object for method chaining
  • since: 12.3
  • access: public

Inherited Methods

Inherited From JGoogleEmbed

 JGoogleEmbed::__construct()
 JGoogleEmbed::echoBody()
 JGoogleEmbed::echoHeader()
 JGoogleEmbed::getBody()
 JGoogleEmbed::getHeader()
 JGoogleEmbed::getOption()
 JGoogleEmbed::isSecure()
 JGoogleEmbed::setOption()

Documentation generated on Tue, 19 Nov 2013 14:53:41 +0100 by phpDocumentor 1.4.3