if(typeof UniPixelOrderData==='undefined'){
var UniPixelOrderData={};}
window.UniPixelGetCookieValue=function (cookieName){
const name=cookieName + "=";
const decodedCookie=decodeURIComponent(document.cookie);
const ca=decodedCookie.split(';');
for (let i=0; i < ca.length; i++){
let c=ca[i].trim();
if(c.indexOf(name)===0){
return c.substring(name.length, c.length);
}}
return "";
};
function unipixelLogClientEvent(options){
if(typeof UniPixelAjax==='undefined'){
return;
}
const payload={
action: 'unipixel_log_client_event',
nonce: UniPixelAjax.nonce,
platform_id: options.platform_id,
element_ref: options.element_ref,
event_trigger: options.event_trigger,
event_name: options.event_name,
response_log_message: options.response_log_message||'',
json_data_sent: JSON.stringify(options.json_data_sent||{}),
party: options.party||'third',
event_order: options.event_order||'clientFirst'
};
return $.post(UniPixelAjax.ajaxurl, payload)
.done(function(response){
if(response.success){
}else{
}})
.fail(function(_, status, err){
});
};