Home / Admin / Property Analyzer Demo
Duplicate Snippet

Embed Snippet on Your Site

Property Analyzer Demo

Code Preview
php
<?php
// Add Property Analyzer Demo to WordPress
function addPropertyAnalyzerDemo() {
    // Only add on homepage or specific pages
    if (!is_home() && !is_page('home') && !is_front_page()) return;
    
    // CSS Styles
    echo '<style>
        .ai-property-analyzer {
            max-width: 900px;
            margin: 50px auto;
            background: white;
            border-radius: 20px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }
        
        .analyzer-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 3rem;
            text-align: center;
        }
        
        .analyzer-header h2 {
            font-size: 2.2rem;
            margin-bottom: 1rem;
            font-weight: 700;
        }
        
        .analyzer-subtitle {
            font-size: 1.1rem;
            opacity: 0.9;
            margin-bottom: 2rem;
        }
        
        .input-section {
            display: flex;
            gap: 1rem;
            margin-bottom: 2rem;
            flex-wrap: wrap;
        }
        
        .property-input {
            flex: 1;
            min-width: 300px;
            padding: 15px 20px;
            border: none;
            border-radius: 10px;
            font-size: 1rem;
            background: rgba(255, 255, 255, 0.9);
            color: #333;
        }
        
        .property-input:focus {
            outline: none;
            background: white;
            box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
        }
        
        .analyze-btn {
            padding: 15px 30px;
            background: #1a202c;
            color: white;
            border: none;
            border-radius: 10px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 1rem;
            white-space: nowrap;
        }
        
        .analyze-btn:hover {
            background: #2d3748;
            transform: translateY(-2px);
        }
        
        .analyze-btn:disabled {
            opacity: 0.7;
            cursor: not-allowed;
        }
        
        .demo-features {
            display: flex;
            gap: 1.5rem;
            justify-content: center;
            flex-wrap: wrap;
            font-size: 0.9rem;
            opacity: 0.9;
        }
        
        .analysis-results {
            padding: 3rem;
            display: none;
        }
        
        .results-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
            padding-bottom: 1rem;
            border-bottom: 2px solid #e2e8f0;
        }
        
        .results-header h3 {
            color: #1a202c;
            font-size: 1.5rem;
            margin: 0;
        }
        
        .investment-score {
            text-align: center;
        }
        
        .score-circle {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 800;
            font-size: 1.5rem;
            margin: 0 auto;
        }
        
        .metrics-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1.5rem;
            margin-bottom: 2rem;
        }
        
        .metric-card {
            background: #f8fafc;
            padding: 1.5rem;
            border-radius: 12px;
            display: flex;
            align-items: center;
            gap: 1rem;
            border-left: 4px solid #667eea;
        }
        
        .metric-icon {
            font-size: 1.5rem;
        }
        
        .metric-info {
            display: flex;
            flex-direction: column;
        }
        
        .metric-label {
            font-size: 0.9rem;
            color: #718096;
            margin-bottom: 0.25rem;
        }
        
        .metric-value {
            font-size: 1.2rem;
            font-weight: 700;
            color: #1a202c;
        }
        
        .key-insights {
            background: #f0fff4;
            padding: 2rem;
            border-radius: 12px;
            border-left: 4px solid #38a169;
            margin-bottom: 2rem;
        }
        
        .key-insights h4 {
            margin-bottom: 1rem;
            color: #1a202c;
        }
        
        .insights-list {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        
        .insights-list li {
            padding: 0.5rem 0;
            color: #2d3748;
            position: relative;
            padding-left: 1.5rem;
        }
        
        .insights-list li:before {
            content: "✓";
            position: absolute;
            left: 0;
            color: #38a169;
            font-weight: bold;
        }
        
        .email-capture-section {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 2.5rem;
            border-radius: 15px;
            text-align: center;
        }
        
        .email-capture-section h4 {
            margin-bottom: 1rem;
            font-size: 1.3rem;
        }
        
        .email-capture-section p {
            margin-bottom: 2rem;
            opacity: 0.9;
        }
        
        .mc4wp-form {
            display: flex;
            gap: 1rem;
            justify-content: center;
            flex-wrap: wrap;
            margin-bottom: 1.5rem;
        }
        
        .mc4wp-form input[type="email"] {
            flex: 1;
            min-width: 250px;
            max-width: 350px;
            padding: 12px 20px;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
        }
        
        .mc4wp-form input[type="submit"] {
            padding: 12px 25px;
            background: #1a202c;
            color: white;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .mc4wp-form input[type="submit"]:hover {
            background: #2d3748;
            transform: translateY(-2px);
        }
        
        .trust-indicators {
            display: flex;
            gap: 2rem;
            justify-content: center;
            font-size: 0.9rem;
            opacity: 0.8;
            flex-wrap: wrap;
        }
        
        .loading-spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: white;
            animation: spin 1s ease-in-out infinite;
            margin-left: 10px;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        @media (max-width: 768px) {
            .input-section {
                flex-direction: column;
            }
            
            .property-input {
                min-width: 100%;
            }
            
            .mc4wp-form {
                flex-direction: column;
            }
            
            .mc4wp-form input[type="email"] {
                min-width: 100%;
            }
            
            .results-header {
                flex-direction: column;
                text-align: center;
                gap: 1rem;
            }
        }
    </style>';
    
    // HTML Structure
    echo '<div class="ai-property-analyzer">
        <div class="analyzer-header">
            <h2>🏠 See Our AI in Action - Analyze Any Property in 30 Seconds</h2>
            <p class="analyzer-subtitle">Enter any address below and watch our AI instantly analyze 47+ data points to reveal the property\'s investment potential</p>
            
            <div class="input-section">
                <input type="text" id="propertyAddress" placeholder="Enter property address (e.g., 123 Main St, Austin, TX)" class="property-input">
                <button onclick="analyzeProperty()" class="analyze-btn">Analyze Property</button>
            </div>
            
            <div class="demo-features">
                <span>✅ Market Trends</span>
                <span>✅ ROI Potential</span>
                <span>✅ Risk Assessment</span>
                <span>✅ Comparable Sales</span>
            </div>
        </div>
        
        <div class="analysis-results" id="analysisResults">
            <div class="results-header">
                <h3 id="analyzedAddress">Property Analysis Results</h3>
                <div class="investment-score">
                    <div>AI Investment Score</div>
                    <div class="score-circle">
                        <span id="investmentScore">87</span><span style="font-size:0.8rem">/100</span>
                    </div>
                </div>
            </div>
            
            <div class="metrics-grid">
                <div class="metric-card">
                    <div class="metric-icon">💰</div>
                    <div class="metric-info">
                        <span class="metric-label">Estimated ROI</span>
                        <span class="metric-value" id="roiValue">18.5%</span>
                    </div>
                </div>
                <div class="metric-card">
                    <div class="metric-icon">📈</div>
                    <div class="metric-info">
                        <span class="metric-label">Market Trend</span>
                        <span class="metric-value" id="marketTrend">Strong Growth</span>
                    </div>
                </div>
                <div class="metric-card">
                    <div class="metric-icon">🎯</div>
                    <div class="metric-info">
                        <span class="metric-label">Risk Level</span>
                        <span class="metric-value" id="riskLevel">Low</span>
                    </div>
                </div>
                <div class="metric-card">
                    <div class="metric-icon">🏘️</div>
                    <div class="metric-info">
                        <span class="metric-label">Neighborhood Score</span>
                        <span class="metric-value" id="neighborhoodScore">8.7/10</span>
                    </div>
                </div>
            </div>
            
            <div class="key-insights">
                <h4>🔍 Key AI Insights:</h4>
                <ul class="insights-list" id="insightsList">
                    <li>Property value increased 23% in last 2 years</li>
                    <li>Strong rental demand in this area (97% occupancy rate)</li>
                    <li>New development projects planned within 1 mile</li>
                    <li>Below market price - potential for immediate equity gain</li>
                </ul>
            </div>
            
            <div class="email-capture-section">
                <h4>🚀 Want the Complete 47-Point Analysis?</h4>
                <p>This is just a preview! Get detailed renovation costs, cash flow projections, comparable sales, and our AI\'s specific recommendations.</p>
                
                ' . do_shortcode('[mc4wp_form id="YOUR_FORM_ID"]') . '
                
                <div class="trust-indicators">
                    <span>🔒 Secure & Private</span>
                    <span>📧 Instant Delivery</span>
                    <span>🆓 100% Free</span>
                </div>
            </div>
        </div>
    </div>';
    
    // JavaScript
    echo '<script>
        const propertyData = {
            "123 main st": {
                score: 87,
                roi: "18.5%",
                trend: "Strong Growth",
                risk: "Low",
                neighborhood: "8.7/10",
                insights: [
                    "Property value increased 23% in last 2 years",
                    "Strong rental demand in this area (97% occupancy rate)",
                    "New development projects planned within 1 mile",
                    "Below market price - potential for immediate equity gain"
                ]
            },
            "default": {
                score: Math.floor(Math.random() * 30) + 70,
                roi: (Math.random() * 15 + 10).toFixed(1) + "%",
                trend: ["Strong Growth", "Moderate Growth", "Stable"][Math.floor(Math.random() * 3)],
                risk: ["Low", "Low-Medium", "Medium"][Math.floor(Math.random() * 3)],
                neighborhood: (Math.random() * 2 + 7.5).toFixed(1) + "/10",
                insights: [
                    "Market shows consistent growth patterns",
                    "Good rental yield potential in this location", 
                    "Comparable properties selling above list price",
                    "Favorable demographic trends for real estate"
                ]
            }
        };
        function analyzeProperty() {
            const address = document.getElementById("propertyAddress").value.trim();
            const btn = document.querySelector(".analyze-btn");
            
            if (!address) {
                alert("Please enter a property address");
                return;
            }
            
            btn.innerHTML = "Analyzing... <div class=\"loading-spinner\"></div>";
            btn.disabled = true;
            
            setTimeout(() => {
                const data = propertyData[address.toLowerCase()] || propertyData["default"];
                
                document.getElementById("analyzedAddress").textContent = address;
                document.getElementById("investmentScore").textContent = data.score;
                document.getElementById("roiValue").textContent = data.roi;
                document.getElementById("marketTrend").textContent = data.trend;
                document.getElementById("riskLevel").textContent = data.risk;
                document.getElementById("neighborhoodScore").textContent = data.neighborhood;
                
                const insightsList = document.getElementById("insightsList");
                insightsList.innerHTML = data.insights.map(insight => `<li>${insight}</li>`).join("");
                
                document.querySelector(".analyzer-header").style.display = "none";
                document.getElementById("analysisResults").style.display = "block";
                
                btn.innerHTML = "Analyze Property";
                btn.disabled = false;
            }, 2000);
        }
        
        document.addEventListener("DOMContentLoaded", function() {
            const addressInput = document.getElementById("propertyAddress");
            if (addressInput) {
                addressInput.addEventListener("keypress", function(e) {
                    if (e.key === "Enter") {
                        analyzeProperty();
                    }
                });
            }
        });
    </script>';
}
// Hook to add the demo to your homepage
add_action('wp_footer', 'addPropertyAnalyzerDemo');

Comments

Add a Comment