Anonymous Visitor Tracking

Integrating the InLeads Visitor Analytics Widget into your landing page allows you to track and analyze anonymous visitors . This guide will walk you through the steps to integrate the Visitor Analytics Widget.

Step-by-Step Guide to Visitor Analytics Widget Integration

Step 1: Add the Visitor Analytics Script to your landing page

  1. Place the Script Tag:

    • Add the following <script> tag to your HTML file. This script will load the Visitor Analytics Widget from InLeads.

    <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@inleads/event-logger/dist/events.js"></script>
  2. Initialize the Widget:

    • After including the script, initialize the Visitor Analytics Widget with your unique API key.

    <script type="text/javascript">
        inleadsEvents.init('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx');
        inleadsEvents.track('VISIT');
    </script>
    • Ensure this script is placed appropriately within your HTML document. Typically, this script can be added just before the closing </body> tag to ensure it loads after the rest of the page content.

Customizing the Visitor Analytics Widget

After integrating the Visitor Analytics Widget, you might want to customize its tracking and reporting behavior to better suit your website’s needs. Here are some customization options:

  • Tracking Specific Events: You can configure additional event tracking using the inleadsEvents.track function. For example, track clicks, form submissions, and other interactions by calling this function with different event types.

  • User Identification: Identify users by including user-specific data in your tracking calls, which can help in analyzing user-specific behaviors.

Testing the Integration

  1. Load Your Webpage:

    • Open your webpage where the Visitor Analytics Widget has been integrated. Ensure the script loads without errors.

  2. Check Initial Tracking:

    • Verify that the VISIT event is tracked correctly by checking the network requests or your InLeads dashboard.

  3. Monitor Additional Events:

    • Implement and monitor additional events as needed. Ensure each event is tracked and recorded correctly in the InLeads dashboard.

Troubleshooting Common Issues

  • Script Not Loading: Ensure that the script tag is correctly placed and the script URL is correct.

  • Tracking Issues: Verify that your API key is valid and correctly included in the initialization script.

  • Event Reporting: Check for any JavaScript errors in the console that might affect event tracking.

Benefits of Visitor Analytics Widget Integration

  • Comprehensive Visitor Tracking: Gain insights into visitor behavior and interactions on your website.

  • Data-Driven Decisions: Use the collected data to make informed decisions about website improvements and user experience enhancements.

  • Automated Analytics: Automatically track and analyze visitor data through the InLeads platform.

By following this detailed guide, you'll successfully integrate the InLeads Visitor Analytics Widget into your application. This integration will provide valuable insights into visitor behavior, helping you optimize your website and enhance user engagement.

Last updated