Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

190
Visualizações
How to track event in Wordpress and store in contact ActiveCampaign

May I ask how to track the specific event with the event tracking ActiveCampaign code? For example, if I want to track the person who click the button on Wordpress website and the button click event will appear in the activity of that person. How do I add on in this php sample code here.

<?php
    // Set up an object instance using our PHP API wrapper.
    define( "ACTIVECAMPAIGN_URL", "URL" );
    define( "ACTIVECAMPAIGN_API_KEY", "KEY" );
    require_once( "C:\\xampp\htdocs\\Tracking\\activecampaign-api-php-master\\includes\\ActiveCampaign.class.php" );
    $ac = new ActiveCampaign( ACTIVECAMPAIGN_URL, ACTIVECAMPAIGN_API_KEY );
    
    $ac->track_actid = "actid"; // your unique tracking account ID (found on the Integrations page).
    $ac->track_key   = "key"; // your unique event key (found on the Integrations page).
    $ac->track_email = "email"; // (optional) contact email address to associate the event with.
    
    $post_data = array(
        "event"     => "event",
        "eventdata" => "event_data",
        // any extra (optional) visit data to include?
        "visit"     => array(
            //"url" => "",
            //"referrer" => "",
            //"ip4" => "",
            //"ip6" => "",
            //"ua" => "",
            //"browser" => "",
            //"platform" => "",
            //"device" => "",
            //"utm_source" => "",
            //"utm_campaign" => "",
            //"utm_medium" => "",
            //"utm_term" => "",
            //"utm_content" => "",
        ),
    );
    
    $response = $ac->api( "tracking/log", $post_data );
    
    echo "<pre>";
    print_r( $response );
    echo "</pre>";
?>
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda