phpDocumentor

GoogleAnalyticsJsFile
in package
implements GoogleAnalyticsJsFileInterface

Class GoogleAnalyticsJsFile

Interfaces, Classes and Traits

GoogleAnalyticsJsFileInterface
Interface GoogleAnalyticsJsFileInterface

Table of Contents

$allowedTypes  : array<string|int, mixed>
$scriptUrl  : string
$type  : string
__construct()  : mixed
GoogleAnalyticsJsFile constructor.
analytics()  : GoogleAnalyticsJsFile
Creates an analytics js file type.
ecPlugin()  : GoogleAnalyticsJsFile
Creates an e-commerce plugin js file type.
gtag()  : GoogleAnalyticsJsFile
Creates an gtag js file type.
sourceUrl()  : string
Returns the source url of the analytics file.
type()  : string
Returns the google analytics javascript file type (gtag, analytics, ec-plugin).

Properties

Methods

__construct()

GoogleAnalyticsJsFile constructor.

public __construct(string $type, string $scriptUrl) : mixed
Parameters
$type : string

Google analytics js file type.

$scriptUrl : string

Url of js file source.

Tags
throws
InvalidAnalyticsJsFileType

If provided type is not allowed.

Return values
mixed

sourceUrl()

Returns the source url of the analytics file.

public sourceUrl() : string
Return values
string

type()

Returns the google analytics javascript file type (gtag, analytics, ec-plugin).

public type() : string
Return values
string

Search results