Skip to main content

Gravity_Forms\Gravity_Forms\Telemetry\GF_Telemetry_Data

Class GF_Telemetry_Data

Base class for telemetry data.

Source: includes/telemetry/class-gf-telemetry-data.php:15

Details

  • Kind: class
  • Namespace: Gravity_Forms\Gravity_Forms\Telemetry

Properties

PropertyTypeDescription
$dataarrayData to be sent.
$keystringUnique identifier for this data object.
$data_collectionboolWhether data collection is allowed.

Methods

MethodDescription
is_data_collection_allowed()Determine if the user has allowed data collection.
get_data()Get the current telemetry data.
save_data()Save telemetry data.
take_snapshot()Take a snapshot of the current site data.
send_data()Send data to the telemetry endpoint.

Method Reference

is_data_collection_allowed()

public function is_data_collection_allowed()

Determine if the user has allowed data collection.

Returns

  • false | mixed | null

Since: 2.8.3

Source: includes/telemetry/class-gf-telemetry-data.php:48

get_data()

public static function get_data()

Get the current telemetry data.

Returns

  • array

Since: 2.8

Source: includes/telemetry/class-gf-telemetry-data.php:59

save_data()

public static function save_data( GF_Telemetry_Data $data )

Save telemetry data.

Parameters

NameTypeDefaultDescription
$dataGF_Telemetry_DataThe data to save.

Returns

  • void

Since: 2.8

Source: includes/telemetry/class-gf-telemetry-data.php:74

take_snapshot()

public static function take_snapshot()

Take a snapshot of the current site data.

Returns

  • void

Since: 2.8

Source: includes/telemetry/class-gf-telemetry-data.php:100

send_data()

public static function send_data( $entries )

Send data to the telemetry endpoint.

Parameters

NameTypeDefaultDescription
$entriesarrayThe data to send.

Returns

Since: 2.8

Source: includes/telemetry/class-gf-telemetry-data.php:114