easyappointments/assets/js/http/google_analytics_settings_h...

40 lines
1.1 KiB
JavaScript
Raw Permalink Normal View History

2022-07-26 16:39:15 +03:00
/* ----------------------------------------------------------------------------
* Easy!Appointments - Online Appointment Scheduler
*
* @package EasyAppointments
* @author A.Tselegidis <alextselegidis@gmail.com>
* @copyright Copyright (c) Alex Tselegidis
* @license https://opensource.org/licenses/GPL-3.0 - GPLv3
* @link https://easyappointments.org
* @since v1.5.0
* ---------------------------------------------------------------------------- */
/**
* Google Analytics Settings HTTP client.
*
* This module implements the Google Analytics settings related HTTP requests.
*/
App.Http.GoogleAnalyticsSettings = (function () {
/**
* Save Google Analytics settings.
*
* @param {Object} googleAnalyticsSettings
*
* @return {Object}
*/
function save(googleAnalyticsSettings) {
const url = App.Utils.Url.siteUrl('google_analytics_settings/save');
const data = {
csrf_token: vars('csrf_token'),
google_analytics_settings: googleAnalyticsSettings,
2022-07-26 16:39:15 +03:00
};
return $.post(url, data);
}
return {
save,
2022-07-26 16:39:15 +03:00
};
})();