渠道代理postaffiliate站点简单配置

做外贸站如果需要做线上渠道代理跟踪,国外很多站点都是使用postaffiliatePro 

虽然postaffiliate收费,但是跟踪数据很准确。

下面说下如何进行相关配置:

1、站点strip配置 (可参考 https://www.postaffiliatepro.com/integration-methods/integration/stripe/ )
注册绑卡提交表单时,获取pap_custom的值(没有值时默认为0),保存到数据库用户表跟用户绑定,
stripe传token时,同时把pap_custom的值到stripe,Stripe_Customer::create定义一个”description” => $_POST[‘pap_custom’]的description字段(这样通过stripe可以查询对应的用户)

2、跟踪点击事件 (可参考 https://support.qualityunit.com/417400-Clicks-referrals-tracking?_ga=2.164862399.1233019864.1523947211-407881631.1523427058)
需要在所有页面添加点击的跟踪代码

具体跟踪代码如下
<!– PAP Settings –>

<input type=”hidden” name=”pap_custom” value=”” id=”pap_tdx8v2s5a” />

<script id=”pap_x2s6df8d” src=”https://***.postaffiliatepro.com/scripts/salejs.php” type=”text/javascript”>
</script>
<script type=”text/javascript”>
PostAffTracker.writeCookieToCustomField(‘pap_tdx8v2s5a’);
</script>

<script type=”text/javascript”>
document.write(unescape(“%3Cscript id=’pap_x2s6df8d’ src='” + ((“https:” == document.location.protocol) ? “https://” : “http://”) +
“***.postaffiliatepro.com/scripts/trackjs.js’ type=’text/javascript’%3E%3C/script%3E”));
</script>
<script type=”text/javascript”><!–
PostAffTracker.setAccountId(‘default1’);
try {
PostAffTracker.track();
} catch (err) {
}
//–>
</script>
<!– End PAP –>

3、stripe配置webhooks
登录stripe管理账号,Developers > webhooks,点击添加一个新URL,输入如下URL
http://***.postaffiliatepro.com/plugins/Stripe/stripe.php?AccountId=default1

4、激活
1)configuration > Plugins
激活Signup affiliate automatically to campaign和Stripe webhook handling两个插件
Stripe webhook handling里面需要配置stripe的Secret API Key
2)configuration > Features
激活Action commissions和Private campaigns两个插件

发表评论