<?php
// Enhanced security headers
// Session for CSRF token
ini_set('session.cookie_samesite', 'Lax');
ini_set('session.cookie_httponly', '1');
ini_set('session.cookie_secure', '1');
session_start();

if (!isset($_SESSION['csrf_token'])) {
    $_SESSION['csrf_token'] = bin2hex(random_bytes(32));
}
header('Strict-Transport-Security: max-age=31536000; includeSubDomains');
header('Content-Security-Policy: default-src \'self\'; script-src \'self\' \'unsafe-inline\' https://cdnjs.cloudflare.com https://www.googletagmanager.com https://www.google-analytics.com https://www.clarity.ms https://www.google.com https://www.gstatic.com; style-src \'self\' \'unsafe-inline\' https://fonts.googleapis.com; font-src \'self\' https://fonts.gstatic.com; img-src \'self\' data: https://www.google-analytics.com; connect-src \'self\' https://www.google-analytics.com https://analytics.google.com https://region1.google-analytics.com https://www.google.com; frame-src https://www.google.com;');

// SEO and performance optimizations
$page_title = "Competitor Price Monitoring Services UK | UK Data Services";
$page_description = "Automate competitor price tracking with our UK-based price monitoring services. Get accurate, real-time pricing data to optimise your strategy. Free quote.";
$canonical_url = "https://ukdataservices.co.uk/price-monitoring-services.php";
$keywords = "price monitoring services, competitor price tracking, automated pricing data, dynamic pricing, e-commerce price scraping, UK price monitoring";
$author = "UK Data Services";
$og_image = "https://ukdataservices.co.uk/assets/images/ukds-main-logo.png";
$twitter_card_image = "https://ukdataservices.co.uk/assets/images/ukds-main-logo.png";
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo htmlspecialchars($page_title); ?></title>
    <meta name="description" content="<?php echo htmlspecialchars($page_description); ?>" />
    <meta name="keywords" content="<?php echo htmlspecialchars($keywords); ?>">
    <meta name="author" content="<?php echo htmlspecialchars($author); ?>">
    <meta name="robots" content="index, follow">
    <link rel="canonical" href="<?php echo htmlspecialchars($canonical_url); ?>">
    
    <!-- Open Graph / Social Media -->
    <meta property="og:type" content="website">
    <meta property="og:url" content="<?php echo htmlspecialchars($canonical_url); ?>">
    <meta property="og:title" content="<?php echo htmlspecialchars($page_title); ?>">
    <meta property="og:description" content="<?php echo htmlspecialchars($page_description); ?>">
    <meta property="og:image" content="<?php echo htmlspecialchars($og_image); ?>">
    
    <!-- Twitter Card -->
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:url" content="<?php echo htmlspecialchars($canonical_url); ?>">
    <meta name="twitter:title" content="<?php echo htmlspecialchars($page_title); ?>">
    <meta name="twitter:description" content="<?php echo htmlspecialchars($page_description); ?>">
    <meta name="twitter:image" content="<?php echo htmlspecialchars($twitter_card_image); ?>">
    
    <!-- Favicon and other head elements from main template -->
    <link rel="icon" type="image/svg+xml" href="/assets/images/favicon.svg">

</head>
<body>
    <header>
        <?php include($_SERVER['DOCUMENT_ROOT'] . '/includes/nav.php'); ?>
    </header>

    <main>
        <section class="hero">
            <h1>Automated Competitor Price Monitoring Services</h1>
            <p>Gain a competitive edge with real-time, accurate pricing data from any e-commerce site or marketplace. Our automated price monitoring service gives you the insights to optimise your pricing strategy, maximise profits, and protect your brand.</p>
        </section>

        <section>
            <h2>Stay Ahead with Real-Time Pricing Intelligence</h2>
            <p>In a dynamic market, manual price checks are slow and inefficient. We provide a fully managed data service that automatically scrapes competitor websites, delivering structured pricing data on your schedule (daily, hourly, or on-demand).</p>
            <ul>
                <li>Track unlimited products and competitors.</li>
                <li>Monitor price changes, stock availability, and promotions.</li>
                <li>Analyse historical pricing trends.</li>
                <li>Receive data in CSV, JSON, or via API.</li>
            </ul>
        </section>

        <section>
            <h2>How Our Price Tracking Service Works</h2>
            <ol>
                <li><strong>Consultation:</strong> We work with you to identify target competitors and the specific data points you need.</li>
                <li><strong>Scraper Development:</strong> Our UK-based team builds custom scrapers for each target website.</li>
                <li><strong>Data Extraction & QA:</strong> We run the scrapers at your desired frequency, and our QA process ensures data is 99.8%+ accurate.</li>
                <li><strong>Delivery:</strong> You receive clean, structured data in your preferred format, ready for analysis.</li>
            </ol>
        </section>
    </main>

    <footer>
        <?php include($_SERVER['DOCUMENT_ROOT'] . '/includes/footer.php'); ?>
    </footer>
</body>
</html>