Community Support Forums — WordPress® ( Users Helping Users ) — 2011-10-01T16:16:05-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=15163 2011-10-01T16:16:05-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15163&p=42088#p42088 <![CDATA[Re: HELP! S2Member not passing Affiliate ID for Authorize.ne]]> Thanks for the follow-up.

This code sample that I posted works ONLY for Signups.
i.e. The initial purchase, which might be for $0.00 if a 100% free trial was offered.
It does NOT get called upon for future recurring payments, only for the initial Signup.
( this works for all Payment Gateways, in one go )
Jason Caldwell wrote:
Code:
<?php
function s2_wp_affiliate_signup_tracking_codes 
() /* Works for ALL Payment Gateways in one go. */
    {
        $existing_site_owner_config = (string)$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_tracking_codes"];
        $s2_wp_affiliate_signup_tracking_codes = '<img src="/track.php?aid=%%cv1%%" />'; /* Add tracking code(s) here dynamically; the SAME way a site owner
        would do it manually through `s2Member -> API Tracking` in the Dashboard. Replacement Codes are listed in the Dashboard with s2Member. */
        $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_tracking_codes"] = $existing_config . $s2_wp_affiliate_signup_tracking_codes;
    }
if (!is_admin ()) add_action ("plugins_loaded", "s2_wp_affiliate_signup_tracking_codes");
?>


Available Replacement Codes inside a Signup Tracking Code pixel:
See: s2Member -> API Tracking -> Tracking Codes
SNAG-0009.png


In addition, s2Member supports a feature called Specific Post/Page Access, where specific Posts/Pages can be sold apart from any Membership to the site, and separate Tracking Codes can/should be integrated for that type of sale. ( this works for all Payment Gateways, in one go )
Jason Caldwell wrote:
Code:
<?php
function s2_wp_affiliate_sp_tracking_codes 
() /* Works for ALL Payment Gateways in one go. */
    {
        $existing_site_owner_config = (string)$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_tracking_codes"];
        $s2_wp_affiliate_sp_tracking_codes = '<img src="/track.php?aid=%%cv1%%" />'; /* Add tracking code(s) here dynamically; the SAME way a site owner
        would do it manually through `s2Member -> API Tracking` in the Dashboard. Replacement Codes are listed in the Dashboard with s2Member. */
        $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_tracking_codes"] = $existing_config . $s2_wp_affiliate_sp_tracking_codes;
    }
if (!is_admin ()) add_action ("plugins_loaded", "s2_wp_affiliate_sp_tracking_codes");
?>


Available Replacement Codes inside a Specific Post/Page Tracking Code pixel:
See: s2Member -> API Tracking -> Tracking Codes
SNAG-0010.png




Now, in addition to s2Member's "Tracking Code" integration, there is another way of integrating your affiliate software, and that is through s2Member's event driven API Notifications. This type of integration might be more desirable if you plan to track recurring payments as well. For instance, instead of integrating Tracking Codes, your application may prefer to integrate with s2Member's Payment Notification, processed silently behind-the-scene, anytime an actual payment is received; and this DOES include future recurring payments too. ( this also works for all Payment Gateways, in one go )

Here are code samples for this type of integration, covering both Membership and Specific Post/Page functionality. For further details, see: Dashboard -> s2Member -> API Notifications.
Code:
<?php
function s2_wp_affiliate_membership_payment_tracking_urls 
() /* Works for ALL Payment Gateways in one go. */
    {
        $existing_site_owner_config = (string)$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["payment_notification_urls"];
        $s2_wp_affiliate_membership_payment_tracking_urls = 'http://example.com/track.php?user_ip=%%user_ip%%&payer_email=%%payer_email%%&amount=%%amount%%&aid=%%cv1%%';
        /* Add tracking URL(s) here dynamically; the SAME way a site owner would do it manually through `s2Member -> API Notifications -> Payment Notifications` in the Dashboard. Replacement Codes are listed in the Dashboard with s2Member. */
        $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["payment_notification_urls"] = trim ($existing_config . "\n" . $s2_wp_affiliate_membership_payment_tracking_urls);
    }
if (!is_admin ()) add_action ("plugins_loaded", "s2_wp_affiliate_membership_payment_tracking_urls");

function s2_wp_affiliate_sp_sale_tracking_urls () /* Works for ALL Payment Gateways in one go. */
    {
        $existing_site_owner_config = (string)$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_sale_notification_urls"];
        $s2_wp_affiliate_sp_sale_tracking_urls = 'http://example.com/track.php?user_ip=%%user_ip%%&payer_email=%%payer_email%%&amount=%%amount%%&aid=%%cv1%%';
        /* Add tracking URL(s) here dynamically; the SAME way a site owner would do it manually through `s2Member -> API Notifications -> Specific Post/Page Sale Notifications` in the Dashboard. Replacement Codes are listed in the Dashboard with s2Member. */
        $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_sale_notification_urls"] = trim ($existing_config . "\n" . $s2_wp_affiliate_sp_sale_tracking_urls);
    }
if (!is_admin ()) add_action ("plugins_loaded", "s2_wp_affiliate_sp_sale_tracking_urls");
?>

Replacement Codes for s2Member's Payment Notification.
SNAG-0012.png
Replacement Codes for s2Member's Specific Post/Page Sale Notification.
SNAG-0011.png

Statistics: Posted by Jason Caldwell — October 1st, 2011, 4:16 pm


]]>
2011-09-27T22:40:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15163&p=41761#p41761 <![CDATA[Re: HELP! S2Member not passing Affiliate ID for Authorize.ne]]>
$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_tracking_codes"]

And we can use the following variables (values dynamically replaced from the actual transaction)?

%%cv1%%
%%amount%%
%%payer_email%%

Statistics: Posted by tipsandtricks_hq — September 27th, 2011, 10:40 pm


]]>
2011-09-27T13:50:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15163&p=41710#p41710 <![CDATA[Re: HELP! S2Member not passing Affiliate ID for Authorize.ne]]>
Code:
<?php
function s2_wp_affiliate_tracking_codes 
() /* Works for ALL Payment Gateways in one go. */
    {
        $existing_site_owner_config = (string)$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_tracking_codes"];
        $s2_wp_affiliate_tracking_codes = '<img src="/track.php?aid=%%cv1%%" />'; /* Add tracking code(s) here dynamically; the SAME way a site owner
        would do it manually through `s2Member -> API Tracking` in the Dashboard. Replacement Codes are listed in the Dashboard with s2Member. */
        $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_tracking_codes"] = $existing_config . $s2_wp_affiliate_tracking_codes;
    }
if(!
is_admin()) add_action ("plugins_loaded", "s2_wp_affiliate_tracking_codes");
?>

Statistics: Posted by Jason Caldwell — September 27th, 2011, 1:50 pm


]]>
2011-09-25T03:09:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15163&p=39063#p39063 <![CDATA[Re: HELP! S2Member not passing Affiliate ID for Authorize.ne]]> Statistics: Posted by tipsandtricks_hq — September 25th, 2011, 3:09 am


]]>
2011-09-24T22:51:32-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15163&p=39037#p39037 <![CDATA[Re: HELP! S2Member not passing Affiliate ID for Authorize.ne]]>
tipsandtricks_hq wrote:
Hi, We use the following action hook to add the "Affiliate ID" in the custom field for PayPal checkout (this was suggested by Jason):

ws_plugin__s2member_pro_before_sc_paypal_form_after_shortcode_atts

Is there a similar hook present for the Authorize.net checkout of the S2Member that we can utilize to add the affiilate ID to the "custom" field programmatically?


Did you try the same hook with authnet instead of paypal? ws_plugin__s2member_pro_before_sc_authnet_form_after_shortcode_atts

viewtopic.php?f=40&t=12475&p=30895&hilit=ws_plugin__s2member_pro_before_sc_authnet_form_after_shortcode_atts#src_doc_ws_plugin__s2member_pro_before_sc_authnet_form_after_shortcode_atts

Statistics: Posted by Cristián Lávaque — September 24th, 2011, 10:51 pm


]]>
2011-09-23T12:38:12-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15163&p=38972#p38972 <![CDATA[Re: HELP! S2Member not passing Affiliate ID for Authorize.ne]]> Statistics: Posted by scripteralex — September 23rd, 2011, 12:38 pm


]]>
2011-09-20T21:15:53-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15163&p=38833#p38833 <![CDATA[Re: HELP! S2Member not passing Affiliate ID for Authorize.ne]]>
ws_plugin__s2member_pro_before_sc_paypal_form_after_shortcode_atts

Is there a similar hook present for the Authorize.net checkout of the S2Member that we can utilize to add the affiilate ID to the "custom" field programmatically?

Statistics: Posted by tipsandtricks_hq — September 20th, 2011, 9:15 pm


]]>
2011-09-20T09:05:56-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15163&p=38721#p38721 <![CDATA[Re: HELP! S2Member not passing Affiliate ID for Authorize.ne]]> http://www.leasepurchaselocators.com

Statistics: Posted by jlamarferren — September 20th, 2011, 9:05 am


]]>
2011-09-19T23:04:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15163&p=38703#p38703 <![CDATA[Re: HELP! S2Member not passing Affiliate ID for Authorize.ne]]> Statistics: Posted by jlamarferren — September 19th, 2011, 11:04 pm


]]>
2011-09-19T19:47:01-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15163&p=38681#p38681 <![CDATA[Re: HELP! S2Member not passing Affiliate ID for Authorize.ne]]>
Also, you need to be sure you are pipe delimiting your shortcode :


%%cv1%% = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: custom="www.yoursitehere.com|cv1|cv2|cv3". You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.


The way I understand this is that you would pass the affiliateID like so in your shortcode :

custom="www.yourdomainhere.com|ap_id"

You would replace ap_id with the variable for ap_id so it will populate the CV1 field.

Tx

Statistics: Posted by sgtcory — September 19th, 2011, 7:47 pm


]]>
2011-09-19T18:47:26-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15163&p=38676#p38676 <![CDATA[Re: S2 Member not passing Affiliate ID for Authorize.net?]]> Statistics: Posted by jlamarferren — September 19th, 2011, 6:47 pm


]]>
2011-09-16T08:30:50-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15163&p=37309#p37309 <![CDATA[HELP! S2Member not passing Affiliate ID for Authorize.net?]]>
I purchased a plugin called WP Affiliate Platform and it is supposed to be integrated with S2 Member. As we started promoting our program, we noticed that we were getting sales, but that our affiliates were not. They were showing many clicks, but 0 sales. I contacted the developer for the WP Affiliate Platform plugin and when he looked at our set up here is what he would like me to ask the S2 Member developers:

When using the authorize.net gateway, does the S2Member plugin send the Affiliate ID when sending the IPN notification like it does for PayPal transactions?

Also, they wanted me to mention the following documentation so the S2 Member developers can easily catch up and will know what we are talking about:
http://www.tipsandtricks-hq.com/wordpre ... ftware-368

Please help with this. This is the last piece we need and we want to be able to compensate our affiliates for their hard work.

Statistics: Posted by jlamarferren — September 16th, 2011, 8:30 am


]]>