function getEventoFacebookPixel()
{
    /* @var $evento Evento */
    $evento = get_the_evento();
    $wizard = WizardInscricao::getInstance();
    $trackAction = null;
    //    var_dump($wizard->etapa);
    if ($wizard->etapa == DADOS_PESSOAIS) {
        $trackAction = 'AddToCart';
    } else {
        if ($wizard->etapa == CATEGORIAS) {
        } else {
            if ($wizard->etapa == PAGAMENTO) {
                $trackAction = 'InitiateCheckout';
            } else {
                if ($wizard->etapa == FIM) {
                    if ($wizard->inscricao->confirmado) {
                        if ($wizard->inscricao->valor_inscricao > 0) {
                            $trackAction = 'Purchase';
                        } else {
                            $trackAction = 'AddPaymentInfo';
                        }
                    } else {
                        $trackAction = 'CompleteRegistration';
                    }
                }
            }
        }
    }
    if ($trackAction == null) {
        $trackAction = "PageView";
    }
    //    var_dump($trackAction);
    // ViewContent
    // Track key page views (ex: product page, landing page or article)
    //fbq('track', 'ViewContent');
    // AddToCart
    // Track when items are added to a shopping cart (ex. click/landing page on Add to Cart button)
    //fbq('track', 'AddToCart');
    // InitiateCheckout
    // Track when people enter the checkout flow (ex. click/landing page on checkout button)
    //fbq('track', 'InitiateCheckout');
    // AddPaymentInfo
    // Track when payment information is added in the checkout flow (ex. click/landing page on billing info)
    //fbq('track', 'AddPaymentInfo');
    // Purchase
    // Track purchases or checkout flow completions (ex. landing on "Thank You" or confirmation page)
    //fbq('track', 'Purchase', {value: '1.00', currency: 'USD'});
    // Lead
    // Track when a user expresses interest in your offering (ex. form submission, sign up for trial, landing on pricing page)
    //fbq('track', 'Lead');
    // CompleteRegistration
    // Track when a registration form is completed (ex. complete subscription, sign up for a service)
    //fbq('track', 'CompleteRegistration');
    $output = "<!-- Facebook Conversion Code -->\n    <script>\n        console.log('track','{$trackAction}');\n        !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n            n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;\n            n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;\n            t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,\n            document,'script','//connect.facebook.net/en_US/fbevents.js');\n            fbq('init', '{$evento->fb_conversion_track}');\n            fbq('track', '{$trackAction}');\n        </script>\n        <noscript>\n        <img height='1' width='1' style='display:none' src='https://www.facebook.com/tr?id={$evento->fb_conversion_track}&ev={$trackAction}&noscript=1' />\n        </noscript>\n        <!-- End Facebook Pixel Code -->";
    echo $output;
}
<?php

use lib\WizardInscricao;
use TiagoGouvea\PLib;
get_header();
?>

<?php 
/* @var $pessoa Pessoa */
/* @var $inscricao Inscricao */
/* @var $evento Evento */
/* @var $wizard WizardInscricao */
$wizard = WizardInscricao::getInstance();
$evento = $wizard->getEvento();
//PLib::var_dump($etapa,"Etapa");
//PLib::var_dump($evento,"Evento");
//PLib::var_dump($pessoa,"Pessoa");
//PLib::var_dump($inscricao,"Inscricao");
// Carregar etapa
templateInclude("wizard-inscricao-etapa_" . $wizard->etapa . ".php");
//PLib::var_dump($wizard);
// Carregar layout
templateInclude("wizard-inscricao-layout.php", array('urlForm' => $urlForm, 'wizard' => $wizard, 'evento' => $wizard->evento, 'pessoa' => $wizard->pessoa, 'inscricao' => $wizard->inscricao));
function wizardTitulo()
{
    global $wizard;
    etapaTitulo($wizard->evento, $wizard->pessoa, $wizard->inscricao);
}
function wizardIntroducao()
{
    global $wizard;