Thanks for the excellent question.Yes, s2Member can be configured to deal with this. However, it does take some planning to make it all work correctly and reliably. Please feel free to follow my tutorial below.
1. You'll need to
pipe delimit the affiliate ID associated with each visitor into your PayPal Button Code(s). If you're running s2Member Pro Forms, you can do the same thing. In either case, you will receive the
?SSAID=xxx variable that ShareASale passes to your site, and insert that value into the "custom" attribute of your Shortcode, as follows:
- Code: Select all
[s2Member-PayPal-Button ... custom="www.example.com|<?php echo $_GET["SSAID"]; ?>" /]
* The custom attribute MUST always start with your domain name, but you can pipe delimit additional data into this field. This ways it's available in s2Member's reporting in the future ( i.e. for recurring Payment Notifications processed by s2Member )
By default, ShareASale does NOT pass the ?SSAID=xxx variable. You will need to log into your ShareASale account and enable this feature. That way, when a potential Customer hits your site through an affiliate referral link, you will be capable of identifying the affiliate that referred them, via the ?SSAID=xxx variable.2. Next, you will need a listener script that can be attached to s2Member's API /
Payment Notifications. For further details, please have a look in your Dashboard. Go to:
s2Member -> API Notifications -> Payment Notifications
Pay particular attention the Replacement Codes that are made available. In this case, you will use the instructions provided by s2Member, and pull the affiliate ID associated with the payment, through the %%cv1%% Replacement Code. %%cv1%% = Custom Value #1, which is the affiliate ID that you originally piped into the Shortcode.3. Now you just need to make the listener script do something each time s2Member processes a Payment Notification. Your listener script will need to speak with ShareASale using the
ShareASale Merchant API tools that are documented inside of your ShareASale account.
- shareasale-merchant-api.jpg (20.16 KiB) Viewed 426 times