Can passing username via affiliate sub ID be accomplished w/PHP?

Discussion in 'PHP' started by MNRachel, Nov 20, 2009.

  1. #1
    I have a Joomla website that has a member login system and a plug in that allows a me to enter "{mgetusrname}" to retrieve a user name when logged in.

    What I am trying to accomplish is using Sub ID's to track info through my advertising. Could this be accomplished with a PHP script?

    There's a ton of software that seems like it may do this plus a million other things that I don't need (and can't afford!). I just want the information for members who have completed offers.

    Can this be done? And could it be done by someone with almost no PHP knowledge?
     
    MNRachel, Nov 20, 2009 IP
  2. MNRachel

    MNRachel Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It seems like this would be a commonly asked question but I am having the hardest time finding any answers! I am driving myself crazy with google and forum searches on this one. Anyone have any guidance?

    I have run across a couple of sites where you can put an offer out there, requesting a script. Should I seek that avenue and if so, any suggested sites?

    I don't want a tool that is visible to members, only to get the member logged in (user ID or member ID) attached to the sub ID of the specific affiliate offers.

    Thanks for ANY advice you can share!!
     
    MNRachel, Nov 21, 2009 IP
  3. BlogSEO

    BlogSEO Peon

    Messages:
    135
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I am no coder, myself, but I guess that what you want to do is place anything like this:

    affiliate-link.com/&affid=$some-string

    and then a php file that automatically replaces $some-string with the username passed by the variable "{mgetusrname}", so that you can track wich of your members converted, right?

    If this is the case, then you just need to find a coder or someone here that helps you in creating the code with str-replace (string replace).

    What is has to do is fetch {mgetusrname} 's value and automatically replace $some-string with that value, so that if i were to click the URL i would be sent to:

    affiliate-link.com/&affid=BlogSEO

    Hope this helped you. Now you just need to find someone that turns words into php code ;)
     
    BlogSEO, Dec 5, 2009 IP
  4. taminder

    taminder Peon

    Messages:
    581
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    you mean by forcing your affiliate id in?

    if so, just send out all of your requests with
     . "&ref=#####";
    Code (markup):
     
    taminder, Dec 5, 2009 IP
  5. BlogSEO

    BlogSEO Peon

    Messages:
    135
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    But in that case, in the affiliate reports it would show up as ##### instead of the member who converted.
     
    BlogSEO, Dec 5, 2009 IP
  6. MNRachel

    MNRachel Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks for the replies!

    I have actually figured out how to attach the member name to the sub id using the {mgetusrname} plug in, so that is a huge step forward.

    Now I am trying to figure out how to limit members to only completing an offer once.. more strictly than just telling them they can only do them one time. It seems like the callback url or pixel method would be more useful in accomplishing that.

    Still a work in progress to get my incentives up and running.. any feedback or suggestions are always appreciated!
     
    MNRachel, Dec 5, 2009 IP
  7. BlogSEO

    BlogSEO Peon

    Messages:
    135
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I actually went through with that once, with a Bux script... Turning into offers only, along with a programmer :S Good luck.

    That should not be hard, now. Each member, besides the username has an id in database, right? So, when he completes that offer, his unique ID is added to a field in that offer's properties, in SQL. Let's say you add "members_who_completed", and after I, userID 23, complete that offer, my ID is added to that field.

    After this, everytime the page is loaded, after echoing the offers list, it checks the members_who-completed field and shows me only the offers who does not have my ID in that field.

    Once again, translate words to code and I guess it will work ;)
     
    BlogSEO, Dec 5, 2009 IP
  8. MNRachel

    MNRachel Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Thanks, again, BlogSEO :) The thought process makes complete sense! I do have a programmer on standby when I figure out which path to take (thankfully!).

    The member name is being passed through the affiliate link via sub id. I can view that information in my affiliates sub id reporting to see which members have clicked offers and which have completed offers. But how would I get the completed offer information into SQL? Would that have to be manually updated? I'm not sure how else to transfer the information from my affiliate report to my database.. Would a postback/callback url system accomplish this?
     
    MNRachel, Dec 5, 2009 IP
  9. BlogSEO

    BlogSEO Peon

    Messages:
    135
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Now, that is where the work starts.

    Wether you approve every submition manually, or you dig a bit more ;)

    Most affiliate networks let you download reports in the spreadsheet form. You can always code something that compares that spreadsheet (by uploading it) to the actual submissions database and generates payments from there. Although I find this a bit more complicated, shouldn't be har for a programmer to see the general point...

    Here, you must be carefull so that the user does not get credit twice for an the same offer, if you download a file that covers Dec 1st to Dec 5th, and tomorrow you download Dec 1st to Dec 6th. This last file will still carry the conversions from Dec 1st to 5th. ;)

    So, as a ground point, you should download this file, always paying atention that you are downloading the previous day ONLY.
    Also, you should code this payment system so that doesn't credit the same offer twice for the same user, if you make a mistake downloading the spreadsheet, or uploading it to the server. :)

    Also, when coding, remember to include a payment backup automatic routine, so that if a mistake happens, you can rollback payments to as they were before the mistake, and correct the situation. :)

    I think that's all
     
    BlogSEO, Dec 5, 2009 IP