gracias!

¡Pago completado! Verifica tu correo electrónico.

[[
“event_name” => “Purchase”,
“event_time” => time(),
“action_source” => “website”,
“custom_data” => [
“currency” => “BRL”,
“value” => $valor
],
“user_data” => [
“client_ip_address” => $_SERVER[‘REMOTE_ADDR’],
“client_user_agent” => $_SERVER[‘HTTP_USER_AGENT’]
]
]]
];
$url = “https://graph.facebook.com/v19.0/$pixel_id/events?access_token=$access_token”;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
‘Content-Type: application/json’
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>