CoolCMS API

GoogleIntegrations
in package

FinalYes

Values of the Google connections as the site uses them: a value is returned only while its connection is enabled and filled in, otherwise null (= service off).

Until 2026-10 these lived in cms_system_settings (module 1: googleAnalyticsId, googleTagManagerId, googleSiteVerification, googleMapsKey).

Table of Contents

Properties

$connections  : ExternalConnections

Methods

__construct()  : mixed
analyticsId()  : string|null
forPageHead()  : array{analyticsId: ?string, tagManagerId: ?string, siteVerification: ?string}
What the page head needs (analytics.latte of every theme).
geocodingKey()  : string|null
Key for server-side calls (geocoding): the dedicated server key when set, otherwise the page key.
mapId()  : string|null
Map ID from the Google Cloud console; null = markers stay on the legacy `google.maps.Marker`.
mapsKey()  : string|null
siteVerification()  : string|null
tagManagerId()  : string|null
enabledValue()  : string|null

Properties

Methods

forPageHead()

What the page head needs (analytics.latte of every theme).

public forPageHead() : array{analyticsId: ?string, tagManagerId: ?string, siteVerification: ?string}
Return values
array{analyticsId: ?string, tagManagerId: ?string, siteVerification: ?string}

geocodingKey()

Key for server-side calls (geocoding): the dedicated server key when set, otherwise the page key.

public geocodingKey() : string|null

Returned only while the connection is enabled and has the page key.

Return values
string|null

mapId()

Map ID from the Google Cloud console; null = markers stay on the legacy `google.maps.Marker`.

public mapId() : string|null

Returned only while the connection is enabled AND has the API key (a Map ID is useless without it).

Return values
string|null

siteVerification()

public siteVerification() : string|null
Return values
string|null

enabledValue()

private enabledValue(string $connection, string $field) : string|null
Parameters
$connection : string
$field : string
Return values
string|null
On this page

Search results