Score:0

Is it possible to set up Amazon advertising with the Media module?

ph flag

I have a Drupal 9 site with the Media module enabled.

I have subscribed to the Amazon partner program.

Is there a solution to display Amazon iframe in Drupal? I am thinking of the Media module.

Many websites display the product name with the updated price in real time. I did not find anything to fire this.

My question :

Is it possible to set up Amazon advertising with Drupal 9 and the Media module?

Score:1
cn flag

I wouldn't use the media module for this because eventually your needs may get more complex and you'll want access to the Amazon Product Advertising SDK.

Thankfully there's a module that supports this already, Amazon Product Advertising.

It does not yet have a stable release for D9, but it's in active development (new beta released last week).

cn flag
@Mathieu If you have a requirement like "must not use cookies from Amazon," that should be part of the question. AFAIK, Amazon `<iframe>` will ALWAYS load an Amazon cookie, so if you don't want the cookie, you can't use an `<iframe>`. You can make a static affiliate link to Amazon, but of course in that case you can't show the updated price in real time.
Mathieu avatar
ph flag
Thank you for the answer. Do you know if you have the Amazon Partner API, it is possible to retrieve the price without loading third-party cookies ?
cn flag
@Mathieu That's a Stack Overflow question and I don't know the answer. But my guess would be that in exchange for giving you up-to-date information (and an affiliate commission), Amazon wants to track your users.
Mathieu avatar
ph flag
Yes, but the module is not ready. I would have liked to add a taxonomy tags field in a media type to display contextual affiliation with block Views.
cn flag
@Mathieu I don't understand what you want to do then. If you just want to use the `<iframe>` Amazon gives you in the affiliate UI on Amazon.com, you can cut-and-paste that code into Drupal anywhere you have `Full HTML` enabled, including node bodies, taxonomy term fields, etc. There's no special reason to use media in that case.
Mathieu avatar
ph flag
Ok thank you, but the problem with this solution is that Amazon loads cookies on my domain, so it forces me to ask for consent from visitors https://ibb.co/fDHZyHw
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.