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
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
<?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");
?>
Statistics: Posted by Jason Caldwell — October 1st, 2011, 4:16 pm
Statistics: Posted by tipsandtricks_hq — September 27th, 2011, 10:40 pm
<?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
Statistics: Posted by Cristián Lávaque — September 24th, 2011, 10:51 pm
Statistics: Posted by tipsandtricks_hq — September 20th, 2011, 9:15 pm
Statistics: Posted by jlamarferren — September 20th, 2011, 9:05 am
%%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.
Statistics: Posted by sgtcory — September 19th, 2011, 7:47 pm
Statistics: Posted by jlamarferren — September 16th, 2011, 8:30 am