1. Home
  2. How To
  3. How to add Viglink ad with AMP integration

How to add Viglink ad with AMP integration

If you want to add Viglink affiliate ad network in AMP then follow this two steps

1. Enter HTML in Head: Add the below code in the “Enter Html in head” section from Advance settings.

Here is the code:

<script async custom-element=”amp-link-rewriter” src=”https://cdn.ampproject.org/v0/amp-link-rewriter-0.1.js”></script>

Go to the Amp option panel -> Settings -> Advance settings, there you will find options.

2. Go to Ads  -> Add new Ads -> Select Customcode  Ad Type -> Add HTML markup

Custom Code: Add the below code in “Custom code” section from Ads.

3. In this code, you need to enter your API key and you will get this key from Here.

Here is the code:

<amp-link-rewriter layout="nodisplay">
  <script type="application/json">
     "output": "https://redirect.viglink.com?key=${apiKey}&u=${href}&type=ap&loc=SOURCE_URL&ref=DOCUMENT_REFERRER",
      "apiKey": "YOUR_API_KEY_HERE"
</amp-link-rewriter>  </pre>

That’s it for this tutorial!

We hope we’ve clear your doubts in case If you have any feedback or questions, then please share them in the comments section below.

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

Updated on June 14, 2019

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