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

// Caching is enabled for performance.
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 = "Data Analytics Services UK | Business Intelligence & Reporting";
$page_description = "Turn raw data into actionable insights. Our UK data analytics services provide custom dashboards, business intelligence, and reporting to drive your growth.";
$canonical_url = "https://ukdataservices.co.uk/data-analytics-services.php";
$keywords = "data analytics services uk, business intelligence uk, data reporting services, data visualization, bi services london, data analysis company uk";
$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">

    <!-- Google Analytics 4 (GA4) -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-GK41JM8DK0"></script>
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
        gtag('config', 'G-GK41JM8DK0');
    </script>
</head>
<body>
    <header>
        <?php include($_SERVER['DOCUMENT_ROOT'] . '/includes/nav.php'); ?>
    </header>
    <main>
        <section class="hero">
            <h1>UK Data Analytics & Business Intelligence Services</h1>
            <p>Transform your raw data—whether from our web scraping services or your own internal sources—into clear, actionable business intelligence. We help UK businesses make smarter decisions with custom reporting and data visualization.</p>
        </section>

        <section class="services-list">
            <h2>From Data to Decisions</h2>
            <p>Our analytics services include:</p>
            <ul>
                <li><strong>Custom Dashboard Development:</strong> Interactive dashboards (e.g., Power BI, Tableau) tailored to your KPIs.</li>
                <li><strong>Business Intelligence (BI):</strong> We identify trends, patterns, and opportunities hidden in your data.</li>
                <li><strong>Automated Reporting:</strong> Receive scheduled reports that keep your team informed without manual effort.</li>
                <li><strong>Data Cleaning & Integration:</strong> We combine and clean data from multiple sources to create a single source of truth.</li>
            </ul>
             <a href="/contact" class="cta-button">Discuss Your Analytics Project</a>
        </section>
    </main>
    <footer>
        <?php include($_SERVER['DOCUMENT_ROOT'] . '/includes/footer.php'); ?>
    </footer>
</body>
</html>