1. Sovrn Commerce
  2. Troubleshooting & FAQ

How to Use Sovrn Commerce with Google AMP

Sovrn //Commerce Publishers can take advantage of Google AMP while also monetizing affiliate links. Learn how in this article.

Accelerated Mobile Pages (AMP)​ is Google's solution that improves site speed and performance for mobile devices. AMP sets specific style and content requirements to slash load times and improve mobile display — these pages load 10 times faster and use 10 times less data than standard mobile pages.

These optimizations can also increase clickthrough rates. Since Google prioritizes AMP pages in search results, non-AMP pages often appear lower on the results page.

The Monetization Challenge

Historically, publishers who supported AMP or were planning to become AMP-compliant have been unable to monetize links on these pages. Since we can’t automatically “convert” links on AMP pages to affiliate links, publishers miss out on earning from the traffic they drive. Previously, AMP users were required to hard code links (create links manually) to AMP-enabled pages.

The //Commerce AMP solution

Our AMP solution makes sure that you earn the revenue you deserve. Now, you can use our automated solutions Convert and Insert on your AMP pages, just as you have been on your non-AMP ones. We’ll be able to recognize and affiliate links automatically on your AMP pages so that you can make the most of mobile.

How to install

Follow this link to find the AMP specific instructions and follow the directions there, or simply follow the instructions found below:

 

1) Copy this AMP code to your clipboard.

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

 

2) Paste the code on your pages.

This code should be inserted inside the ​<head>...</head>​ section of your pages, above any other AMP scripts.

 

3) Find the API key for the site that you're using. To find your site specific API key, please follow the instructions here.

 

4) Copy this VigLink code to your clipboard. Make sure you replace the bolded text below with your API key.

<amp-link-rewriter​ ​layout​=​"nodisplay"​> ​<script​ ​type​=​"application/json"​>
{
​"output"​:
"https://redirect.viglink.com?key=${apiKey}&u=${href}&type=ap&loc=SO URCE_URL&ref=DOCUMENT_REFERRER"​,
​"vars"​: {
} ​"apiKey"​: ​"YOUR API KEY HERE"
}
​</script> </amp-link-rewriter>

 

5) Paste the code on your pages.

This code should be inserted inside the ​<body>...</body>​ section of your pages.

 

6) You're done!

See the ​official AMP documentation​ if you'd like more information about the ​amp-link-rewriter component.

 

Having trouble?

Reach out to us if you’re having problems with implementation, and we’ll help walk you through it.