1. Home
  2. How To
  3. How to add Amazon affiliate ads in custom code?

How to add Amazon affiliate ads in custom code?

Are you getting started with Amazon affiliate advertising? which helps you find, attract, and engage millions of Amazon customers at every stage of their journey, The Ads provide highly relevant and dynamic product recommendations in a stylishly designed and responsive ad unit that can be placed at the end of content or within the content to create a more compelling visitor experience and shopping opportunity.

And the same Ads you want to show in AMP then you need to follow these steps:

Step 1: You can download ADSforWP Plugin it’s a free plugin you can download from WordPress.

This is an example of AMP-compatible code of the Amazon Ads:

  data-amzn_assoc_title="My Amazon Picks"

For more info of  Amazon affiliate Ad Click Here.

Step 2: After installing this plugin Ads option will be displayed on the WordPress dashboard ->Ads Option -> create new Ads.

Step 3: In Ad Type, you need to select the Custom Code Option.

Step 4: In this option, you need to enter the body code of Amazon affiliate ad

Step 5: Click on “Publish” button your Auto Ads will be displayed on AMP pages.

Required parameters

  • data-amzn_assoc_ad_mode – specify the ad type as search, manual or auto (for recommendation ads)

Scroll down a little to see this option


  • Display Type: In Display type, you’ll see the number of display type which you can use as per your convenience. However, if you want to display the InContent Ads as the name suggests it is used to display the ads in the content of your post by simply putting between the paragraphs.
  • Position: In this option, you’ll see two Position’s in which you can display the ad’s by selecting 1.) 50% of the content  2.) The number of paragraph option in which It asks you to enter the paragraph number to display the ads.
  • Alignment: This option allows you to select the alignment option of the ad.
  • Margin: You can also set the margins of the ads as per your taste.
  • Embed Shortcode: Copy the shortcode and place where you want to display the Sticky Ads.

Advanced Display Conditions

  • In this section, you need to set the condition for the specific post or page or all posts where you want to show MGID Ads.

That’s it for this tutorial!

We hope it helped you. If you have any feedback or questions or do you want us to create compatibility for any other Ad company which isn’t listed in our plugin then you can request us we will surely implement it as soon as possible.

Just contact us here and we are always available for you.

Updated on February 17, 2020

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment