<!doctype html>
<html lang="tr">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/x-icon" href="https://statics.siberalem.com/dashboard/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
    
    <!-- Preconnect to Google Fonts for faster font loading -->
    <link rel="preconnect" href="https://fonts.googleapis.com" crossorigin />
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
    
    <title>Siberalem | Türkiye'nin En Güvenilir Arkadaşlık ve Evlilik Sitesi</title>
    <meta
      name="description"
      content="Türkiye'nin güvenilir arkadaşlık ve evlilik sitesi Siberalem, hayalinizdeki ilişkiye ulaşmanız için doğru adres."
    />
    
    <!-- anonymousId: create and persist in localStorage if not exists (for analytics cross-session identity) -->
    <script>
      (function() {
        try {
          var anonymousId = localStorage.getItem('anonymousId');
          if (!anonymousId) {
            if (typeof crypto !== 'undefined' && crypto.randomUUID) {
              anonymousId = crypto.randomUUID().replace(/-/g, '');
            } else {
              var chars = '0123456789abcdef';
              anonymousId = '';
              for (var i = 0; i < 32; i++) {
                anonymousId += chars.charAt(Math.floor(Math.random() * chars.length));
              }
            }
            localStorage.setItem('anonymousId', anonymousId);
          }
        } catch (e) {
          console.error('Error creating anonymousId:', e);
        }
      })();
    </script>
    
    <!-- Google Tag Manager - Only in production -->
    <script defer>
      (function(){
        var hostname = window.location.hostname;
        var isProduction = hostname === 'siberalem.com' || 
                          hostname === 'www.siberalem.com' ||
                          hostname.endsWith('.siberalem.com');
        // if (!isProduction) return; // localhost test için comment'lenmiş
        
        (function(w,d,s,l,i){
          try {
            w[l]=w[l]||[];
            w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});
            var f=d.getElementsByTagName(s)[0];
            var j=d.createElement(s);
            var dl=l!='dataLayer'?'&l='+l:'';
            j.async=true;
            j.defer=true;
            j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;
            f.parentNode.insertBefore(j,f);
          } catch(e) {
            // Silently handle GTM initialization errors
          }
        })(window,document,'script','dataLayer','GTM-PR3GXTG6');
      })();
    </script>
    <!-- End Google Tag Manager -->
    
    <!-- Facebook Pixel - Only in production -->
    <script defer>
      (function(){
        var hostname = window.location.hostname;
        var isProduction = hostname === 'siberalem.com' || 
                          hostname === 'www.siberalem.com' ||
                          hostname.endsWith('.siberalem.com');
        // if (!isProduction) return; // localhost test için comment'lenmiş
        
        !function(f,b,e,v,n,t,s){
          try {
            if(f.fbq)return;
            n=f.fbq=function(){
              if(n.callMethod){
                n.callMethod.apply(n,arguments);
              }else{
                n.queue.push(arguments);
              }
            };
            if(!f._fbq)f._fbq=n;
            n.push=n;
            n.loaded=!0;
            n.version='2.0';
            n.queue=[];
            t=b.createElement(e);
            t.async=!0;
            t.defer=true;
            t.src=v;
            s=b.getElementsByTagName(e)[0];
            s.parentNode.insertBefore(t,s);
          } catch(e) {
            // Silently handle Facebook Pixel initialization errors
          }
        }(window, document,'script','https://connect.facebook.net/en_US/fbevents.js');
        try {
          if(typeof fbq !== 'undefined') {
            fbq('init', '1259544881995512');
            // PageView sent manually from Analytics.pageEvent() after user data is set
          }
        } catch(e) {
          // Silently handle Facebook Pixel tracking errors
        }
      })();
    </script>
    
    <!-- AppsFlyer PBA Web SDK - Only in production -->
    <script defer>
      (function(){
        var hostname = window.location.hostname;
        var isProduction = hostname === 'siberalem.com' || 
                          hostname === 'www.siberalem.com' ||
                          hostname.endsWith('.siberalem.com');
        // if (!isProduction) return; // localhost test için comment'lenmiş
        
        try {
          !function(t,e,n,s,a,c,i,o,p){t.AppsFlyerSdkObject=a,t.AF=t.AF||function(){
          (t.AF.q=t.AF.q||[]).push([Date.now()].concat(Array.prototype.slice.call(arguments)))},
          t.AF.id=t.AF.id||i,t.AF.plugins={},o=e.createElement(n),p=e.getElementsByTagName(n)[0],o.async=1,
          o.src="https://websdk.appsflyer.com?"+(c.length>0?"st="+c.split(",").sort().join(",")+"&":"")+(i.length>0?"af_id="+i:""),
          p.parentNode.insertBefore(o,p)}(window,document,"script",0,"AF","pba",{pba: {webAppId: "0bae35f5-68d9-4d01-a1f6-896d1c46ecc6"}});
        } catch(e) {
          // Silently handle AppsFlyer PBA Web SDK initialization errors
        }
      })();
    </script>
    
    <!-- TikTok Pixel - Only in production -->
    <script defer>
      (function(){
        var hostname = window.location.hostname;
        var isProduction = hostname === 'siberalem.com' || 
                          hostname === 'www.siberalem.com' ||
                          hostname.endsWith('.siberalem.com');
        // if (!isProduction) return; // localhost test için comment'lenmiş
        
        !function (w, d, t) {
          try {
            w.TiktokAnalyticsObject=t;
            var ttq=w[t]=w[t]||[];
            ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie","holdConsent","revokeConsent","grantConsent"];
            ttq.setAndDefer=function(t,e){
              t[e]=function(){
                t.push([e].concat(Array.prototype.slice.call(arguments,0)));
              };
            };
            for(var i=0;i<ttq.methods.length;i++){
              ttq.setAndDefer(ttq,ttq.methods[i]);
            }
            ttq.instance=function(t){
              for(var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++){
                ttq.setAndDefer(e,ttq.methods[n]);
              }
              return e;
            };
            ttq.load=function(e,n){
              try {
                var r="https://analytics.tiktok.com/i18n/pixel/events.js";
                var o=n&&n.partner;
                ttq._i=ttq._i||{};
                ttq._i[e]=[];
                ttq._i[e]._u=r;
                ttq._t=ttq._t||{};
                ttq._t[e]=+new Date;
                ttq._o=ttq._o||{};
                ttq._o[e]=n||{};
                n=document.createElement("script");
                n.type="text/javascript";
                n.async=!0;
                n.defer=true;
                n.src=r+"?sdkid="+e+"&lib="+t;
                e=document.getElementsByTagName("script")[0];
                e.parentNode.insertBefore(n,e);
              } catch(err) {
                // Silently handle TikTok Pixel load errors
              }
            };
            ttq.load('CTLDDS3C77U1LI1DDG50');
            // PageView once here only (Analytics.pageEvent does not send to TikTok)
            ttq.page();
          } catch(e) {
            // Silently handle TikTok Pixel initialization errors
          }
        }(window, document, 'ttq');
      })();
    </script>
    
    <!-- Google Analytics & Google Ads - Only in production -->
    <script defer>
      (function(){
        var hostname = window.location.hostname;
        var isProduction = hostname === 'siberalem.com' || 
                          hostname === 'www.siberalem.com' ||
                          hostname.endsWith('.siberalem.com');
        // if (!isProduction) return; // localhost test için comment'lenmiş
        
        var script = document.createElement('script');
        script.async = true;
        script.defer = true;
        script.src = 'https://www.googletagmanager.com/gtag/js?id=G-XWBCV8TXNK';
        document.head.appendChild(script);
        
        script.onload = function() {
          try {
            window.dataLayer = window.dataLayer || [];
            function gtag(){dataLayer.push(arguments);}
            window.gtag = gtag; // Assign to window so Analytics.ts can access it
            gtag('js', new Date());
            
            // --- Enhanced Conversions: Initial User Data Setup ---
            // Cookie'den kullanıcı bilgilerini al
            try {
              var accountCookie = document.cookie.split(';').find(function(c) {
                return c.trim().startsWith('account=');
              });
              
              if (accountCookie) {
                var accountValue = decodeURIComponent(accountCookie.split('=')[1]);
                var accountData = JSON.parse(accountValue);
                var userId = accountData?.user?.UserId;
                
                // User ID varsa set et (profil bilgileri React uygulaması yüklendiğinde set edilecek)
                if (userId) {
                  gtag('set', 'user_properties', {
                    user_id: userId
                  });
                }
              }
            } catch(e) {
              // Cookie parse hatası - sessizce devam et
            }
            // --- Enhanced Conversions Setup Bitti ---
            
            // Config komutları (user_data set edildikten SONRA)
            // send_page_view: false - page_view is sent manually from React with user data
            gtag('config', 'G-XWBCV8TXNK', {
              send_page_view: false,
              user_id: (function() {
                try {
                  var accountCookie = document.cookie.split(';').find(function(c) {
                    return c.trim().startsWith('account=');
                  });
                  if (accountCookie) {
                    var accountValue = decodeURIComponent(accountCookie.split('=')[1]);
                    var accountData = JSON.parse(accountValue);
                    return accountData?.user?.UserId || undefined;
                  }
                } catch(e) {}
                return undefined;
              })()
            });
            gtag('config', 'AW-17640111902');
          } catch(e) {
            // Silently handle Google Analytics initialization errors
          }
        };
      })();
    </script>
    
    <!-- Microsoft Clarity - Only in production -->
    <script type="text/javascript" defer>
      (function(){
        var hostname = window.location.hostname;
        var isProduction = hostname === 'siberalem.com' || 
                          hostname === 'www.siberalem.com' ||
                          hostname.endsWith('.siberalem.com');
        // if (!isProduction) return; // localhost test için comment'lenmiş
        
        (function(c,l,a,r,i,t,y){
          try {
            c[a]=c[a]||function(){
              (c[a].q=c[a].q||[]).push(arguments);
            };
            t=l.createElement(r);
            t.async=1;
            t.defer=true;
            t.src='https://www.clarity.ms/tag/'+i;
            y=l.getElementsByTagName(r)[0];
            y.parentNode.insertBefore(t,y);
          } catch(e) {
            // Silently handle Microsoft Clarity initialization errors
          }
        })(window, document, 'clarity', 'script', 'rrkfibczqy');
      })();
    </script>
    
    <!-- HelpScout Beacon - Only in production -->
    <script type="text/javascript">
      (function(){
        var hostname = window.location.hostname;
        var isProduction = hostname === 'siberalem.com' || 
                          hostname === 'www.siberalem.com' ||
                          hostname.endsWith('.siberalem.com');
        // if (!isProduction) return; // localhost test için comment'lenmiş
        
        !function(e,t,n){function a(){var e=t.getElementsByTagName("script")[0],n=t.createElement("script");n.type="text/javascript",n.async=!0,n.src="https://beacon-v2.helpscout.net",e.parentNode.insertBefore(n,e)}if(e.Beacon=n=function(t,n,a){e.Beacon.readyQueue.push({method:t,options:n,data:a})},n.readyQueue=[],"complete"===t.readyState)return a();e.attachEvent?e.attachEvent("onload",a):e.addEventListener("load",a,!1)}(window,document,window.Beacon||function(){});
      })();
    </script>
    <script type="module" crossorigin src="https://statics.siberalem.com/dashboard/assets/index-d9838b89.js"></script>
    <link rel="modulepreload" crossorigin href="https://statics.siberalem.com/dashboard/assets/vendor-core-34d2bda0.js">
    <link rel="modulepreload" crossorigin href="https://statics.siberalem.com/dashboard/assets/vendor-forms-b8defd17.js">
    <link rel="modulepreload" crossorigin href="https://statics.siberalem.com/dashboard/assets/vendor-82978f8b.js">
    <link rel="modulepreload" crossorigin href="https://statics.siberalem.com/dashboard/assets/vendor-state-884372d2.js">
    <link rel="modulepreload" crossorigin href="https://statics.siberalem.com/dashboard/assets/vendor-ui-media-289b5bf8.js">
    <link rel="modulepreload" crossorigin href="https://statics.siberalem.com/dashboard/assets/pages-dashboard-f35b2d5c.js">
    <link rel="stylesheet" href="https://statics.siberalem.com/dashboard/assets/vendor-e2111806.css">
    <link rel="stylesheet" href="https://statics.siberalem.com/dashboard/assets/vendor-ui-media-fd3b18e2.css">
    <link rel="stylesheet" href="https://statics.siberalem.com/dashboard/assets/index-825db932.css">
      <script>
      // Injected at build-time by Vite plugin
      // Cloudflare Pages runtime environment variable injection
      window.__VITE_API_BASE_URL__ = "https://siberalemapi.com/api";
    </script>
  </head>
  <body>
    <!-- Google Tag Manager (noscript) -->
    <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PR3GXTG6"
    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <!-- End Google Tag Manager (noscript) -->
    
    <div id="root"></div>
    
  <!-- Cloudflare Pages Analytics --><script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "8110a47dcd434a348ea0f8098aac1a35"}'></script><!-- Cloudflare Pages Analytics --></body>
</html> 