Important: this documentation is not applicable to your currently selected format email!
Run skimlinks inside your AMP page.
<script async custom-element="amp-skimlinks" src="https://cdn.ampproject.org/v0/amp-skimlinks-0.1.js"></script>
Skimlinks allows you to monetise your content through affiliate marketing. It gives you instant access to over 24,000 merchant affiliate programs without the hassle of network sign ups, approvals or creating affiliate links.
amp-skimlinks is the AMP version of the traditional Skimlinks scripts which allows you to automatically turn your normal merchant links into monetisable links and gives you access to analytics data about how your content is performing.
A skimlinks account is required in order to use amp-skimlinks
Add the required script
<head>...</head> section of your AMP page, insert this code before the line
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-skimlinks" src="https://cdn.ampproject.org/v0/amp-skimlinks-0.1.js" ></script>
Add the amp-skimlinks extension
<body>...</body> section of your AMP page, insert this code:
<amp-skimlinks layout="nodisplay" publisher-code="123X456"> </amp-skimlinks>
The final code should like:
<!DOCTYPE html> <html ⚡> <head> ... <script async custom-element="amp-skimlinks" src="https://cdn.ampproject.org/v0/amp-skimlinks-0.1.js" ></script> ... <script async src="https://cdn.ampproject.org/v0.js"></script> </head> <body> ... <amp-skimlinks layout="nodisplay" publisher-code="YOUR_SKIMLINKS_CODE" ></amp-skimlinks> .... </body> </html>
|publisher-code (required)|| |
Your skimlinks publisher code (also called "site Id").
If you don't know what's your publisher code, you can find it on the Skimlinks Hub ("Site ID" column.).
|excluded-domains (optional)||A whitespace separated list of domain names.
All the links belonging to a domain in that list will not be affiliated nor tracked by skimlinks.
By default amp-skimlinks does not exclude any domains.
|link-selector (optional)|| |
WARNING: Don't set this option unless you really need it. When using this option, always double check that your CSS selector is matching your links. When
|custom-tracking-id (optional)|| |
See amp-skimlinks rules in the AMP validator specification.
You've read this document a dozen times but it doesn't really cover all of your questions? Maybe other people felt the same: reach out to them on Stack Overflow.Go to Stack Overflow Found a bug or missing a feature?
The AMP project strongly encourages your participation and contributions! We hope you'll become an ongoing participant in our open source community but we also welcome one-off contributions for the issues you're particularly passionate about.Go to GitHub