<?php
   function unipixel_localize_console_logging_for_meta($eventName, array $sendServerResultInfo) { $scriptData = [ 'event_name' => $eventName, 'payload' => $sendServerResultInfo["\x70\x61\x79\x6C\x6F\x61\x64"] ?? [], 'response' => $sendServerResultInfo["\x72\x65\x73\x70\x6F\x6E\x73\x65"] ?? [], ]; wp_localize_script("\x75\x6E\x69\x70\x69\x78\x65\x6C\x2D\x63\x6F\x6D\x6D\x6F\x6E", "\x55\x6E\x69\x50\x69\x78\x65\x6C\x43\x6F\x6E\x73\x6F\x6C\x65\x4C\x6F\x67\x4D\x65\x74\x61", $scriptData); $script = "
        if (typeof UniPixelConsoleLogMeta !== 'undefined' && window.__UniPixelConsoleActive && typeof UniPixelConsoleLogger !== 'undefined') {
            UniPixelConsoleLogger.log('SEND', 'Meta | Server-side event sent | ' + UniPixelConsoleLogMeta.event_name + ' object:', UniPixelConsoleLogMeta.payload);
            if (UniPixelConsoleLogMeta.response && Object.keys(UniPixelConsoleLogMeta.response).length > 0) {
                UniPixelConsoleLogger.log('RESPONSE', 'Meta | Platform response | ' + UniPixelConsoleLogMeta.event_name + ' object:', UniPixelConsoleLogMeta.response);
            }
        }
    "; wp_add_inline_script("\x75\x6E\x69\x70\x69\x78\x65\x6C\x2D\x63\x6F\x6D\x6D\x6F\x6E", $script, "\x61\x66\x74\x65\x72"); } function unipixel_localize_console_logging_for_google($eventName, array $sendServerResultInfo) { $scriptData = [ 'event_name' => $eventName, 'payload' => $sendServerResultInfo["\x70\x61\x79\x6C\x6F\x61\x64"] ?? [], 'response' => $sendServerResultInfo["\x72\x65\x73\x70\x6F\x6E\x73\x65"] ?? [], ]; wp_localize_script("\x75\x6E\x69\x70\x69\x78\x65\x6C\x2D\x63\x6F\x6D\x6D\x6F\x6E", "\x55\x6E\x69\x50\x69\x78\x65\x6C\x43\x6F\x6E\x73\x6F\x6C\x65\x4C\x6F\x67\x47\x6F\x6F\x67\x6C\x65", $scriptData); $script = "
        if (typeof UniPixelConsoleLogGoogle !== 'undefined' && window.__UniPixelConsoleActive && typeof UniPixelConsoleLogger !== 'undefined') {
            UniPixelConsoleLogger.log('SEND', 'Google | Server-side event sent | ' + UniPixelConsoleLogGoogle.event_name + ' object:', UniPixelConsoleLogGoogle.payload);
            if (UniPixelConsoleLogGoogle.response && Object.keys(UniPixelConsoleLogGoogle.response).length > 0) {
                UniPixelConsoleLogger.log('RESPONSE', 'Google | Platform response | ' + UniPixelConsoleLogGoogle.event_name + ' object:', UniPixelConsoleLogGoogle.response);
            }
        }
    "; wp_add_inline_script("\x75\x6E\x69\x70\x69\x78\x65\x6C\x2D\x63\x6F\x6D\x6D\x6F\x6E", $script, "\x61\x66\x74\x65\x72"); } function unipixel_localize_console_logging_for_tiktok($eventName, array $sendServerResultInfo) { $scriptData = [ 'event_name' => $eventName, 'payload' => $sendServerResultInfo["\x70\x61\x79\x6C\x6F\x61\x64"] ?? [], 'response' => $sendServerResultInfo["\x72\x65\x73\x70\x6F\x6E\x73\x65"] ?? [], ]; wp_localize_script("\x75\x6E\x69\x70\x69\x78\x65\x6C\x2D\x63\x6F\x6D\x6D\x6F\x6E", "\x55\x6E\x69\x50\x69\x78\x65\x6C\x43\x6F\x6E\x73\x6F\x6C\x65\x4C\x6F\x67\x54\x69\x6B\x74\x6F\x6B", $scriptData); $script = "
        if (typeof UniPixelConsoleLogTiktok !== 'undefined' && window.__UniPixelConsoleActive && typeof UniPixelConsoleLogger !== 'undefined') {
            UniPixelConsoleLogger.log('SEND', 'TikTok | Server-side event sent | ' + UniPixelConsoleLogTiktok.event_name + ' object:', UniPixelConsoleLogTiktok.payload);
            if (UniPixelConsoleLogTiktok.response && Object.keys(UniPixelConsoleLogTiktok.response).length > 0) {
                UniPixelConsoleLogger.log('RESPONSE', 'TikTok | Platform response | ' + UniPixelConsoleLogTiktok.event_name + ' object:', UniPixelConsoleLogTiktok.response);
            }
        }
    "; wp_add_inline_script("\x75\x6E\x69\x70\x69\x78\x65\x6C\x2D\x63\x6F\x6D\x6D\x6F\x6E", $script, "\x61\x66\x74\x65\x72"); } function unipixel_localize_console_logging_for_pinterest($eventName, array $sendServerResultInfo) { $scriptData = [ 'event_name' => $eventName, 'payload' => $sendServerResultInfo["\x70\x61\x79\x6C\x6F\x61\x64"] ?? [], 'response' => $sendServerResultInfo["\x72\x65\x73\x70\x6F\x6E\x73\x65"] ?? [], ]; wp_localize_script("\x75\x6E\x69\x70\x69\x78\x65\x6C\x2D\x63\x6F\x6D\x6D\x6F\x6E", "\x55\x6E\x69\x50\x69\x78\x65\x6C\x43\x6F\x6E\x73\x6F\x6C\x65\x4C\x6F\x67\x50\x69\x6E\x74\x65\x72\x65\x73\x74", $scriptData); $script = "
        if (typeof UniPixelConsoleLogPinterest !== 'undefined' && window.__UniPixelConsoleActive && typeof UniPixelConsoleLogger !== 'undefined') {
            UniPixelConsoleLogger.log('SEND', 'Pinterest | Server-side event sent | ' + UniPixelConsoleLogPinterest.event_name + ' object:', UniPixelConsoleLogPinterest.payload);
            if (UniPixelConsoleLogPinterest.response && Object.keys(UniPixelConsoleLogPinterest.response).length > 0) {
                UniPixelConsoleLogger.log('RESPONSE', 'Pinterest | Platform response | ' + UniPixelConsoleLogPinterest.event_name + ' object:', UniPixelConsoleLogPinterest.response);
            }
        }
    "; wp_add_inline_script("\x75\x6E\x69\x70\x69\x78\x65\x6C\x2D\x63\x6F\x6D\x6D\x6F\x6E", $script, "\x61\x66\x74\x65\x72"); } function unipixel_localize_console_logging_for_microsoft($eventName, array $sendServerResultInfo) { $scriptData = [ 'event_name' => $eventName, 'payload' => $sendServerResultInfo["\x70\x61\x79\x6C\x6F\x61\x64"] ?? [], 'response' => $sendServerResultInfo["\x72\x65\x73\x70\x6F\x6E\x73\x65"] ?? [], ]; wp_localize_script("\x75\x6E\x69\x70\x69\x78\x65\x6C\x2D\x63\x6F\x6D\x6D\x6F\x6E", "\x55\x6E\x69\x50\x69\x78\x65\x6C\x43\x6F\x6E\x73\x6F\x6C\x65\x4C\x6F\x67\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74", $scriptData); $script = "
        if (typeof UniPixelConsoleLogMicrosoft !== 'undefined' && window.__UniPixelConsoleActive && typeof UniPixelConsoleLogger !== 'undefined') {
            UniPixelConsoleLogger.log('SEND', 'Microsoft | Server-side event sent | ' + UniPixelConsoleLogMicrosoft.event_name + ' object:', UniPixelConsoleLogMicrosoft.payload);
            if (UniPixelConsoleLogMicrosoft.response && Object.keys(UniPixelConsoleLogMicrosoft.response).length > 0) {
                UniPixelConsoleLogger.log('RESPONSE', 'Microsoft | Platform response | ' + UniPixelConsoleLogMicrosoft.event_name + ' object:', UniPixelConsoleLogMicrosoft.response);
            }
        }
    "; wp_add_inline_script("\x75\x6E\x69\x70\x69\x78\x65\x6C\x2D\x63\x6F\x6D\x6D\x6F\x6E", $script, "\x61\x66\x74\x65\x72"); } 