PriMoThemes — now s2Member® (official notice)
This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™
%%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.
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?
<?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");
?>
Jason Caldwell wrote:
- Code: Select all
<?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
Jason Caldwell wrote:
- Code: Select all
<?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
<?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");
?>
Users browsing this forum: Google [Bot] and 1 guest