How can I manually link an affiliate with a signup?

It would be a great feature to provide a way to manually link an affiliate with a signup.

Many of my affiliates are non-technical and forget to correctly use the affiliate code. Then I get the person who signed-up wanting to give their referral the credit. I used to payout just once, so I could manually add credit on the affiliate management page.

However, I am now paying out ongoing so the manual approach of editing the account page every month would not be something I can consider.

I assume I could make the changes in the database. What are the tables that I would need to edit to connect a referrer to an account?

  • Michael Bissett

    Hey @antKat,

    I do agree that it'd be a handy feature to be able to link signups to affiliates, and as such, I've gone ahead and moved this thread over to the Features & Feedback section.

    In the meantime, in taking my own look at the code, I'd take a closer look at these three tables:

    - wp_affiliatedata
    - wp_affiliatereferrers
    - wp_affiliaterecords

    (replacing wp_ with the appropriate database prefix)

    Kind Regards,
    Michael

  • antKat

    Hi Michael,
    Based on what I'm experiencing on our network, I really need to figure out how to manually make an affiliate connection after a site has been created. I'm not certain why our subscribers are having a difficulty using the affiliate link - but I have to find a way to get them credit. The fact that we are doing an ongoing payment adds to the complexity.

    I've looked through the tables that you listed above. Of the 3 - only 2 have any data; affiliaterecords and affiliatedata.

    It seems that all of the original connection data is stored in the affilaterecords table with each affiliate connection having 4 entries:
    1. Unique Click
    2. Signup user
    3. Signup blog
    4. Paid pro-sites
    Would adding these 4 entries per affiliate be all that I would need to edit? The affiliate data table seems to be generated - or would that table need to be manually adjusted as well?

    Also, each subsite has the same 3 tables but there is no data in any that I've checked. (Is there a purpose for the individual sites affilate tables?)

  • Michael Bissett

    Hey @antKat,

    Honestly put, if I knew of a quick answer to this whole situation (how to go about manually linking affiliates with signups), I'd be glad to provide that.

    The quandary here is that we're really doing something that Affiliates, out of the box, wasn't designed to do. Personally, I know of the locations of the database tables, and that they're possible places to look, but as to the full blown, final, absolute solution, that's something that's going to require a fair chunk of development time, and I (along with other staff) do need to bear this lil' policy of ours in mind, as we're supporting members like yourself:

    https://premium.wpmudev.org/manuals/using-wpmu-dev/support-vs-custom-development/

    Tackling your responses:

    It seems that all of the original connection data is stored in the affilaterecords table with each affiliate connection having 4 entries:

    1. Unique Click
    2. Signup user
    3. Signup blog
    4. Paid pro-sites

    Would adding these 4 entries per affiliate be all that I would need to edit?

    I would think so, but "think so" & "know so" can be two different things.

    Also, each subsite has the same 3 tables but there is no data in any that I've checked. (Is there a purpose for the individual sites affilate tables?)

    If the plugin was activated on a site-by-site basis in the past (I know that it's network activated right now), then that would explain why those tables are there. Basically, they'd only be there if each subsite was running it's own affiliate program.

    Kind Regards,
    Michael