BSF_Analytics::maybe_track_analytics()

Send analaytics track event if tracking is enabled.


Description


Source

File: admin/bsf-analytics/class-bsf-analytics.php

		public function maybe_track_analytics() {

			if ( ! $this->is_tracking_enabled() ) {
				return;
			}

			$analytics_track = get_site_transient( 'bsf_analytics_track' );

			// If the last data sent is 2 days old i.e. transient is expired.
			if ( ! $analytics_track ) {
				$this->send();
				set_site_transient( 'bsf_analytics_track', true, 2 * DAY_IN_SECONDS );
			}
		}

Changelog

Changelog
Version Description
1.0.0 Introduced.


User Contributed Notes

You must log in before being able to contribute a note or feedback.