JGoogleEmbedAnalytics

Extends \JGoogleEmbed

Google Analytics embed class for the Joomla Platform.

deprecated
since

3.1.4

deprecated

4.0 Use the joomla/google package via Composer instead

package

Joomla.Platform

Methods

__construct

Constructor.

__construct(\Joomla\Registry\Registry $options = null, \JUri $uri = null) 
inherited
since

3.1.4

Arguments

$options

\Joomla\Registry\RegistryGoogle options object

$uri

\JUriURL of the page being rendered

addCall

Add an analytics call

addCall(string $method, array $params = array()) : array
since

3.1.4

Arguments

$method

stringThe name of the function

$params

arrayThe parameters for the call

Response

arrayThe 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

integerThe slot to store the variable in (1-5)

$name

stringThe variable name

$value

stringThe variable value

$scope

integerThe scope of the variable (1: visitor level, 2: session level, 3: page level)

Response

arrayThe 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

stringThe general event category

$action

stringThe event action

$label

stringThe event description

$value

stringThe value of the event

$noninteract

booleanDon't allow this event to impact bounce statistics

Response

arrayThe added call

createCall

Create a javascript function from the call parameters

createCall(string $method, array $params = array()) : string
since

3.1.4

Arguments

$method

stringThe name of the function

$params

arrayThe parameters for the call

Response

stringThe 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

integerThe slot to store the variable in (1-5)

$name

stringThe variable name

$value

stringThe variable value

$scope

integerThe scope of the variable (1: visitor level, 2: session level, 3: page level)

Response

stringThe 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

stringThe general event category

$action

stringThe event action

$label

stringThe event description

$value

stringThe value of the event

$noninteract

booleanDon't allow this event to impact bounce statistics

Response

stringThe created call

deleteCall

Delete a call from the stack

deleteCall(integer $index = null) : array
since

3.1.4

Arguments

$index

integerIndex of call to delete (defaults to last added call)

Response

arrayThe deleted call

echoBody

Method to output the body for the API

echoBody() : null
inherited
since

3.1.4

Response

null

echoHeader

Method to output the javascript header for the embed API

echoHeader() : null
inherited
since

3.1.4

Response

null

getBody

Method to retrieve the body for the API

getBody() : string
inherited abstract
since

3.1.4

Response

stringThe body

getCode

Method to get the tracking code

getCode() : string
since

3.1.4

Response

stringThe Google Analytics tracking code

getHeader

Method to retrieve the header for the API

getHeader() : string
inherited abstract
since

3.1.4

Response

stringThe header

getOption

Get an option from the JGoogleEmbed instance.

getOption(string $key) : mixed
inherited
since

3.1.4

Arguments

$key

stringThe name of the option to get.

Response

mixedThe option value.

isAsync

Checks if the javascript is set to be asynchronous

isAsync() : boolean
since

3.1.4

Response

booleanTrue if asynchronous

isSecure

Method to retrieve the javascript header for the embed API

isSecure() : string
inherited
since

3.1.4

Response

stringThe header

listCalls

List the analytics calls to be executed

listCalls() : array
since

3.1.4

Response

arrayA list of calls

setCode

Method to set the tracking code

setCode(string $code) : \JGoogleEmbedAnalytics
since

3.1.4

Arguments

$code

stringThe Google Analytics tracking code

Response

\JGoogleEmbedAnalyticsThe object for method chaining

setOption

Set an option for the JGoogleEmbed instance.

setOption(string $key, mixed $value) : \JGoogleEmbed
inherited
since

3.1.4

Arguments

$key

stringThe name of the option to set.

$value

mixedThe option value to set.

Response

\JGoogleEmbedThis object for method chaining.

useAsync

Load javascript asynchronously

useAsync() : \JGoogleEmbedAnalytics
since

3.1.4

Response

\JGoogleEmbedAnalyticsThe object for method chaining

useSync

Load javascript synchronously

useSync() : \JGoogleEmbedAnalytics
since

3.1.4

Response

\JGoogleEmbedAnalyticsThe object for method chaining

Properties

options

Options for the Google data object.

inherited
since

3.1.4

Type(s)

\Joomla\Registry\Registry

uri

URI of the page being rendered.

inherited
since

3.1.4

Type(s)

\JUri