Need a quick easy way to generate affiliate links.

Need a quick easy way to generate affiliate links.

?ref=AFFILIATE-00

Not sure how this is calculated.

Would be great to have a shortcode for the affiliate links and banners.

Worse case php code.

Can you guys help with a php script?

Thank you

  • Vaughan
    • Support/SLS MockingJay

    hiya

    not sure how easy this would be as affiliates have to actually be a registered user and sign up as an affiliate.

    if you could elaborate na bit more on what you are trying to achieve?

    though my experience with affiliates is limited. I could however add this to the feature requests for the developer to consider?

    i’ll need to ask the developer for some feedback on this for you.

    thanks

  • Paul
    • The Green Incsub

    @ronsmart,

    The unique ‘key’ for each affiliate is assigned when that user enables/joins the affiliate program on your site. You don’t auto generate these for user because each user must manually go into their profile and enable this. There is not an admin-level interface to enable for all users.

    I see you are running Multisite. I’m assuming you have Network enabled the Affiliate plugin. If you go to your Network you will see Affiliates > Manage Affiliates page. This shows all users who have enabled affiliate processing. In this listing you will see the ‘Reference’ column showing unique tracking reference for the user.

    Would be great to have a shortcode for the affiliate links and banners.

    There is one! go to the plugin project page. Then click Usage tab. Toward the bottom of the page you will see the section ‘Shortcodes’. The one you are looking for [affiliatebanners] This will take each banner you have setup and apply the user’s unique tracking URL to it. Less for you to do manually.

  • ronsmart
    • The Incredible Code Injector

    They would be registered, what I need will go on users blogs on the network.

    I have a powered by link at the bottom of the site and would like to add my users ref id to it so they get credit if someone signs up for a blog through that link.

    Thanks for the help!

  • ronsmart
    • The Incredible Code Injector

    So I didn’t think this through obviously, LMAO

    That works as long as you are signed in and will produce your own affiliate ref id.

    Some how I have to pull the owner admin user that is the affiliate of the blog.

    What if there are multiple admins?

    Is there a simple way around this?

  • Paul
    • The Green Incsub

    @ronsmart,

    Some how I have to pull the owner admin user that is the affiliate of the blog.

    Just a quick question. I’m assuming you have a Multisite system and you want to show these affiliate links in the footer of the sub-sites. Thus linking to the main site. And you only want to show affiliate links for admin users of that blog?

    This is sort of the purpose of the affiliate banner shortcode I previously provided. From your main site the individual user would access their banners which contain the affiliate reference. These can be used most anywhere.

    So on your issue you could make this somewhat complicated. You would need to query all the admin users for the given blog. Assumed in most cases there is only one admin user. In that case the link can be determined. But in some rare cases there may be more than one. Would both admin user actually be affiliates? In that case maybe randomize this selection.

    Please confirm the logic and then I can help with the coding needed.

  • Paul
    • The Green Incsub

    @ronsmart,

    Alright. Let me start working on some code for you. Basically you want to query all admins for a specific site via get_users() http://codex.wordpress.org/Function_Reference/get_users

    Then from the result check if any of those admin users have the affiliate meta via get_user_meta();

    Then lastly if there are multiple admins with affiliate references perform some random selection.

    I’ll probably just provide a simply function you can call. It will simply return an affiliate reference for the blog. Then you can use that to build the URL you need.

  • Paul
    • The Green Incsub

    @ronsmart,

    What about user email and path within signups?

    Your setup may be different but from what I can tell WP really does not record the signup to a specific site. Only that the user is associated with a ‘source_domain’ as I mentioned in my previously reply.

    Regardless this is getting out of the area of what Affiliates can do. I’ve provided the code/function that should get your started.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.