Page 1 of 1

Coupon Notification

PostPosted: October 25th, 2010, 2:53 pm
by Bridget
I need to receive notification of coupons used on my site, to track them.
Does anyone have suggestions on how to do this?
I was thinking of using the payment notifications but am not sure whether I can use coupons as custom variables.

Any help would be greatly appreciated

Re: Coupon Notification

PostPosted: October 26th, 2010, 1:43 am
by Jason Caldwell
Hi there. Thanks for the great question.

Yes, I see your dilemma. Ideally, s2Member would provide details on the Coupon Code in it's Replacement Codes for the API Notification. Until we get that feature added, you can track Coupon Codes using the "custom" attribute of your Shortcode.

Here is how your Shortcode might look:
Code: Select all
[s2Member-Pro-PayPal-Form ... custom="www.yourdomain.com|<?php echo esc_attr($_POST["s2member_pro_paypal_checkout"]["coupon"]); ?>" /]
You will need to have the Exec-PHP plugin installed for this to work.

Now you can reference the Coupon Code with s2Member's API Tracking; by referencing: %%cv1%%.
That is, Custom Value #1. Also, please remember that the "custom" attribute in your Shortcode MUST always start with your domain name. Other values can be piped in; but it MUST always start with the domain of your installation.


@TODO :: add native support for Coupon Code tracking into s2Member's API Notifications.