Revenue sharing would be awesome

sonicthoughts - January 2, 2008 - 03:27
Project:Amazon
Version:HEAD
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:postponed
Description

If so, I would find it very useful and willing to colaborate.

#1

wayland76 - February 14, 2008 - 02:47

I'm also interested to know how active this is going to be

#2

wayland76 - February 14, 2008 - 03:50

Also, have you considered working together with the adsense module to create some kind of "affiliating" module that both of these could depend on?

#3

Eaton - February 14, 2008 - 16:44
Status:active» fixed

Greetings!

Yes, the module is under active development, and it's functional as a 'pure API' at the moment. Any developers using Drupal 6 can use it to pull data from Amazon's ECS services, and the search system is operational. As noted in the TODO doc, Views and CCK integration are underway and depend on the work that's being done on both of those projects to ready them for Drupal 6.

I haven't worked with the maintainer of the Adsense module, though, as there isn't really much overlap in how the two modules operate. While both deal with affiliate programs conceptually, there's no similarity in how the Adsense and Amazon ECS programs work on a daily basis.

#4

wayland76 - February 14, 2008 - 20:56

Hmm. I know there's a lot of stuff that isn't common, but I was wondering in particular about the revenue-sharing code. I believe that in both cases, the associate ID has to be changed on the drupal site under conditions that are probably best specified by the user.

http://drupal.org/project/adsense

For anyone wondering where the TODO document is, I presume he's referring to this:

http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/amazon/TODO...

Eaton, thanks for updating us :).

#5

wayland76 - February 14, 2008 - 21:27

Just a tip -- lots of the other projects have their submodules in separate directories. I'm in favour of the idea :).

#6

Eaton - February 14, 2008 - 21:34

Hmm. I know there's a lot of stuff that isn't common, but I was wondering in particular about the revenue-sharing code. I believe that in both cases, the associate ID has to be changed on the drupal site under conditions that are probably best specified by the user.

Hmm, that's an interesting idea. Are you suggesting that, say, individual users could have their own amazon codes, and that content THEY post would have their own affiliate code included? That's an interesting idea, though I'd have to spend some time thinking about it. Doing it that way would likely interfere with the way that the current caching code works...

#7

wayland76 - February 15, 2008 - 20:57

That's the general idea, but with the way the revenue sharing stuff in the adsense module works, it will sometimes choose the site code, and sometimes choose the user code, so that both of them get a slice of the revenue. The exact algorithm is configurable. If you click on the adsense link I included in my post, the adsense guy discusses all this.

#8

wayland76 - February 15, 2008 - 21:22

Oh, I should also mention, there are multiple requests in the issue queue for the amazontools project requesting this functionality, including, IIRC, some closed ones marked "duplicate".

There are also a number of patches in that issue queue which might interest you.

#9

Eaton - February 16, 2008 - 19:28
Title:Are you actively working on this» Revenue sharing
Status:fixed» postponed

The difficulty with revenue sharing for this system lies in the fact that affiliate links are generated BY Amazon based on requests via their web service. The results of those requests are cached for speed, meaning that the only the first user to refer to a book would get affiliate credit. In theory, a string-substitution mechanism could be used to swap out the cached affiliate code with a dynamic one, but that would be possible using a plugin module rather than putting the core functionality in the Amazon module itself.

I'll think it over -- right now, getting proper themed output of the items, CCK integration, and Views integration takes priority.

#10

wayland76 - February 17, 2008 - 23:42

Sounds good. One thing at a time :).

#11

wayland76 - February 18, 2008 - 01:53

Alpha version of Views available.

#12

911 - March 1, 2008 - 15:31
Title:Revenue sharing» Revenue sharing would be awesome

Hi Eaton,

I am searching for such a Module for a while. I found the Amazon Associate Tool Modul but I missed a revenue Share option. Also was looking for something more flexible, where I can define which Information should be pulled from amazon (Picture, Title, Rating, userrieviews, etc..). Perhaps with Templating system.

I am not shure if this Module just gives a hook for the amazon api for developing other modules, or if it will be Amazon Affiliate Module on its own. The Amazon Revenue Sharing Modul with a good role and percentage managing would rock. I am shure many other users would like this. Amazon Revenue Sharing would be great for product review sites. Option to work with the User Refferal Modul like the Adsense Module does would be great too.

I am sorry I cannot active help with programming because I have no programming skills, but if you or some other developers are working on such a Amazon Affiliate Modul I would make some donation for support.

Best Regards
Holger

#13

arphaus - March 15, 2008 - 16:55

Would it be possible to randomize the affiliate ID when the node is viewed?

#14

reikiman - June 28, 2008 - 15:23

Maybe different people see revenue sharing in different ways. Randomizing the affiliate ID is only one possible strategy for revenue sharing. Another possible strategy is for any amazon links they post would be associated with their amazon affiliate ID.

As for the links only being generated by amazon...

Amazon used to tell us to use links in this format:
http://www.amazon.com/exec/obidos/ASIN/__ASIN__/__ID__/

I'm not finding that format link in their online help any longer. However those links still work.

#15

Eaton - June 28, 2008 - 16:43

Amazon used to tell us to use links in this format:
http://www.amazon.com/exec/obidos/ASIN/__ASIN__/__ID__/

Yeah, it's a little tricky -- at this point I'm NOT generating the links automatically, rather I'm searching based on ASIN and caching the detail page URL that Amazon sends back. The result is a somewhat inconsistent result.

The best solution I can come up with (at the moment, at least) is to search-and-replace amazon URLs, replacing the site's "default" associate ID with another person's associate ID based on the revenue sharing model. The trick is that the 'replaced' version is very likely to be cached by drupal's page caching or data caching layers at some point, and the rules by which the substitution happens could be a little tricky.

The model mentioned earlier -- replacing the affiliate ID with the ID of the user who posted the node -- is probably somewhat more reliable, since per-node cached copies would remain consistent. I'll think it through. One way to accomplish THAT would be to make sure that the amazon-item.tpl.php file gets a copy of the node that the amazon item is associated with, if it's being shown in that context. Then, a template_preprocess() hook would be able to swap associate IDs, putting all the logic in a 'revenue sharing module' rather than the core amazon module.

I think I've totally veered off what anyone understands, so I'm posting this more as a reference for myself when I come back to implement this. hah.

#16

arphaus - July 13, 2008 - 20:52

I think replacing the associate ID with the one of the user posting the node is fair - at least it's a solid start :-)

#17

911 - September 21, 2008 - 00:51

10 Weeks later. Any updates on this?

#18

Eaton - September 21, 2008 - 03:05

Nope. Time's been taken on other things so far, including the Views RC2 API updates. Anyone interested in helping should take a look at:

1) The view rendering functions for the detailpageurl, image, and title fields. They all use the detailpageurl, and would need to swap in a replacement associate ID at render-time.

2) The load and preprocess functions that handle theming individual items. Intercepting stored associate IDs in the detailpageurls before they're displayed and swapping them out at load time depending on context could work.

The latter is probably the best, as loading ASINs in a CCK field is the most common scenario. This is a relatively low-priority feature, though, until a better upgrade path from the D5 amazon module is in place and some of the other related utilities (like search integration) are completed.

#19

911 - September 23, 2008 - 19:27

Hi Eaton,

thanks for the Info. Its done when its done :D

I am sorry, I cannot help with coding. But isnt it easier to build the amazon affiliate links manualy by the module instead of using the url provided by the api and then swapping the assiciate id?

You could simple use the url posted above a few posts before

http://www.amazon.com/exec/obidos/ASIN/__ASIN__/__Associate_ID__/

and simple render the Url using the ASIN Value from CCK Field for __ASIN__ and Associate ID from Modul Setting for _Associate_ID_ or rather (perhaps with an additional amazon revenue share modul which handles percentage Admin ID or User ID is used) use the Users Associate ID from a custom User field (simmilar like it is done with the adsense module)?

The targed of the URL Postet above is the same as the URL providet by the API. Isnt this easier and favorable?

just another quick question:

is there a chance that ther will be an additional Module to use Amazons Cart option providet by amazon api with drupal amazon modul? A Module which provides Cart functionallity?

So you could build an powerfull amazon affiliate shop like you can do with AOM but with all the drupal features? This would be an awesome enhencement. I like AOM but it is very incommodious to have unique content as produkt description (no sql etc). With drupal and all its features like blog, forum, etc it would be genious.

What about a paypal donation email adress. I am already using your amazon modul on a life site for testing and I like your modul. I cannot pay your work, but I would like to give some support with a decent donation.

Best Regards

#20

Eaton - September 23, 2008 - 20:19

After doing a bit of digging around, it appears that the following URL structure may work:

http://www.amazon.com/gp/product/__ASIN__?&tag=__ASSOCIATE-ID__

That still leaves the question of how to best handle determining context, but it's a start...

In answer to your question, yes -- building cart integration and enabling a full Drupal-based amazon store is definitely on the list of goals, and the original maintainer of the old Amazon Associates Tools module has even forwarded over some code that might serve as an interesting starting point. I definitely appreciate the encouragement, and if you're interested in donating, I have a paypal account linked to jeff@predicate.org ... Please don't feel obligated, but I certainly never refuse a gift. :)

#21

911 - September 23, 2008 - 21:00

if you're interested in donating, I have a paypal account linked to jeff@predicate.org

Done ;)

perhaps the url strukture you posted is working to, this one I dont know. But I am using the one I posted for every direct product link to amazon and I can promise you, the tracking works correct. This is an older strukture amazon has. I think they changed something with there cms and url strukture, so they have new struktures, but (in first reason becauso of all the Amazon Associate Publishers) the links get simple redirect and work still fine now and in future (would be chaos if all old partners must update every single link they have written in html by hand ;). You can see this link strukture in some old amazon posts:
http://affiliate-blog.amazon.de/2006/12/harry_potter_7_.html

Whatever, if the other url strukture you post works the same, fine :)

And your words about bringing cart functionality to amazon modul are really great news! :)

I definitely keep an eye on the development of this modul!

Cheers
Holger

 
 

Drupal is a registered trademark of Dries Buytaert.