<?php
  if (!defined("\x41\x42\x53\x50\x41\x54\x48")) { exit;  } function unipixel_receive_ajax_data_for_server_event_microsoft() {  check_ajax_referer("\x75\x6E\x69\x70\x69\x78\x65\x6C\x5F\x74\x72\x61\x63\x6B\x5F\x6E\x6F\x6E\x63\x65", "\x6E\x6F\x6E\x63\x65"); $platformId = 5; $platformSettings = unipixel_get_platform_settings($platformId);  $event_name_raw = sanitize_text_field(wp_unslash($_POST["\x65\x76\x65\x6E\x74\x4E\x61\x6D\x65"])); if (empty($platformSettings->serverside_global_enabled)) { echo wp_json_encode([$event_name_raw => "\x53\x65\x72\x76\x65\x72\x2D\x73\x69\x64\x65\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2C\x20\x73\x6B\x69\x70\x70\x65\x64"]); wp_die(); }  $event_name = $event_name_raw; $element_ref = sanitize_text_field(wp_unslash($_POST["\x65\x6C\x65\x6D\x65\x6E\x74\x52\x65\x66"])); $event_trigger = sanitize_text_field(wp_unslash($_POST["\x65\x76\x65\x6E\x74\x54\x72\x69\x67\x67\x65\x72"])); $event_id = sanitize_text_field(wp_unslash($_POST["\x65\x76\x65\x6E\x74\x5F\x69\x64"])); $pageUrl = isset($_POST["\x70\x61\x67\x65\x55\x72\x6C"]) ? esc_url_raw(wp_unslash($_POST["\x70\x61\x67\x65\x55\x72\x6C"])) : ""; $isPageView = ($event_name === 'PageView'); $sendServer = false; $sendServerLogResponse = false; if ($isPageView) { $sendServer = ! empty($platformSettings->pageview_send_serverside) ? intval($platformSettings->pageview_send_serverside) : 0; $sendServerLogResponse = ! empty($platformSettings->send_server_log_response) ? intval($platformSettings->send_server_log_response) : 0; } else { $eventSettings = unipixel_get_event_settings($platformId, $event_name); $sendServer = intval($eventSettings->send_server ?? 0); $sendServerLogResponse = intval($eventSettings->send_server_log_response ?? 0); } if (!$sendServer) { echo wp_json_encode([$event_name => "\x53\x65\x72\x76\x65\x72\x20\x65\x76\x65\x6E\x74\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64\x2C\x20\x73\x6B\x69\x70\x70\x65\x64"]); wp_die(); } $eventTime = time(); $msclkid_value = unipixel_get_msclkid_value();  $user_data = [ 'clientIpAddress' => sanitize_text_field(unipixel_get_ip_address()), 'clientUserAgent' => sanitize_text_field($_SERVER["\x48\x54\x54\x50\x5F\x55\x53\x45\x52\x5F\x41\x47\x45\x4E\x54"] ?? ""), ]; if (!empty($msclkid_value)) { $user_data["\x6D\x73\x63\x6C\x6B\x69\x64"] = sanitize_text_field($msclkid_value); }  $amData = unipixel_get_advanced_matching_data(); $microsoft_am_map = [ 'plcehldr_hashedEmail' => "\x65\x6D", 'plcehldr_hashedPhone' => "\x70\x68", ]; foreach ($microsoft_am_map as $placeholder => $apiKey) { if (!empty($amData[$placeholder])) { $user_data[$apiKey] = $amData[$placeholder]; } } $sanitized_custom_data = [];  $sendServerResultInfo = unipixel_send_server_event_microsoft( $event_name, $user_data, $sanitized_custom_data, $event_id, $eventTime, $pageUrl, $sendServerLogResponse ); $jsonRtn = unipixel_handle_send_event_result($platformId, $element_ref, $event_trigger, $event_name, $sendServerResultInfo, "\x73\x65\x72\x76\x65\x72", "\x66\x69\x72\x73\x74", "\x73\x65\x72\x76\x65\x72\x53\x65\x63\x6F\x6E\x64"); echo $jsonRtn; wp_die(); } add_action('wp_ajax_unipixel_ajax_server_event_microsoft', "\x75\x6E\x69\x70\x69\x78\x65\x6C\x5F\x72\x65\x63\x65\x69\x76\x65\x5F\x61\x6A\x61\x78\x5F\x64\x61\x74\x61\x5F\x66\x6F\x72\x5F\x73\x65\x72\x76\x65\x72\x5F\x65\x76\x65\x6E\x74\x5F\x6D\x69\x63\x72\x6F\x73\x6F\x66\x74"); add_action('wp_ajax_nopriv_unipixel_ajax_server_event_microsoft', "\x75\x6E\x69\x70\x69\x78\x65\x6C\x5F\x72\x65\x63\x65\x69\x76\x65\x5F\x61\x6A\x61\x78\x5F\x64\x61\x74\x61\x5F\x66\x6F\x72\x5F\x73\x65\x72\x76\x65\x72\x5F\x65\x76\x65\x6E\x74\x5F\x6D\x69\x63\x72\x6F\x73\x6F\x66\x74"); 