Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

186
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda