암호화폐 웹사이트 타겟 광고 팁

globalchainpr 2025-11-19 조회

암호화폐 웹사이트 타겟 광고 팁

암호화폐 웹사이트 타겟 광고 팁: SEO 최적화로 성공적인 광고 전략

암호화폐 시장의 성장과 광고의 중요성

암호화폐 시장은 최근 몇 년간爆炸적으로 성장했습니다. 이러한 성장에 맞춰, 암호화폐 웹사이트 운영자들은 더 이상 단순한 정보 제공에 그치지 않고, 효과적인 광고 전략을 통해 사용자를 유치하고 유지하는 것이 중요합니다. 이는 SEO 최적화를 통해 타겟 고객에게 더 많은 노출을 제공하는 데 기인합니다.

1. 키워드 연구와 분석

암호화폐 웹사이트 타겟 광고를 위해서는 먼저 키워드 연구와 분석이 필수입니다. 사용자들이 실제로 검색하는 키워드를 파악하고, 이를 바탕으로 콘텐츠를 작성해야 합니다. 예를 들어, "암호화폐 교환 방법", "비트코인 투자 가이드"와 같은 검색량이 높은 키워드를 활용하면 더 많은 사용자가 사이트에 방문할 수 있습니다.

2. 내용의 질 높이기

SEO 최적화는 단순히 키워드 반복으로 이루어지지 않습니다. 실제로 유용하고 정보가 가득한 콘텐츠를 제공하는 것이 중요합니다. 예를 들어, 비트코인의 역사와 기술적 배경을 상세히 설명하거나, 최신 암호화폐 뉴스와 동향을 정리하는 콘텐츠는 사용자에게 큰 가치를 제공할 수 있습니다.

3. 메타태그와 SEO 최적화

메타태그는 검색 엔진에서 콘텐츠의 주제를 파악하는 데 중요한 역할을 합니다. 특히, 과 <meta name="description"> 태그는 사용자가 검색 결과에서 사이트에 대해 어떻게 인식할지에 큰 영향을 미칩니다. 예를 들어, "암호화폐 교환 방법: 전문가 가이드"라는 제목과 "비트코인 교환 방법과 비교 분석"이라는 설명을 메타태그에 포함하면 SEO 점수가 높아질 수 있습니다.</p> <h3>4. 소셜 미디어 활용</h3> <p>소셜 미디어는 암호화폐 웹사이트의 홍보에 매우 효과적입니다. 특히, 트위터,脸书(Facebook), 인스타그램(Instagram) 등에서 콘텐츠를 공유하여 더 많은 사용자에게 노출을 제공할 수 있습니다. 예를 들어, 주기적으로 새로운 콘텐츠나 특별 이벤트 정보를 공유하면 팔로워들이 지속적으로 사이트에 방문하게 됩니다.</p> <h3>5. 링크 구축 전략</h3> <p>링크 구축은 SEO 최적화의 또 다른 중요한 요소입니다. 다른 신뢰성 있는 웹사이트에서 링크를 받으면 검색 엔진에서 사이트의 신뢰도가 높아집니다. 예를 들어, 주요 암호화폐 블로그나 포럼에서 자신의 콘텐츠에 링크를 달거나, 다른 웹사이트와 교류하여 링크 교환을 하는 것이 좋습니다.</p> <h3>6. 데이터 분석과 조정</h3> <p>마지막으로, 데이터 분석은 SEO 전략을 조정하는 데 매우 중요합니다. Google Analytics 등을 통해 사용자 행동 데이터를 분석하여 어떤 콘텐츠가 잘 반응했는지 파악하고, 이에 따라 내용을 조정해야 합니다. 예를 들어, 특정 페이지가 많은 방문량을 받고 있으면 그 내용을 확대 발전시키거나 새로운 콘텐츠로 확장할 수 있습니다.</p> <h3>결론: 암호화폐 웹사이트 타겟 광고 팁으로 성공적인 SEO 전략 구축</h3> <p>암호화폐 웹사이트 타겟 광고 팁은 단순히 키워드 반복이 아니라, 내용의 질 높임과 SEO 최적화 전략의 종합적인 적용입니다. 키워드 연구부터 메타태그 설정까지 세심하게 접근해야만 성공적인 SEO 전략을 구축할 수 있습니다. 또한 소셜 미디어 활용과 링크 구축도 중요한 요소입니다. 데이터 분석과 조정을 통해 지속적으로 개선함으로써 더 많은 사용자에게 도달하고 성공적인 광고 전략을 추구하세요!</p> </div> <a href="https://www.chainwire360.com/" target="_blank">ChainWire360</a> <a href="https://www.prforcrypto.com/" target="_blank">PrForCrypto</a> <a href="https://www.chainbroadcast.com/" target="_blank">PrForCrypto</a> <a href="https://www.lianpr.com/" target="_blank">lianpr</a> <div class="flex flex-wrap justify-between items-center border-t pt-6 gap-4"> <a href="/tougao" class="inline-flex items-center px-5 py-2 bg-blue-700 text-white rounded-full hover:bg-blue-800 transition"> <i class="fa fa-paper-plane mr-2"></i> 기사 제보하기 </a> <button onclick="copyCurrentUrl()" class="text-blue-600 hover:underline flex items-center"> <i class="fa fa-link mr-1"></i> 링크 복사 </button> </div> <div class="border-t pt-6 space-y-2 text-sm text-gray-600"> <div><strong>이전 글:</strong> <a href="/xwdt/156547.html" class="text-blue-600 hover:underline">해외 영향력 확대 위해 암호화폐 웹사이트 광고</a></div> <div><strong>다음 글:</strong> <a href="/xwdt/156549.html" class="text-blue-600 hover:underline">암호화폐 웹사이트에 광고를 게재하여 브랜드 마케팅을 업</a></div> <div><a href="/hgzixun/" class="text-blue-600 hover:underline">← Korean News 목록으로 돌아가기</a></div> </div> </article> </div> </section> <!-- 관련 기사 --> <section class="bg-white py-20"> <div class="max-w-7xl mx-auto px-6"> <h2 class="text-2xl font-bold text-blue-900 mb-10 text-center">관련 기사</h2> <div class="grid md:grid-cols-2 gap-6"> <div class="flex flex-col sm:flex-row items-start gap-4 bg-gray-50 p-5 rounded-xl shadow hover:shadow-md transition"> <a href="/xwdt/16066.html" class="sm:w-32 w-full"> <img src="/img/43.jpg" alt="스타트업을 위한 선호되는 암호화폐 광고 전략" class="w-full h-40 sm:h-24 object-cover rounded-lg"> </a> <div class="flex-1"> <a href="/xwdt/16066.html"> <h3 class="text-base font-semibold text-blue-800 hover:underline">스타트업을 위한 선호되는 암호화폐 광고 전략</h3> </a> <p class="text-sm text-gray-600 mt-1 line-clamp-2">스타트업을 위한 선호되는 암호화폐 광고 전략스타트업들이 성공하기 위해서는 자금조달이 필수적입니다. 이때, 암호화폐를 활용하면 많은 이점이 있습니다. 하지만, 어떻게 효과적으로 광고를 전개해야 할까요? 이 글에서는 스타트업을 위한 선호되는 암호화폐 광고 전략을 소개하겠습니다.첫째, 타겟 ...</p> <div class="text-xs text-gray-500 mt-2 flex justify-between"> <span>2025-08-02</span> <span>2852 조회</span> </div> </div> </div> <div class="flex flex-col sm:flex-row items-start gap-4 bg-gray-50 p-5 rounded-xl shadow hover:shadow-md transition"> <a href="/xwdt/15463.html" class="sm:w-32 w-full"> <img src="/img/29.jpg" alt="디지털 화폐 마케팅은 브랜드가 시장에서 성공하는 데 어떻게 도움이 되나요?" class="w-full h-40 sm:h-24 object-cover rounded-lg"> </a> <div class="flex-1"> <a href="/xwdt/15463.html"> <h3 class="text-base font-semibold text-blue-800 hover:underline">디지털 화폐 마케팅은 브랜드가 시장에서 성공하는 데 어떻게 도움이 되나요?</h3> </a> <p class="text-sm text-gray-600 mt-1 line-clamp-2">디지털 화폐 마케팅은 브랜드가 시장에서 성공하는 데 어떻게 도움이 되나요? 디지털 화폐 마케팅은 브랜드가 고객과의 연결을 강화하고, 효율적인 마케팅 전략을 구축하는 데 큰 도움을 줍니다. 디지털 화폐는 전자상거래와 결제를 편리하게 만들어, 고객들은 쉽게 제품이나 서비스를 구매할 수 있습...</p> <div class="text-xs text-gray-500 mt-2 flex justify-between"> <span>2025-08-01</span> <span>2094 조회</span> </div> </div> </div> <div class="flex flex-col sm:flex-row items-start gap-4 bg-gray-50 p-5 rounded-xl shadow hover:shadow-md transition"> <a href="/xwdt/16712.html" class="sm:w-32 w-full"> <img src="/img/54.jpg" alt="암호화폐 홍보는 사용자 증가에 어떤 영향을 미치나요?" class="w-full h-40 sm:h-24 object-cover rounded-lg"> </a> <div class="flex-1"> <a href="/xwdt/16712.html"> <h3 class="text-base font-semibold text-blue-800 hover:underline">암호화폐 홍보는 사용자 증가에 어떤 영향을 미치나요?</h3> </a> <p class="text-sm text-gray-600 mt-1 line-clamp-2">암호화폐 홍보는 사용자 증가에 어떤 영향을 미치나요? 이 질문은 최근 암호화폐 시장에서 중요한 주제 중 하나입니다. 많은 암호화폐 프로젝트들이 사용자 확장을 목표로 홍보 활동을 강화하고 있습니다.암호화폐 홍보는 사용자 증가에 큰 영향을 미칩니다. 특히, 효과적인 마케팅 전략은 새로운 사...</p> <div class="text-xs text-gray-500 mt-2 flex justify-between"> <span>2025-08-03</span> <span>522 조회</span> </div> </div> </div> <div class="flex flex-col sm:flex-row items-start gap-4 bg-gray-50 p-5 rounded-xl shadow hover:shadow-md transition"> <a href="/xwdt/16739.html" class="sm:w-32 w-full"> <img src="/img/37.jpg" alt="고급 필수 사항: 블록체인 디지털 마케팅 마스터하기" class="w-full h-40 sm:h-24 object-cover rounded-lg"> </a> <div class="flex-1"> <a href="/xwdt/16739.html"> <h3 class="text-base font-semibold text-blue-800 hover:underline">고급 필수 사항: 블록체인 디지털 마케팅 마스터하기</h3> </a> <p class="text-sm text-gray-600 mt-1 line-clamp-2">고급 필수 사항: 블록체인 디지털 마케팅 마스터하기블록체인 기술이 디지털 마케팅 분야에서 점점 더 중요한 역할을 하고 있습니다. 이 변화는 단순히 새로운 트렌드가 아닌, 기업들이 미래의 경쟁력을 확보하기 위한 필수 요소로 자리 잡고 있습니다. 이 글에서는 블록체인 디지털 마케팅을 효과적...</p> <div class="text-xs text-gray-500 mt-2 flex justify-between"> <span>2025-08-03</span> <span>8685 조회</span> </div> </div> </div> <div class="flex flex-col sm:flex-row items-start gap-4 bg-gray-50 p-5 rounded-xl shadow hover:shadow-md transition"> <a href="/xwdt/13625.html" class="sm:w-32 w-full"> <img src="/img/15.jpg" alt="플랫폼과 홍보를 결합한 무한한 가능성을 탐험하세요" class="w-full h-40 sm:h-24 object-cover rounded-lg"> </a> <div class="flex-1"> <a href="/xwdt/13625.html"> <h3 class="text-base font-semibold text-blue-800 hover:underline">플랫폼과 홍보를 결합한 무한한 가능성을 탐험하세요</h3> </a> <p class="text-sm text-gray-600 mt-1 line-clamp-2">플랫폼과 홍보를 결합한 무한한 가능성을 탐험하세요소셜 미디어 플랫폼의 발전으로 인해 마케팅 전략이 점점 더 중요해지고 있습니다. 이제는 단순히 제품이나 서비스를 소개하는 것 이상이 필요합니다. 플랫폼과 홍보를 결합한 전략을 통해 무한한 가능성을 탐험할 수 있습니다.첫째, 다양한 플랫폼을...</p> <div class="text-xs text-gray-500 mt-2 flex justify-between"> <span>2025-07-30</span> <span>905 조회</span> </div> </div> </div> <div class="flex flex-col sm:flex-row items-start gap-4 bg-gray-50 p-5 rounded-xl shadow hover:shadow-md transition"> <a href="/xwdt/18939.html" class="sm:w-32 w-full"> <img src="/img/40.jpg" alt="월간 노출 수가 0에서 수백만에 달하는 블록체인 프로젝트를 홍보하는 방법은 무엇입니까?" class="w-full h-40 sm:h-24 object-cover rounded-lg"> </a> <div class="flex-1"> <a href="/xwdt/18939.html"> <h3 class="text-base font-semibold text-blue-800 hover:underline">월간 노출 수가 0에서 수백만에 달하는 블록체인 프로젝트를 홍보하는 방법은 무엇입니까?</h3> </a> <p class="text-sm text-gray-600 mt-1 line-clamp-2">월간 노출 수가 0에서 수백만에 달하는 블록체인 프로젝트를 홍보하는 방법은 무엇입니까? 이 질문은 많은 블록체인 개발자들이 마주치는 현실입니다. 프로젝트의 초기 단계에서는 아무도 관심을 보이지 않을 수 있지만, 시간이 지나면서 그 중요성과 가치가 인식되면 수많은 사람들에게 알려질 수 있...</p> <div class="text-xs text-gray-500 mt-2 flex justify-between"> <span>2025-08-06</span> <span>4092 조회</span> </div> </div> </div> </div> </div> </section> <script> function copyCurrentUrl() { const url = window.location.href; navigator.clipboard.writeText(url).then(() => { alert("링크가 복사되었습니다!"); }); } </script> <!-- Footer --> <footer class="bg-dark text-white pt-16 pb-8"> <div class="container mx-auto px-4"> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8 mb-12"> <!-- Company Info --> <div> <a href="#" class="flex items-center space-x-2 mb-6"> <div class="w-10 h-10 rounded-lg bg-white flex items-center justify-center"> <i class="fa fa-cube text-primary text-xl"></i> </div> <span class="text-xl font-bold text-white">GlobalChainPR<span class="text-primary">News</span></span> </a> <p class="text-white/70 mb-6">Your trusted source for the latest news, insights, and developments in Web3 and blockchain technology.</p> <div class="flex space-x-4"> <a href="#" class="w-10 h-10 rounded-full bg-dark-light/20 flex items-center justify-center hover:bg-primary transition-colors"> <i class="fab fa-twitter text-white"></i> </a> <a href="#" class="w-10 h-10 rounded-full bg-dark-light/20 flex items-center justify-center hover:bg-primary transition-colors"> <i class="fab fa-linkedin text-white"></i> </a> <a href="https://t.me/LianPR1" target="_blank" class="w-10 h-10 rounded-full bg-dark-light/20 flex items-center justify-center hover:bg-primary transition-colors"> <i class="fab fa-telegram text-white"></i> </a> </div> </div> <!-- Quick Links --> <div> <h3 class="text-lg font-semibold mb-6">Quick Links</h3> <ul class="space-y-3"> <li><a href="/" class="text-white/70 hover:text-primary transition-colors">Home</a></li> <li><a href="/cpyfw/" class="text-white/70 hover:text-primary transition-colors">Global Media Package</a></li> <li><a href="/web3mt/" class="text-white/70 hover:text-primary transition-colors">web3 media</a></li> <li><a href="/xwdt/" class="text-white/70 hover:text-primary transition-colors">News & Updates</a></li> <li><a href="/lxwm/" class="text-white/70 hover:text-primary transition-colors">Contact us</a></li> </ul> </div> <!-- Resources --> <div> <h3 class="text-lg font-semibold mb-6">Terms of Service</h3> <ul class="space-y-3"> <li><a href="/ptgz/" class="text-white/70 hover:text-primary transition-colors">Platform Rules</a></li> <li><a href="/yhxy/" class="text-white/70 hover:text-primary transition-colors">User Agreement</a></li> <li><a href="/sitemap.xml" class="text-white/70 hover:text-primary transition-colors">Site Map</a></li> </div> <!-- Contact --> <div> <h3 class="text-lg font-semibold mb-6">Contact Us</h3> <ul class="space-y-3"> <a href="https://t.me/LianPR1" target="_blank"><li class="flex items-start space-x-3"> <i class="fab fa-telegram text-primary mt-1"></i> <span class="text-white/70">@LianPR1</span> </li></a> <li class="flex items-center space-x-3"> <i class="fa fa-envelope text-primary"></i> <a href="lemon@lianpr.com" class="text-white/70 hover:text-primary transition-colors">lemon@lianpr.com</a> </li> <li class="flex items-center space-x-3"> <i class="fa fa-phone text-primary"></i> <a href="tel:+1234567890" class="text-white/70 hover:text-primary transition-colors">+86 13415525104</a> </li> </ul> </div> </div> <div class="border-t border-white/10 pt-8"> <div class="flex flex-col md:flex-row justify-between items-center"> <p class="text-white/50 text-sm mb-4 md:mb-0">© 2025 GlobalChainPR Web3 News Express All Rights Reserved</p> <div class="flex space-x-6"> <a href="#" class="text-white/50 text-sm hover:text-primary transition-colors">Privacy Policy</a> <a href="#" class="text-white/50 text-sm hover:text-primary transition-colors">Terms of Service</a> </div> </div> </div> </div> </footer> <!-- Back to Top Button --> <button id="back-to-top" class="fixed bottom-6 right-6 w-12 h-12 rounded-full bg-primary text-white shadow-lg flex items-center justify-center opacity-0 invisible transition-all duration-300 hover:bg-primary/90"> <i class="fa fa-chevron-up"></i> </button> <script src="/template/pc/static/js/aos.js"></script> <script> AOS.init({ once: true, // 只触发一次 duration: 800, // 动画时长(毫秒) offset: 100 // 提前触发距离(像素) }); </script> <script> const counters = document.querySelectorAll('.counter'); const speed = 200; // 越小越快 const runCounters = () => { counters.forEach(counter => { const updateCount = () => { const target = +counter.getAttribute('data-target'); const count = +counter.innerText; const increment = Math.ceil(target / speed); if (count < target) { counter.innerText = count + increment; setTimeout(updateCount, 20); } else { counter.innerText = target; } }; updateCount(); }); }; // 启动条件:滚动进视口时触发 const section = document.querySelector('section'); let animated = false; const observer = new IntersectionObserver(entries => { entries.forEach(entry => { if (entry.isIntersecting && !animated) { runCounters(); animated = true; } }); }, { threshold: 0.3 }); observer.observe(section); </script> <style> /* CSS 样式同原版,无需修改 */ .kf-chat-container { width: 90%; max-width: 400px; background-color: #fff; border-radius: 10px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); overflow: hidden; position: fixed; bottom: 20px; right: 5px; display: block; z-index: 99999; } .kf-chat-header { background-color: #2196f3; color: #fff; padding: 10px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 14px; } .kf-chat-header .kf-title { margin: 0; } .kf-chat-header .kf-buttons { display: flex; padding: 0 10px; } .kf-chat-header .kf-buttons button { background: none; border: none; color: #fff; font-size: 16px; cursor: pointer; margin-left: 5px; } .kf-chat-header .kf-buttons button:hover { color: #ddd; } .kf-chat-body { height: 300px; padding: 10px; overflow-y: auto; border-bottom: 1px solid #ddd; font-size: 14px; } .kf-chat-input { display: flex; padding: 10px; font-family: Arial, sans-serif; } .kf-chat-input input { flex: 1; padding: 8px; border: 1px solid #ddd; border-radius: 5px; margin-right: 10px; transition: border-color 0.3s ease; } .kf-chat-input input:focus { border-color: #2196f3; outline: none; } .kf-chat-input button { padding: 8px 15px; background-color: #2196f3; color: #fff; border: none; border-radius: 5px; cursor: pointer; } .kf-chat-input button:hover { background-color: #0056b3; } .kf-message { margin: 10px 0; display: flex; align-items: flex-start; } .kf-user { display: flex; justify-content: flex-end; } .kf-user .kf-text { align-items: flex-end; margin-right: 10px; background: #e3f2fd; /* 用户消息浅蓝色背景 */ border-radius: 8px 8px 0 8px; padding: 8px 12px; } .kf-bot .kf-text { background: #f5f7fa; /* 客服消息浅灰色背景 */ border-radius: 8px 8px 8px 0; margin-left: 10px; padding: 8px 12px; } .kf-message img { width: 30px; height: 30px; border-radius: 50%; margin-right: 10px; overflow: revert; } .kf-message .kf-time { font-size: 12px; color: #888; margin-bottom: 5px; } .kf-message .kf-text { display: flex; flex-direction: column; align-items: flex-start; background: #f5f7fa; /* 默认浅灰背景 */ border-radius: 8px; padding: 8px 12px; max-width: 75%; box-sizing: border-box; word-break: break-word; } .kf-user .kf-text { align-items: flex-end; background: #e3f2fd; /* 用户消息浅蓝色背景 */ border-radius: 8px 8px 0 8px; margin-right: 10px; } .kf-bot .kf-text { background: #f5f7fa; /* 客服消息浅灰色背景 */ border-radius: 8px 8px 8px 0; margin-left: 10px; } .kf-chat-toggle { position: fixed; bottom: 100px; right: 20px; width: 50px; height: 50px; background-color: #2196f3; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); display: none; } .kf-chat-toggle img { width: 53px; height: 53px; border-radius: 50%; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } @media (max-width: 600px) { .kf-chat-container { width: 95%; max-width: 100%; } .kf-chat-header { padding: 10px 5px; } .kf-chat-header .kf-title { font-size: 16px; padding: 0 10px; } .kf-chat-header .kf-buttons button { font-size: 14px; } .kf-chat-body { height: 400px; } .kf-message .kf-time { font-size: 10px; margin-bottom: 4px; } } </style> <div class="kf-chat-toggle" onclick="toggleChat()"> <img src="https://kf.lianpr.com/img/touxiang.png" alt="客服头像"> </div> <div class="kf-chat-container" id="kf-chat-container" style="display: none;"> <div class="kf-chat-header" onclick="toggleChat()"> <h3 class="kf-title">在线咨询</h3> <div class="kf-buttons"> <button onclick="closeChat(event)">×</button> </div> </div> <div class="kf-chat-body" id="kf-chat-body"></div> <div class="kf-chat-input"> <input type="text" id="kf-user-input" placeholder="输入你的问题..." onkeypress="handleKeyPress(event)"> <button onclick="sendMessage()">发送</button> </div> </div> <script> const rules = { "hello": "你好!有什么我可以帮你的吗?", "人工": "系统已为你记录你的问题,你可以留下你的联系方式方便我们找你沟通,如果你要在线沟通服务,请联系Telegram:<a href='https://t.me/LianPR1' target='_blank' style='color: #005aff;font-size: 16px;' rel='nofollow'>点此进入</a>", "客服": "系统已为你记录你的问题,你可以留下你的联系方式方便我们找你沟通,如果你要在线沟通服务,请联系Telegram:<a href='https://t.me/LianPR1' target='_blank' style='color: #005aff;font-size: 16px;' rel='nofollow'>点此进入</a>", "default": "系统已为你记录你的问题,你可以留下你的联系方式方便我们找你沟通,如果你要在线沟通服务,请联系Telegram:<a href='https://t.me/LianPR1' target='_blank' style='color: #005aff;font-size: 16px;' rel='nofollow'>点此进入</a>" }; async function getAIResponse(input) { try { const res = await fetch('/api-chat.php', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, body: `message=${encodeURIComponent(input)}` }); const data = await res.json(); if (data && data.choices && data.choices.length > 0) { return data.choices[0].message.content; } return null; } catch (e) { console.error('AI接口异常', e); return null; } } function getResponse(input) { const phoneRegex = /^1[3-9]\d{9}$/; const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; if (phoneRegex.test(input) || emailRegex.test(input)) { return "好的,您的信息我们已经记录,稍后会尽快联系您。"; } input = input.toLowerCase(); for (const key in rules) { if (input.includes(key)) { if (key === "人工") { return `<p>${rules[key]}</p><img class="wechat-qr-img" src="https://kf.lianpr.com/img/wx.png" alt="WeChat QR Code" style="width: 200px; height: auto; border-radius: inherit;">`; } return rules[key]; } } return rules["default"]; } async function sendMessage() { const inputEl = document.getElementById('kf-user-input'); const inputValue = inputEl.value.trim(); if (!inputValue) return; const bodyEl = document.getElementById('kf-chat-body'); const userMessage = document.createElement('div'); userMessage.className = 'kf-message kf-user'; userMessage.innerHTML = ` <div class="kf-text"> <div class="kf-time">${getCurrentTime()}</div> <div>${escapeHTML(inputValue)}</div> </div> <img src="https://kf.lianpr.com/img/yonghu.png" alt="用户头像"> `; bodyEl.appendChild(userMessage); inputEl.value = ''; // 立即清空输入框 bodyEl.scrollTop = bodyEl.scrollHeight; // 自动滚动到底部 // 判断是否命中预设问答 let presetReply = getResponse(inputValue); let botReply; if ( presetReply !== rules["default"] && !(inputValue.toLowerCase() === "" || presetReply === "") ) { botReply = presetReply; } else { botReply = await getAIResponse(inputValue) || presetReply; } // 逐字输出机器人回复 const botMessage = document.createElement('div'); botMessage.className = 'kf-message kf-bot'; botMessage.innerHTML = ` <img src="https://kf.lianpr.com/img/touxiang.png" alt="客服头像"> <div class="kf-text"> <div class="kf-time">${getCurrentTime()}</div> <div class="kf-bot-typing"></div> </div> `; bodyEl.appendChild(botMessage); bodyEl.scrollTop = bodyEl.scrollHeight; // 处理HTML标签(如预设问答带有a标签或img标签时直接输出,不逐字) const typingEl = botMessage.querySelector('.kf-bot-typing'); // 过滤掉 ### 和 ** botReply = botReply.replace(/[#*]/g, ''); if (/<[a-z][\s\S]*>/i.test(botReply)) { typingEl.innerHTML = botReply; } else { typingEl.innerHTML = botReply.replace(/\n/g, '<br>'); } bodyEl.scrollTop = bodyEl.scrollHeight; // ✅ 翻译机器人回复 if (typeof translate !== 'undefined' && typeof translate.execute === 'function') { translate.execute(); } fetch('https://kf.lianpr.com/save_message.php', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, body: `message=${encodeURIComponent(inputValue)}&url=${encodeURIComponent(window.location.href)}&ip=${encodeURIComponent(getClientDeviceType())}&referrer=${encodeURIComponent(document.referrer)}` }).then(res => res.json()) .then(data => { if (data.status === 'success') { console.log('Message saved successfully'); } else { console.error('Failed to save message:', data.message); } }).catch(error => console.error('Error sending message:', error)); } function toggleChat() { const container = document.getElementById('kf-chat-container'); const toggleBtn = document.querySelector('.kf-chat-toggle'); const isHidden = container.style.display === 'none'; container.style.display = isHidden ? 'block' : 'none'; toggleBtn.style.display = isHidden ? 'none' : 'flex'; } function closeChat(event) { event.stopPropagation(); toggleChat(); window.__kfChatAutoOpened = true; } function getCurrentTime() { const now = new Date(); return `${now.getHours().toString().padStart(2, '0')}:${now.getMinutes().toString().padStart(2, '0')}`; } function escapeHTML(str) { return str.replace(/&/g, '&') .replace(/</g, '<') .replace(/>/g, '>') .replace(/"/g, '"') .replace(/'/g, '''); } function getClientDeviceType() { return /Android|webOS|iPhone|iPad|iPod|Windows Phone/i.test(navigator.userAgent) ? "Mobile" : "Desktop"; } function handleKeyPress(event) { if (event.key === 'Enter') { sendMessage(); } } window.onload = function () { const bodyEl = document.getElementById('kf-chat-body'); const welcome = document.createElement('div'); welcome.className = 'kf-message kf-bot'; welcome.innerHTML = ` <img src="https://kf.lianpr.com/img/touxiang.png" alt="客服头像"> <div class="kf-text"> <div class="kf-time">${getCurrentTime()}</div> <div>你好!有什么我可以帮你的吗?</div> </div> `; bodyEl.appendChild(welcome); setTimeout(() => { const second = document.createElement('div'); second.className = 'kf-message kf-bot'; second.innerHTML = ` <img src="https://kf.lianpr.com/img/touxiang.png" alt="客服头像"> <div class="kf-text"> <div class="kf-time">${getCurrentTime()}</div> <div>如果您有任何问题,请添加whatsapp或Telegram。<br> 微信: <img src="https://kf.lianpr.com/img/wx.png" alt="二维码" style="width: 200px; height: auto; border-radius: inherit;"><br> Telegram:<a href="https://t.me/LianPR1" target="_blank" style="color: #005aff;font-size: 20px;">https://t.me/LianPR1</a><br> whatsapp:<a href="https://wa.me/8615820667513" target="_blank" style="color: #005aff;font-size: 20px;">https://wa.me/8615820667513</a></div> </div> `; // <img src="https://kf.lianpr.com/img/wx.png" alt="二维码" style="width: 200px; height: auto; border-radius: inherit;"> bodyEl.appendChild(second); // ✅ 翻译欢迎提示内容 if (typeof translate !== 'undefined' && typeof translate.execute === 'function') { translate.execute(); } }, 3000); const container = document.getElementById('kf-chat-container'); const toggleBtn = document.querySelector('.kf-chat-toggle'); if (getClientDeviceType() === "Mobile") { container.style.display = 'none'; toggleBtn.style.display = 'flex'; window.__kfChatAutoOpened = false; setTimeout(() => { if (!window.__kfChatAutoOpened) { container.style.display = 'block'; toggleBtn.style.display = 'none'; window.__kfChatAutoOpened = true; } }, 10000); } else { container.style.display = 'block'; toggleBtn.style.display = 'none'; window.__kfChatAutoOpened = true; } }; </script> <!-- 多语言 --> <script> // Mobile menu toggle const mobileMenuButton = document.getElementById('mobile-menu-button'); const mobileMenu = document.getElementById('mobile-menu'); mobileMenuButton.addEventListener('click', () => { mobileMenu.classList.toggle('hidden'); }); // Sticky header const header = document.getElementById('main-header'); let lastScrollY = window.scrollY; window.addEventListener('scroll', () => { if (window.scrollY > 50) { header.classList.add('shadow-md'); header.classList.add('bg-white/95'); header.classList.add('backdrop-blur-sm'); } else { header.classList.remove('shadow-md'); header.classList.remove('bg-white/95'); header.classList.remove('backdrop-blur-sm'); } lastScrollY = window.scrollY; }); // Back to top button const backToTopButton = document.getElementById('back-to-top'); window.addEventListener('scroll', () => { if (window.scrollY > 300) { backToTopButton.classList.remove('opacity-0'); backToTopButton.classList.remove('invisible'); } else { backToTopButton.classList.add('opacity-0'); backToTopButton.classList.add('invisible'); } }); backToTopButton.addEventListener('click', () => { window.scrollTo({ top: 0, behavior: 'smooth' }); }); // Smooth scroll for anchor links document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', function (e) { e.preventDefault(); document.querySelector(this.getAttribute('href')).scrollIntoView({ behavior: 'smooth' }); }); }); </script> <script src="/template/pc/static/js/translate.js"></script> <script> translate.selectLanguageTag.show = false; // 不显示默认select translate.service.use('client.edge'); // 设置翻译通道 translate.language.setDefaultTo('english'); // 设置默认语言 translate.language.translateLocal = true; // 启用本地翻译(不远程请求) translate.execute(); // 执行翻译 </script> <script type="text/javascript">var root_dir="";var ey_aid=156548;</script> <script language="javascript" type="text/javascript" src="/public/static/common/js/ey_footer.js?v=v1.7.5"></script> </body> </html>