Real-time Behavioral Intelligence
Campaign: Tony Cargill - Bfunded
API: https://b72-api-production.b72.workers.dev
Status: โœ… Live & Operational

๐Ÿš€ Complete Live Tracking Snippet

Add this snippet to any website or landing page for real-time visitor intelligence:

<!-- B72 Live Behavioral Intelligence -->
<script>
(function() {
    window.B72_CONFIG = {
        apiUrl: 'https://b72-api-production.b72.workers.dev',
        campaignId: 'tony-cargill-bfunded-io',
        enableDebug: false
    };

    function generateSessionId() {
        return 'sess_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);
    }

    function getSessionId() {
        let sessionId = localStorage.getItem('b72_session_id');
        if (!sessionId) {
            sessionId = generateSessionId();
            localStorage.setItem('b72_session_id', sessionId);
        }
        return sessionId;
    }

    window.b72Track = function(eventName, properties = {}) {
        const sessionId = getSessionId();
        const eventData = {
            campaign_id: window.B72_CONFIG.campaignId,
            session_id: sessionId,
            event_name: eventName,
            page_url: window.location.href,
            referrer: document.referrer,
            user_agent: navigator.userAgent,
            props: {
                ...properties,
                viewport_width: window.innerWidth,
                viewport_height: window.innerHeight,
                timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
            },
            client_ts: new Date().toISOString()
        };

        fetch(window.B72_CONFIG.apiUrl + '/v1/events/track', {
            method: 'POST',
            headers: { 'Content-Type': 'application/json' },
            body: JSON.stringify(eventData)
        }).then(response => {
            if (window.B72_CONFIG.enableDebug) {
                console.log('B72:', eventName, response.ok ? 'โœ…' : 'โŒ');
            }
        }).catch(error => {
            if (window.B72_CONFIG.enableDebug) {
                console.error('B72 Error:', error);
            }
        });
    };

    // Auto-track page view
    document.addEventListener('DOMContentLoaded', () => b72Track('page_view'));

    // Auto-track scroll depth
    let maxScrollDepth = 0;
    window.addEventListener('scroll', () => {
        const scrollPercent = Math.round((window.scrollY / (document.body.scrollHeight - window.innerHeight)) * 100);
        if (scrollPercent > maxScrollDepth) {
            maxScrollDepth = scrollPercent;
            if (scrollPercent >= 50) b72Track('scroll_depth', { depth_percent: 50 });
            if (scrollPercent >= 75) b72Track('scroll_depth', { depth_percent: 75 });
        }
    });

    // Auto-track time on page
    let startTime = Date.now();
    setInterval(() => {
        const timeOnPage = Math.round((Date.now() - startTime) / 1000);
        if (timeOnPage >= 30) b72Track('time_on_page', { elapsed_seconds: timeOnPage });
    }, 5000);

    // Auto-track clicks
    document.addEventListener('click', (e) => {
        if (e.target.tagName === 'BUTTON' || e.target.type === 'submit') {
            b72Track('button_click', {
                button_text: e.target.textContent || e.target.value,
                button_id: e.target.id
            });
        }
        if (e.target.tagName === 'A') {
            b72Track('link_click', {
                link_text: e.target.textContent,
                link_url: e.target.href
            });
        }
    });

    console.log('๐Ÿš€ B72 Live Tracking:', window.B72_CONFIG.campaignId);
})();
</script>

๐ŸŽฏ What Gets Tracked

  • Page views & time on page
  • Scroll depth & engagement
  • Button clicks & form interactions
  • Link clicks & navigation
  • Session duration & return visits

๐Ÿš€ Real-time Features

  • Live behavioral intelligence
  • Instant hot lead scoring
  • WhatsApp notifications
  • Geographic tracking
  • Device & browser data

๐Ÿ”ง Custom Event Tracking

// High-intent events for fundraising
b72Track('deck_download', { deck_type: 'pitch_deck' });
b72Track('meeting_request', { meeting_type: 'investor_call' });
b72Track('contact_form', { form_type: 'investor_inquiry' });
b72Track('demo_request', { product: 'platform_demo' });

// Identity resolution (when you know who they are)
b72Track('profile_identified', { 
    email: 'investor@fund.com',
    name: 'John Smith',
    company: 'ABC Ventures'
});

๐Ÿงช Test Your Integration

Click buttons above to test your B72 platform integration