Create a comprehensive, fully functional Client Emailing/Tracking PHP (8+) website for a…
- User
Create a comprehensive, fully functional Client Emailing/Tracking PHP (8+) website for a real estate business with the following specifications:
This will be 2 systems in 1. System 1: The database already exists that registers each client into Admin_AllClients when they send a website contact form. We register the clients IP address at this time and I would like to monitor & report each clients website visit to create client history log. Link clients stats to 'System 2' Create a hot client list based on latest/most visits.
System 2: The first system is an email system, that monitors the database table, Admin_AllClients for new inserts then automatically sends a welcome email. All email sent will be logged and monitored for opened & read. Once the email is opened & read the status and date/time will be logged and the client will automatically be registered into the next emailing queue for email to be sent. There needs to be around 10 email queues, for each website, with different emails, dependant on client status.
Core System Requirements Database Integration Utilise the existing database structure with tables Admin_AllContacts and Admin_AllEmailsSent as provided. Create additional tables: EmailTemplates, WebsiteVisits, EmailSequences, and Unsubscribes as defined in the original system. Implement proper database connection handling with resource cleanup to prevent memory leaks. Client Tracking System Implement a unique tracking system to monitor new entries in the Admin_AllContacts table. Create an automated email sequencing system that triggers upon new client registration. Send personalised welcome emails immediately after new client registration. Track email opens via embedded 1×1 pixel tracking (create a script to be executed when emails are opened). Auto-progress clients to the next email stage upon opening (e.g., Stage 1 → Stage 2). Email Management Support customizable email templates with merge tags (e.g., [Client_Name], [InterestedIn], etc.). Implement an email template management system in the admin dashboard. Ensure all emails include unsubscribe links for GDPR compliance. Log all email activities in the Admin_AllEmailsSent table. Website Visit Tracking Create a visit tracking system that logs client visits across multiple websites. Record visit timestamps, URLs, referrers, and user agents. Correlate email opens with website activity (e.g., "Client opened email at 10 AM, visited property listings at 11 AM"). Generate JavaScript tracking code that can be embedded on any website. Admin Dashboard Develop a responsive admin dashboard using Bootstrap or Tailwind CSS. Display real-time analytics: open rates per stage, visit frequency, and top traffic sources. Create client profiles showing full interaction history (forms, emails, visits). Implement export functionality for reports (CSV/PDF) for team meetings. Security & Compliance Implement GDPR-compliant opt-ins (checkbox for cross-site tracking). Ensure that all unsubscribe requests are processed promptly and immediately. Apply data encryption (AES-256 for PII, SSL for transmissions). Create a secure authentication system for the admin dashboard. Additional Functionality Advanced Lead Scoring Implement sophisticated lead scoring algorithms based on: Email interaction patterns (opens, clicks, time spent) Website behaviour (pages visited, time on site, return visits) Property preferences and budget considerations Demographic and geographic factors Historical conversion patterns Create a dynamic scoring system that updates in real-time as clients interact. Implement lead scoring thresholds that trigger automatic alerts or actions. Display lead scores prominently in client profiles and enable sorting/filtering by score. WhatsApp Integration Integrate with the WhatsApp Business API for sending mobile alerts. Configure automated WhatsApp notifications for: High-scoring lead alerts to agents Appointment reminders Property viewing confirmations New property matches based on client preferences Create a template management system for WhatsApp messages. Implement two-way communication capabilities to allow clients to respond via WhatsApp. Log all WhatsApp communications in the client timeline. Advanced Reporting Develop a comprehensive reporting module with: Custom date range filtering Advanced segmentation options Comparison reports (period-over-period, year-over-year) Visual data representation (charts, graphs, heatmaps) Scheduled report generation and email delivery Create export options in multiple formats (CSV, Excel, PDF, JSON). Implement a report builder that allows custom report creation. Add dashboard widgets for key metrics and KPIs. Client Segmentation Implement client segmentation based on: Behavioural patterns (email engagement, website activity) Property preferences (type, location, budget range) Demographic information (age, location, language) Lead status and scoring Timeline interactions (last contact, next follow-up) Create dynamic segments that automatically update as client data changes. Enable targeted email campaigns for specific segments. Provide segment analysis tools to compare performance across segments. Allow manual segment creation with custom criteria. Technical Specifications Backend Use PHP 8+ with object-oriented programming principles. Implement proper error handling and logging. Create a modular architecture with separate files for different functionalities. Use prepared statements for all database operations to prevent SQL injection. Implement session management and authentication. Frontend Use Bootstrap 5 or Tailwind CSS for responsive design. Implement JavaScript for dynamic dashboard elements. Use Chart.js or a similar library for data visualisation. Ensure the dashboard is mobile-friendly and accessible. Database Optimise all database queries for performance. Implement proper indexing on frequently queried fields. Use MySQL 8+ with the InnoDB engine for transactional support. Create database migration scripts for setup and updates. API Integration Implement RESTful API endpoints for external integrations. Create proper API authentication and rate limiting. Document all API endpoints with request/response examples. Implementation Notes Memory Management: Ensure all database resources are properly freed and connections are closed to prevent memory leaks. Security: Implement proper input validation, output escaping, and CSRF protection. Use password hashing for authentication. Performance: Optimise queries and implement caching where appropriate. Use pagination for large datasets. Error Handling: Implement comprehensive error handling with user-friendly messages and detailed logging. Testing: Include unit tests for critical functionality and integration tests for the system as a whole. Documentation: Provide clear documentation for installation, configuration, and usage of the system. Scalability: Design the system to handle growth in clients, emails, and website visits. GDPR Compliance: Ensure all data collection and processing complies with GDPR requirements, including explicit consent and data portability. The final system should be a professional, scalable, and secure solution that effectively manages real estate client interactions, automates personalised communication, and provides actionable insights through advanced analytics and reporting.
- Assistant