WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Dynamically Appending User ID to Outbound Links (2 posts)

  1. metakong
    Member
    Posted 2 years ago #

    If anyone can help get this to work, you will quite possibly make this the happiest day of my year:

    Goal: To dynamically append wordpress member's userid to outbound affiliate links for the purpose of tracking each member's purchase totals and subsequently giving them the appropriate credit for same. I know this is possible; working examples include fatwallet.com and ebates.com (which recently purchased fatwallet.com), both are "cash back" sites that offer to share affiliate commission with their site members.

    Background/Example: Fatwallet even goes so far as to report, within your member screen, the fact that you merely clicked on an affiliate link within minutes of doing so. That kind of functionality would be nice (and reassuring to members) but is not necessary for the concept we're looking to implement (by we, I mean a small group of sales and service pros with better ideas than ebates, but only an advanced novice understanding or knowledge of programming code required). Besides, doing that kind of backend reporting would be easier since it requires simple http get calls to the affiliate networks in question in order to obtain data for each individual user id, BUT, we first need to figure out how to dynamically append that user id to the affiliate link in real time so the affiliate network can attach the rest of the click's data to it; once that's done, rerouting the data from affiliate network back to the user we've already got figured out.

    Potential problem/Considerable variable: To aggregate affiliate links and present them, we use a third party service called popshops. Popshops can be used two ways: 1) Point and click building of mini "stores" provides "pop it in" code available in java, html, php, xml, csv, rss, atom, vbscript, C#, and vb.net OR 2) Dynamic loading of pre-defined or user defined (search engine) variables via popshops API and http get requests. Both require use of popshops class obv; troubleshooting section of popshops states that additional tracking (sub IDs) may be appended to either of these methods (I would like to figure out both). However, I'm not sure it's possible to dynamically add the variable user ID of the currently logged in user to either or both of these methods. Below is, first, an example of the "pop it in" code and basic instructions from popshops re: dynamically adding subid's to it:
    ===
    Example of php popshop code:
    ===

    [Code moderated as per the Forum Rules. Please use the pastebin]

    ===
    Within popshops documentation, we find the following advice regarding appending subid's/userid's to the above:
    ===
    "Dynamic sub-IDs: If you are a Data Pack (or above) subscriber, you can add dynamic sub-IDs to a ShopBuilder shop. To add a dynamic ID to your shop, do the following:

    Add an additional parameter to the code snippet that you copied from the "Pop it In" tab.

    $psps_parameters .= "&psps_subid=MYCUSTOMSUBID";

    In other words you just add a psps_subid parameter set to whatever you want the final sub-ID value to be."
    ===
    For the above, what I don't see is how to, if possible, format the last parameter, specifically, "&psps_subid=MYCUSTOMSUBID," so that "MYCUSTOMSUBID" is dynamically replaced with the current user's id # from wordpress instead of some predefined static variable of my choosing.

    After more than 60 hours of research wasted on this, I have this funny fearful feeling like the answer is simpler than I suspect, but I'm willing to feel like an ignorant tool if I can finally figure out how to get to our goal here. On to the API http get version:
    ===
    Here I will paste popshops generic advice regarding how to do this within their API calls, followed by a sample script utilizing popshops API. This is a lot of text that still eventually boils down to "How can I dynamically add the current logged in user's wordpress userID to the "subid=" variable of the code?
    ===
    Generic popshops advice:
    "You can use affiliate-defined sub-ID tracking to help you manage your sales. Each network gives this "sub ID" tracking a different name, but in a nutshell it appends the text (or code) that you want to the URL.

    You can then run reports at the network level for that sub-ID.
    You can dynamically append any information, including Sub IDs for commission tracking (reported via your network account) using parameter "&url_subid=". This will have your custom subid/sid to be dynamically appended in any final affiliate product urls.

    Also, you can on any PopShops redirect url (r.popshops.com) append sub ID information by inserting "/" followed by sub IDs at the end of the PopShops url.
    ===
    Sample popshops API script:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    ===

    I will be hoping and praying that someone can easily make me look foolish with an easy answer today :)

    And, since all us sales and service pros apparently don't have enough programming knowledge to do exactly what we'd love to do, I would love to entertain the idea of contracting with any wordpress expert out there who can implement the more advanced features we want in return for a percentage of our earned commissions. On that note, fair warning that we're a group of idealists who would ask you to cap your earnings around $150K and donate the rest to charity (Warren Buffett style, beaches ;-p).

    At any rate, thanks for reading. And, here's to hoping this isn't one of those WordPress forum questions that remains unanswered for 2 years.

    Thanks!

    Sean

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Try http://jobs.wordpress.net/
    Topic now closed as per the Forum Rules

Topic Closed

This topic has been closed to new replies.

About this Topic