Event API
  • Introduction
  • JavaScript API
    • Library installation
    • Event registration
    • Visitor identification
    • Dynamic parameters
    • Examples
  • REST API
    • Event registration
    • Visitor identification
    • Dynamic parameters
    • Examples
Powered by GitBook
On this page
  1. JavaScript API

Library installation

You need to place the hybrid.ai JavaScript library on the Web page inside the tag <head> to track the visitor’s actions and associate data with him.

The library and all requests will be loaded and called asynchronously, which will not affect the page loading.

<script>
    window._txq = window._txq || [];
    var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = 'https://st.hybrid.ai/txsp.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(s);
    _txq.push(['createPixel', 'PIXEL_ID']);
</script>

where:

  • PIXEL_ID is pixel identifier issued hybrid.ai.

The library provides the global variable _txq, which can be used to send data about the visitor and his actions.

PreviousJavaScript APINextEvent registration

Last updated 5 years ago