PartnerShare
品牌主
营销方式
联盟增长找外部推广者来卖你的产品 推荐营销(老带新计划)让老用户带来新用户
使用案例
AI 工具站教程测评带来订阅转化 IP 代理服务站追踪首单、续费与佣金 电商独立站用分销和内容测评提升转化 指纹浏览器触达跨境和多账号运营人群
推广者 推广市场
导航站
跨境电商导航 AIGC 导航 全球 IP 代理导航 精选产品
价格
资源
博客增长方法、渠道拆解与产品更新 帮助中心接入文档、账户设置与常见问题 最新资讯出海营销动态与行业热点
品牌主
营销方式 联盟增长 推荐营销(老带新计划) 使用案例 AI 工具站 IP 代理服务站 电商独立站 指纹浏览器
推广者 推广市场
导航站
跨境电商导航 AIGC 导航 全球 IP 代理导航 精选产品
价格
资源
博客 帮助中心 最新资讯

选择入口

请选择适合您的身份入口。

管理产品和联盟计划 品牌主 创建产品、设置佣金规则并管理推广转化。 创建品牌主账号→ 发现好产品赚取佣金 推广者 发现高佣产品,一键获取专属推广链接。 免费入驻推广市场→ 发布产品资讯获取曝光 内容发布方 提交产品并发布资讯,获取中文内容曝光。 进入内容发布平台→

预约 1v1 演示

产品顾问将在 1 个工作日内与你约定 30 分钟在线演示,带你搭好第一个推广计划。

提交后我们会尽快与你联系。

想先自己体验?免费注册 →

提交即表示你同意 PartnerShare 为安排产品演示而联系你。

微信扫码联系

使用微信扫描二维码添加企业微信,产品顾问会尽快与你联系。

PartnerShare 企业微信二维码 PartnerShare Telegram 二维码 保存图片到本地 CHAT ON TELEGRAM
✓

申请已提交

我们会尽快联系你,安排演示和接入建议。你也可以先注册账号体验产品。

Skip to content

Getting Started

4
  • How to Launch Your Affiliate Program on PartnerShare
  • How to Create a Referral Program
  • What Is Referral Marketing / “Old-Bring-New” Program
  • What is Affiliate Marketing?
合作伙伴管理 - PartnerShare

Campaign Operations

5
  • Checking Partner Withdrawal Status
  • Withdrawal Methods Supported for Partners
  • Affiliate Management
  • Product Management
  • Campaign Management
支付与交易 - ParterShare

Payments&Transactions

2
  • Auto-Payout
  • Commission Settlement
技术集成 - PartnerShare

Account Management

2
  • Business Certification Prompts
  • Team Management
技术集成 - PartnerShare

Technical Integration

5
  • Embedding PartnerShare into Your Product
  • Conversion Event Postback
  • Click-Tracking SDK Integration
  • API Authentication & Signature Mechanism
  • PartnerShare Product-Authorized Login Integration Guide
常见问题 - PartnerShare

Frequently Asked Questions

2
  • Withdrawal FAQ
  • Legacy Help Center Entrance
快速入门 - PartnerShare

Changelog

2
  • Changelog – 2026.03.05
  • Changelog – 2026.05.15
View Categories
  • 帮助中心
  • Technical Integration
  • Click-Tracking SDK Integration

Click-Tracking SDK Integration

This SDK automatically saves promotion attribution parameters on your landing page, passes source parameters through, and automatically reports click info when conditions are met — reducing the manual work of handling URL parameters, cookies, and redirect chains.

1. SDK capability overview

Save attribution parameters: Automatically detects ps_click_id and ps_ref in the URL and writes them to cookies.

Pass through link parameters: Automatically appends the current page’s attribution parameters to in-page redirect links, reducing parameter loss along the chain.

Auto-report clicks: When ps_token is present in the URL, the page automatically calls the click-reporting endpoint after loading.

2. Installation

Add the following script to your landing page or site’s shared template — ideally at the bottom of the page or in a shared layout.

html #

<script src="https://sdk.partnershare.net/pro/sdk_v2.js"></script>

Once loaded, the SDK runs automatically — no additional initialization is needed to complete cookie writing, parameter pass-through, and auto-reporting logic.

3. Automatic processing flow

  • Step 1: Read URL parameters on the current page.
  • Step 2: Write ps_click_id and ps_ref to cookies.
  • Step 3: Listen for <a> link clicks on the page and automatically append attribution parameters to the outgoing link.
  • Step 4: When ps_token is present in the URL, automatically call the click-reporting endpoint after page load.

4. Parameter reference

4.1 Core attribution parameters #

ParameterSourcePurposeDescription
ps_click_idPartnerShare referral linkClick attributionA click-tracking ID identifying a specific click, used primarily for attributing later signup/payment events
ps_refPartnerShare referral linkInvite-code attributionThe referral invite code, used to supplement attribution when a click ID isn’t available

4.2 Auto-report parameter #

ParameterPurposeAuto-written to cookie?Description
ps_tokenTriggers auto click-reportingNoWhen present in the page URL, the SDK automatically calls the click-reporting endpoint after page load

5. Cookie reference

Cookie nameDescription
ps_click_idStores the click-attribution ID, read later during signup or event postback
ps_refStores the invite-code attribution info, read later on the landing page or during event postback

By default the SDK writes cookies with path=/, SameSite=Lax. If the page runs over standard HTTPS, the browser will handle the security attributes per current rules.

6. Simplified flow diagram

  1. Referral link visit — The user arrives at your landing page via a PartnerShare referral link.
  2. SDK captures parameters — After the page loads, it automatically reads the attribution parameters from the URL (ps_click_id, ps_ref).
  3. Save and pass through — Attribution parameters are written to cookies and automatically appended to in-site redirect links.
  4. Business conversion reads them — At signup, payment, or other key moments, the business layer reads the attribution parameters and submits them to its backend.
  5. Event postback — The business backend reports the conversion result back to PartnerShare via the conversion-reporting endpoint.

7. Recommended deployment

We recommend deploying the SDK on all promotion landing pages, signup pages, and key redirect pages, to maximize the chance that ps_click_id and ps_ref are preserved.

If your page redirects to a signup page, payment page, or other in-site page, make sure those links use standard <a> tags so the SDK can automatically pass through the parameters.

8. Reading attribution parameters in your own code

Before reporting a signup or payment event, the brand’s server-side typically needs to first read the attribution parameters from the frontend cookies and submit them to its own backend.

javascript #

function getCookie(name) {
  const match = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)'));
  return match ? decodeURIComponent(match[2]) : '';
}

const clickId = getCookie('ps_click_id');
const inviteCode = getCookie('ps_ref');

console.log({ clickId, inviteCode });

9. Common notes

The SDK only auto-passes through ps_click_id and ps_ref if they’re present in the current URL — it won’t auto-fill other custom parameters.

Auto click-reporting depends on ps_token being present in the URL; if the page doesn’t have that parameter, the SDK won’t proactively call the click-reporting endpoint.

If your page navigation happens via frontend routing, button scripts, or async logic, we recommend manually reading the cookie and re-appending the parameters in that logic rather than relying entirely on native link listeners.

For subsequent signup, payment, or other conversion events, use this together with the [Event Postback] endpoint to complete the full attribution → reward → settlement loop.This SDatically saves promotion attribution parameters on your landing page, passes source parameters through, and automatically reports click info when conditions are met — reducing the manual work of handling URL parameters, cookies, and redirect chains.

1. SDK capability overview

Save attribution parameters: Automatically detects ps_click_id and ps_ref in the URL and writes them to cookies.

Pass through link parameters: Automatically appends the current page’s attribution parameters to in-page redirect links, reducing parameter loss along the chain.

Auto-report clicks: When ps_token is present in the URL, the page automatically calls the click-reporting endpoint after loading.

2. Installation Add the following script to your landing page or site’s shared template — ideally at the bottom of the page or in a shared layout.

html

<script src="https://sdk.partnershare.net/pro/sdk_v2.js"></script>

Once loaded, the SDK runs automatically — no additional initialization is needed to complete cookie writing, parameter pass-through, and auto-reporting logic.

3. Automatic processing flow

Step 1: Read URL parameters on the current page. Step 2: Write ps_click_id and ps_ref to cookies. Step 3: Listen for <a> link clicks on the page and automatically append attribution parameters to the outgoing link. Step 4: When ps_token is present in the URL, automatically call the click-reporting endpoint after page load.

4. Parameter reference

4.1 Core attribution parameters

ParameterSourcePurposeDescription
ps_click_idPartnerShare referral linkClick attributionA click-tracking ID identifying a specific click, used primarily for attributing later signup/payment events
ps_refPartnerShare referral linkInvite-code attributionThe referral invite code, used to supplement attribution when a click ID isn’t available

4.2 Auto-report parameter

ParameterPurposeAuto-written to cookie?Description
ps_tokenTriggers auto click-reportingNoWhen present in the page URL, the SDK automatically calls the click-reporting endpoint after page load

5. Cookie reference

Cookie nameDescription
ps_click_idStores the click-attribution ID, read later during signup or event postback
ps_refStores the invite-code attribution info, read later on the landing page or during event postback

By default the SDK writes cookies with path=/, SameSite=Lax. If the page runs over standard HTTPS, the browser will handle the security attributes per current rules.

6. Simplified flow diagram

  1. Referral link visit — The user arrives at your landing page via a PartnerShare referral link.
  2. SDK captures parameters — After the page loads, it automatically reads the attribution parameters from the URL (ps_click_id, ps_ref).
  3. Save and pass through — Attribution parameters are written to cookies and automatically appended to in-site redirect links.
  4. Business conversion reads them — At signup, payment, or other key moments, the business layer reads the attribution parameters and submits them to its backend.
  5. Event postback — The business backend reports the conversion result back to PartnerShare via the conversion-reporting endpoint.

7. Recommended deployment We recommend deploying the SDK on all promotion landing pages, signup pages, and key redirect pages, to maximize the chance that ps_click_id and ps_ref are preserved.

If your page redirects to a signup page, payment page, or other in-site page, make sure those links use standard <a> tags so the SDK can automatically pass through the parameters.

8. Reading attribution parameters in your own code Before reporting a signup or payment event, the brand’s server-side typically needs to first read the attribution parameters from the frontend cookies and submit them to its own backend.

javascript

function getCookie(name) {
  const match = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)'));
  return match ? decodeURIComponent(match[2]) : '';
}

const clickId = getCookie('ps_click_id');
const inviteCode = getCookie('ps_ref');

console.log({ clickId, inviteCode });

9. Common notes The SDK only auto-passes through ps_click_id and ps_ref if they’re present in the current URL — it won’t auto-fill other custom parameters.

Auto click-reporting depends on ps_token being present in the URL; if the page doesn’t have that parameter, the SDK won’t proactively call the click-reporting endpoint.

If your page navigation happens via frontend routing, button scripts, or async logic, we recommend manually reading the cookie and re-appending the parameters in that logic rather than relying entirely on native link listeners.

For subsequent signup, payment, or other conversion events, use this together with the [Event Postback] endpoint to complete the full attribution → reward → settlement loop.

Updated on 26/08/2026

Share This Article :
  • Facebook
  • X
  • LinkedIn
  • Pinterest
API Authentication & Signature MechanismConversion Event Postback
大纲
  • html
  • 4.1 Core attribution parameters
  • 4.2 Auto-report parameter
    • javascript
PartnerShare

帮出海 SaaS 找到推广者、跑起联盟、放大用户推荐。先免费接入,跑出数据再升级。 Find promoters, run affiliate, and turn user referrals into a tracked growth channel. Start free, upgrade after data.

产品 Product

  • 联盟增长Affiliate growth
  • 邀返系统Referral program
  • 推广市场Marketplace
  • 价格Pricing

资源 Resources

  • 博客Blog
  • 帮助中心Help center
  • 最新资讯Latest news

导航站 Directory

  • 跨境电商导航Cross-border Ecommerce Directory
  • AIGC 导航AIGC Directory
  • 全球 IP 代理导航Global IP Proxy Directory
  • 精选产品Featured Products

联系方式 Contact

联系Contact business@partnershare.net
PartnerShare 公众号二维码
in XHS

版权所有© 广州标品科技创新有限公司, SAASBASE PTE. LTD. 丨 粤ICP备2022116046号 © Guangzhou Biaopin Technology Innovation Co., Ltd., SAASBASE PTE. LTD. · ICP 2022116046

服务协议Terms of Service 隐私政策Privacy