![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mets.corals.io/wp-content/plugins/wp-smushit/_src/js/ |
/* global wp_smush_mixpanel */ import mixpanel from "mixpanel-browser"; export default class MixPanel { constructor() { this.mixpanelInstance = mixpanel.init(wp_smush_mixpanel.token, { opt_out_tracking_by_default: !wp_smush_mixpanel.opt_in, loaded: (mixpanel) => { mixpanel.identify(wp_smush_mixpanel.unique_id); mixpanel.register(wp_smush_mixpanel.super_properties); } }, 'smush'); } track(event, properties = {}) { this.mixpanelInstance.track(event, properties); } trackBulkSmushCompleted(totalSavingsSize, totalImageCount, optimizationPercentage, savingsPercentage) { this.track('Bulk Smush Completed', { 'Total Savings': totalSavingsSize, 'Total Images': totalImageCount, 'Media Optimization Percentage': optimizationPercentage, 'Percentage of Savings': savingsPercentage }); } trackBulkSmushCancel() { this.track('Bulk Smush Cancelled'); } }