wp_aff_referrals ip and user_id fields

Two fields in wp_aff_referrals are not behaving as I would expect. Affiliates seems to be keeping track of referrals properly, but all of the records have the ip field = 387409553 and the user_id = 0 . Are theses fields deprecated or do I have a problem with my s2member notification URLs?

This became an issue as I am looking for an easy way to print a report showing all of the referrals by affiliate number, just like the one in Affiliates>Referrals and if these fields were populated correctly, it would solve my problem.

11 Responses to wp_aff_referrals ip and user_id fields

  1. gpbush October 9, 2013 at 11:33 am #

    Thank you for the answers, but my original questions is still unanswered.

    Here is what I am looking for:

    We offer a data subscription and give customers a 30 day free trial, with no credit card required.

    Since not credit card is required, their signup does not generate a transaction ID. (Affiliates is properly notified through the s2Member Registration API)

    I am looking for the specific field that ties the new user to an affiliate, as I cannot find it.

    I am looking for a report to give my affiliates that shows them their Free trial users, when they signed up, etc. It is the exact information that is shown when you go to Affiliates>Referrals. The shortcode affiliates_affiliate_stats does not do this.

    • antonio October 17, 2013 at 6:55 am #

      Sorry, I don’t understand you,
      If you need create an affiliate from an user, you must use “username” field when you create the new affiliate (on Affiliates->Manager Affiliates), but if you need create a referral when a new user is registered, you can use Affiliates Members.

      In your report, you can use “data” attribute to show more information (use the notification url params), for example:
      [affiliates_affiliate_stats type="stats-referrals" data="full_name,payer_email,user_login"/]

  2. gpbush October 3, 2013 at 12:56 pm #

    And do not use the Affiliates-Extra-Tokens plugin, as it breaks the s2member integration.

    • antonio October 4, 2013 at 8:39 am #

      Hi,
      fixed Affiliates-Extra-Tokens. Tokens like as order_XXX are for woocommerce data, but you can use user_XXX.

  3. gpbush October 3, 2013 at 12:21 pm #

    I use some of the shortcodes for the notification email, but I do not see how that helps from the reporting side…

    I already use the notifications for registration & signup properly, I think, because the information I want to display for my affiliates is shown properly when I go to Affiliates>Referrals. That is the exact report I want my affiliates to see. How do I get that exact report for my affiliates, both printed and so that they can see it for their own referrals?

    • antonio October 4, 2013 at 2:52 pm #

      You can use Affiliates-Extra-Tokens as referrence, and create your own tokens.

  4. gpbush October 2, 2013 at 8:42 pm #

    Thank you, but all that does is list the file by affiliate. The user id is still 0 for all of the members that were referred, so I cannot print what new users “belong” to what affiliate. The user id is buried in the data field, but shouldn’t it be in the usr_id field instead?

    I am looking to be able to give my affiliates a report that looks just like the screen when you go to Affiliates>Referrals and select an affiliate.

    • kento October 3, 2013 at 10:24 am #

      No, the user_id in that table is not going to help you (that’s the current user’s ID when the referral is recorded and with the notification triggering that it should be empty).

      Have a look at the wp_aff_subscriptions table, you will find the subscription ID related to the referring affiliate’s ID there.

      By the way, why don’t you just use the stats shortcodes – the Detailed Referral Overview section in the documentation explains how to use it.

      • gpbush October 3, 2013 at 11:49 am #

        The wp_aff_subscriptions table uses the transaction id to link the referral to the affiliate. This is only generated from the payment gateway, so no free users show up in this file. I need a way to manage free users who do not did use any form of payment. This way we can work to convert them.

        As for the short codes, that was my preferred method, but none of them work for this. As an example, the shortcode above, does not show any email address, or any identifying information – just date, post, amount, Currency, Status and a line for Details – No email, user id or name.

        All I want is to print a list of the free subscribers, with their emails just like when you go to the Affiliates>Referrals section and run the reports. Optimally, I would want one of your short codes to work so that each affiliate could see their own referrals.

        • kento October 3, 2013 at 12:03 pm #

          You can use the referral data along with the shortcodes now, there’s an interesting topic on that Name, Phone and Email for referring affiliate and see this comment on the tokens that can be used.

          You can in fact use the notification URLs to record referrals when the users sign up, instead of just when the user makes a payment. That way you will have referrals with the user data and no amount, and the usual referrals for payments. For that you would use a similar notification URL under Registration Notifications as the one that is proposed for Payment Notifications under s2Member > API / Notifications.

  5. kento October 2, 2013 at 7:42 pm #

    If you want them by affiliate, the field that identifies the affiliate is affiliate_id in that table.

    An example query listing all referrals and sorted by affiliate id in ascending order, date and time of the referral in descending order, would be:

    SELECT * FROM wp_aff_referrals ORDER BY affiliate_id, datetime DESC;

    Does that help you?

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share