• Resolved juanguillermo

    (@juanguillermo)


    I have a question about how it works:

    When user X sends his affiliate link to user Y, affiliate Y visits the page, a cookie is installed, right?

    Now, if the user signs up (i.e. “buys” a free membership), the cookie is still needed to identify user Y’s future purchases and pay user X the commission?

    Or the account of user Y (ID, username, email) is associated with the account of user X? Thus, all future purchases will be tracked without the need for a cookie.

    By “future purchase” I mean renewal of the 2nd subscription onwards.

    Context: My site uses Simple Membership (SM) to register memberships and is integrated with Affiliates Manager (AM) so that an affiliate account is created with each SM registration.

    What I do is I offer free membership and when the user signs up I offer upgrade to paid membership.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support mbrsolution

    (@mbrsolution)

    Hi,

    Cookies are very important to keep track and to award a commission for your affiliates. Please read the following documentation to learn more.

    https://wpaffiliatemanager.com/cookie-duration-use/

    Let me know if you need more information or help.

    Thank you.

    Plugin Author affmngr

    (@affmngr)

    @juanguillermo, Free membership signups may not count as purchases. Do you see a commission record for it? If not the cookie is necessary for the first payment.

    Thread Starter juanguillermo

    (@juanguillermo)

    No, signing up for a free membership definitely does not count as a purchase.

    What options do I have to be able to achieve this?

    Do you have plans in your roadmap to upgrade WPAM to track free signups so you can award lifetime commissions?

    Do you have a development service that I can hire?

    Thread Starter juanguillermo

    (@juanguillermo)

    I was thinking of another solution, and I think it is easier to implement:

    How can I prevent the cookie from being overwritten?

    If Person A shares their referral link with Person B, and Person B signs up with that link for free membership, a cookie is written with Person A’s id.

    I can set a long duration for that cookie, so when Person B makes a purchase, the commission is assigned to Person A.

    However, if by any chance Person B re-enters the page through another affiliate link (for example, Person C’s link), the cookie value will be replaced by this new ID, and the commission will of the sale will be assigned to Person C, even if Person B already has their free membership on file.

    This can be solved in two ways, as far as I understand:

    1. Linking Person B’s email to Person A’s affiliate account, even if Person B only “purchased” the free membership. It would be something like “email commission tracking”.

    2. Setting the first cookie with long duration and preventing the first cookie from being overwritten by a new cookie.

    I would prefer the first option, since this way the commission is guaranteed regardless of whether the cookies are deleted from the device.

    But I understand that it is a medium-sized development that will surely take time.

    The second option seems easier to implement.

    Could I hire your development team to help me with any of the solutions?

    PS: Please consider developing option 1, either as a built-in feature or as a premium plugin.

    I’ve been reviewing other affiliate plugins and SAAS and most of them track commissions only by cookies, and not by email.

    Thread Starter juanguillermo

    (@juanguillermo)

    I already solved the issue with cookies overwriting. Now check if it exists before calling setcookie().

    I’ll leave the code here in case someone else needs it:

    That’s the line 48 in file clicktraking.php:
    setcookie('wpam_id', $aff_id, $cookie_life_time, "/", COOKIE_DOMAIN);

    Replace by:
    if(!isset($_COOKIE['wpam_id'])) {setcookie('wpam_id', $aff_id, $cookie_life_time, "/", COOKIE_DOMAIN);}

    Code considerations:
    1. This is a “patch” solution, something temporary for further development. I would not use it for production environment.
    2. They should be careful and alert when the plugin is updated, it is possible that the code will return to its original state.

    I hope the plugin developers can release some official update soon, ideally with option 1 from my previous post.

    You guys have a great plugin!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Cookies for future purchases: are they always necessary?’ is closed to new replies.