Skip to article
Selldone.
Menu
创建您的电子商务
Selldone 商业操作系统杂志

如何创建适用于多个国家的动态推荐登录页面

内容列表
如果您正在与联盟合作,并且在每个国家使用不同的域名运营您的电子商务商店,那么建立一个简洁且优化转化的登录页面非常重要,该页面可以根据联盟推荐代码自动适应。
AI Created Landing Page with Dynamic Affiliate Links
AI Created Landing Page with Dynamic Affiliate Links
在这篇简短的教程中,我们将展示如何为您的联盟创建一个简单而响应性良好的登录页面,能够自动将推荐代码(ref)传递到特定国家的域名,如:
  • 🇺🇸 en.selldone.com
  • 🇬🇧 uk.selldone.com
  • 🇩🇰 da.selldone.com
  • 🇫🇷 fr.selldone.com
当您使用不同国家的独立商店并希望保持您的联盟链接居中时,此设置非常理想。

🎨 我们在构建什么

  • 一个简单却时尚的登录页面,具有:
  • 标题:“尊贵时尚”
  • 副标题:“选择您的国家以开始购物...”
  • 四个大型国家按钮,每个按钮都有该国的国旗
  • 自动从URL处理推荐代码
以下是最终结果(向下滚动查看代码):

✅ HTML + JS 代码(可直接使用)

您可以将以下代码复制粘贴到任何.html文件中然后在您的服务器上托管:
HTML
<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <title>Selldone Fashion</title>
  <style>
    body {
      font-family: 'Inter', sans-serif;
      background-color: #f9f9f9;
      margin: 0;
      padding: 0;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
      color: #222;
    }

    main {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 2rem 1rem;
    }

    h1 {
      font-size: 2.5rem;
      margin-bottom: 0.5rem;
    }

    p.instruction {
      font-size: 1.1rem;
      margin-bottom: 2rem;
      color: #555;
    }

    .buttons {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      width: 100%;
      max-width: 400px;
    }

    .country-button {
      padding: 1.2rem;
      font-size: 1.25rem;
      background-color: #fff;
      border: 2px solid #ddd;
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.2s ease;
      text-decoration: none;
      color: #222;
      text-align: center;
    }

    .country-button:hover {
      background-color: #eee;
      border-color: #ccc;
    }

    @media (min-width: 600px) {
      .buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
      }

      .country-button {
        flex: 1 1 40%;
      }
    }

    footer {
      padding: 1rem;
      text-align: center;
      font-size: 0.9rem;
      color: #888;
      border-top: 1px solid #eee;
      background-color: #fafafa;
    }
  </style>
</head>
<body>

  <main>
    <h1>Selldone Fashion</h1>
    <p class="instruction">Select your country to start shopping...</p>

    <div class="buttons">
      <a id="btn-us" class="country-button">🇺🇸 United States</a>
      <a id="btn-de" class="country-button">🇩🇪 Germany</a>
      <a id="btn-dk" class="country-button">🇩🇰 Denmark</a>
      <a id="btn-fr" class="country-button">🇫🇷 France</a>
    </div>
  </main>

  <footer>
    © <span id="year"></span> Selldone. All rights reserved.
  </footer>

  <script>
    function getRefParam() {
      const params = new URLSearchParams(window.location.search);
      return params.get("ref") || "";
    }

    const ref = getRefParam();

    document.getElementById("btn-us").href = `https://en.selldone.com?ref=${ref}`;
    document.getElementById("btn-de").href = `https://de.selldone.com?ref=${ref}`;
    document.getElementById("btn-dk").href = `https://da.selldone.com?ref=${ref}`;
    document.getElementById("btn-fr").href = `https://fr.selldone.com?ref=${ref}`;

    // Set current year in footer
    document.getElementById("year").textContent = new Date().getFullYear();
  </script>

</body>
</html>

🔧 工作原理

  • 推荐代码提取: 我们使用URLSearchParams从当前URL中获取ref参数。
  • 动态重定向:当用户点击按钮时,脚本将他们重定向到相应的国家域名并自动传递ref代码。
  • 响应式设计:布局是移动友好的,具有大而易接触的按钮。使用Flexbox确保一致的大小。

💡 为什么这很有用

  • 一个链接适合所有联盟:他们只需链接到 xyz.com/?ref=XXXX。
  • 本地化体验:客户会被重定向至与其所在地区匹配的商店域名。
  • 不需要后台:这是一个静态,完全客户端的解决方案。

🔗 示例URL

访问:
https://xyz.com/?ref=AFF12345

点击🇩🇰 丹麦按钮会重定向到:
https://da.selldone.com/?ref=AFF12345

🚀 下一步

  1. 将此页面嵌入您的联盟文档中。
  2. 与您的合作伙伴共享基础链接:https://xyz.com/?ref=您的代码。
  3. 您以后可以使用相同的格式扩展按钮列表添加更多国家。

在ChatGPT中自定义您的登录页面

您可以使用以下链接在ChatGPT中根据您的需要自定义此页面:

⚡ 如何部署页面

您有两种简单的选择来发布您的动态推荐登录页面:

选项1. 在您的Selldone商店中部署:

登录到您的Selldone仪表板,进入页面 > 静态页面,然后创建一个文件夹(例如,affiliate)。在此文件夹中将您的HTML文件上传为index.html。然后前往域名部分,添加新的域名或子域名,并通过设置路径到affiliate文件夹将其分配到新的静态页面。

选项2. 在Cloudflare Pages上免费部署(推荐):

您也可以使用Cloudflare Pages免费托管您的页面。只需创建一个新项目,拖放您的index.html文件并部署。一旦上线,在Cloudflare中分配一个自定义子域(或域),使页面在网上访问。 这两种方法都允许您共享一个品牌化、快速加载的推荐页面,其中包含推荐追踪功能。

FAQ

我应该为联盟登录页面使用主商店域名吗?
使用新的子域(如start.yourstore.com)来针对登录页面会更好,并保持主域专注于您的商店。这有助于保护您的SEO并保持条理清晰。无须编辑登录页面的HTML,只需将其部署在新的子域下,它就会自动与推荐代码配合工作。
添加评论

与我们分享您的想法

作者 Pajuhaan
发表于 修改于

通过市场上最好的无技术解决方案使您的业务在线。

30天退款保证

创建您的电子商务

立即开始 — 免费

告别低在线销售率!