Elegant supports Amazon OneLink, so that you may monetize your traffic using affiliate links.

Visit Amazon website and create your OneLink account. Amazon will provide you a code snippet similar to following,

<div id="amzn-assoc-ad-$UUID"></div>
<script
  async
  src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=$UUID"
></script>

Pay close attention to the amzn-assoc-ad- part. The value following it is your Amazon OneLink id.

In your pelican configuration, preferably in the file publishconf.py, set AMAZON_ONELINK to your Amazon OneLink id, for example,

AMAZON_ONELINK = "b63a2115-85f7-43a9-b169-5f4c8c275655"

When the site is generated, $UUID in the snippet above is substituted with your id. Thus, ensuring that correct referral code is passed to the script.

Now, when international visitors of your site click on a link on your site to buy from Amazon, they are redirected to their local or nearest Amazon market place. For example, original link (Python book):

This is an optional feature. If you do not set the variable then Amazon OneLink script is not added to the rendered output.

You, as a content creator, should be aware of GDPR or other regulations. Section 5 of the Operating Agreement for Amazon Associates states that you need to disclose your affiliation with Amazon and that you earn from qualifying purchases.

To conform to this rule in the agreement, Elegant automatically adds the disclaimer in the footer of the website if AMAZON_ONELINK variable is set. It looks like this,

Amazon OneLink Disclosure

Like this post? Share on: TwitterFacebookEmail


Pablo Iranzo Gómez Avatar Pablo Iranzo Gómez opensource enthusiast and Lego fan doing some python simple programs like @redken_bot in telegram, etc
Talha Mansoor Avatar Talha Mansoor is the creator and lead developer of Elegant theme.

Keep Reading


Published

Last Updated

Category

Monetizing Your Blog

Tags

Stay in Touch

Get New Release Alert