{"id":986,"date":"2024-05-07T11:48:32","date_gmt":"2024-05-07T11:48:32","guid":{"rendered":"https:\/\/kb.shortpixel.com\/docs\/how-affiliate-links-work\/"},"modified":"2025-08-27T08:38:33","modified_gmt":"2025-08-27T08:38:33","password":"","slug":"how-affiliate-links-work","status":"publish","type":"docs","link":"https:\/\/kb.shortpixel.com\/knowledge-base\/article\/how-affiliate-links-work\/","title":{"rendered":"How affiliate links work"},"content":{"rendered":"\n<p>When users click on an affiliate link, a cookie is stored in their browser for one month. Immediately after they sign-up on our website or within the next 30 days from the time they click on the link, they&#8217;ll be registered in our system with the affiliate reference. Shortly after their purchase, 30% of the revenue goes to the affiliate.<\/p>\n\n\n\n<section class=\"callout-yellow\">If a user already has an account with ShortPixel, even if the affiliate sends the link and the user clicks on it before making a purchase, <strong>nothing<\/strong> will be credited to the affiliate.<\/section>\n\n\n\n<p>The affiliate links have the following format:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">https:\/\/shortpixel.com\/CODE\/af\/AFFILIATE_CODE<\/pre>\n\n\n\n<p>Depending on the <code>CODE<\/code> value, the user will be redirected to a specific URL. By default, the affiliate links point to the <a href=\"https:\/\/shortpixel.com\/pricing\" rel=\"noopener\">pricing page<\/a>, but if you want you can edit this by changing the <code>CODE<\/code> value as follows:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>CODE Value<\/td><td>Redirected URL<\/td><td>Affiliate link example<\/td><\/tr><tr><td>wp<\/td><td><a href=\"https:\/\/wordpress.org\/plugins\/shortpixel-image-optimiser\/\" rel=\"noopener\">https:\/\/wordpress.org\/plugins\/shortpixel-image-optimiser\/<\/a><\/td><td><a href=\"https:\/\/shortpixel.com\/\" rel=\"noopener\">https:\/\/shortpixel.com\/<\/a><strong>wp<\/strong>\/af\/AFFILIATE_CODE<\/td><\/tr><tr><td>wpspai<\/td><td><a href=\"https:\/\/wordpress.org\/plugins\/shortpixel-adaptive-images\/\" target=\"_blank\" rel=\"noopener\">https:\/\/wordpress.org\/plugins\/shortpixel-adaptive-images\/<\/a><\/td><td><a href=\"https:\/\/shortpixel.com\/\" rel=\"noopener\">https:\/\/shortpixel.com\/<\/a><strong>wpspai<\/strong>\/af\/AFFILIATE_CODE<\/td><\/tr><tr><td>h<\/td><td><a href=\"https:\/\/shortpixel.com\/image-compression-test\" rel=\"noopener\">https:\/\/shortpixel.com\/image-compression-test<\/a><\/td><td><a href=\"https:\/\/shortpixel.com\/\" rel=\"noopener\">https:\/\/shortpixel.com\/<\/a><strong>h<\/strong>\/af\/AFFILIATE_CODE<\/td><\/tr><tr><td>otp<\/td><td><a href=\"https:\/\/shortpixel.com\/pricing-one-time\" rel=\"noopener\">https:\/\/shortpixel.com\/pricing-one-time<\/a><\/td><td><a href=\"https:\/\/shortpixel.com\/\" rel=\"noopener\">https:\/\/shortpixel.com\/<\/a><strong>otp<\/strong>\/af\/AFFILIATE_CODE<\/td><\/tr><tr><td>pac<\/td><td><a href=\"https:\/\/shortpixel.com\/pricing-adaptive-cdn\" rel=\"noopener\">https:\/\/shortpixel.com\/pricing-adaptive-cdn<\/a><\/td><td><a href=\"https:\/\/shortpixel.com\/\" rel=\"noopener\">https:\/\/shortpixel.com\/<\/a><strong>pac<\/strong>\/af\/AFFILIATE_CODE<\/td><\/tr><tr><td>ms<\/td><td><a href=\"https:\/\/shortpixel.com\/pricing\" rel=\"noopener\">https:\/\/shortpixel.com\/pricing<\/a><\/td><td><a href=\"https:\/\/shortpixel.com\/\" rel=\"noopener\">https:\/\/shortpixel.com\/<\/a><strong>ms<\/strong>\/af\/AFFILIATE_CODE<\/td><\/tr><tr><td>tos<\/td><td><a href=\"https:\/\/shortpixel.com\/tos\" rel=\"noopener\">https:\/\/shortpixel.com\/tos<\/a><\/td><td><a href=\"https:\/\/shortpixel.com\/\" rel=\"noopener\">https:\/\/shortpixel.com\/<\/a><strong>tos<\/strong>\/af\/AFFILIATE_CODE<\/td><\/tr><tr><td>pp<\/td><td><a href=\"https:\/\/shortpixel.com\/privacy\" rel=\"noopener\">https:\/\/shortpixel.com\/privacy<\/a><\/td><td><a href=\"https:\/\/shortpixel.com\/\" rel=\"noopener\">https:\/\/shortpixel.com\/<\/a><strong>pp<\/strong>\/af\/AFFILIATE_CODE<\/td><\/tr><tr><td>oic<\/td><td><a href=\"https:\/\/shortpixel.com\/online-image-compression\" rel=\"noopener\">https:\/\/shortpixel.com\/online-image-compression<\/a><\/td><td><a href=\"https:\/\/shortpixel.com\/\" rel=\"noopener\">https:\/\/shortpixel.com\/<\/a><strong>oic<\/strong>\/af\/AFFILIATE_CODE<\/td><\/tr><tr><td>fsu<\/td><td><a href=\"https:\/\/shortpixel.com\/free-sign-up\" rel=\"noopener\">https:\/\/shortpixel.com\/free-sign-up<\/a><\/td><td><a href=\"https:\/\/shortpixel.com\/\" rel=\"noopener\">https:\/\/shortpixel.com\/<\/a><strong>fsu<\/strong>\/af\/AFFILIATE_CODE<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>In addition, <strong>each page on the website can be linked<\/strong> as follows:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>visit a page you would like to link to, e.g. <a href=\"https:\/\/shortpixel.com\/products\/shortpixel-image-optimizer\" rel=\"noopener\">https:\/\/shortpixel.com\/products\/shortpixel-image-optimizer<\/a><\/li>\n\n\n\n<li>add at the end <code>\/af\/<\/code> and then the <code>AFFILIATE_CODE<\/code>, for example<br><a href=\"https:\/\/shortpixel.com\/products\/shortpixel-image-optimizer\/af\/AFFILIATE_CODE\" target=\"_blank\" rel=\"noopener\">https:\/\/shortpixel.com\/products\/shortpixel-image-optimizer\/af\/AFFILIATE_CODE<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>When users click on an affiliate link, a cookie is stored in their browser for one month. Immediately after they sign-up on our website or within the next 30 days from the time they click on the link, they&#8217;ll be registered in our system with the affiliate reference. Shortly after their purchase, 30% of the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[46],"glossaries":[],"doc_tag":[],"class_list":["post-986","docs","type-docs","status-publish","hentry","doc_category-account"],"blocksy_meta":[],"year_month":"2026-04","word_count":290,"total_views":"3750","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"admin","author_nicename":"admin_mdli53m5","author_url":"https:\/\/kb.shortpixel.com\/author\/admin_mdli53m5\/"},"doc_category_info":[{"term_name":"Account","term_url":"https:\/\/kb.shortpixel.com\/knowledge-base\/category\/account\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/986","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/comments?post=986"}],"version-history":[{"count":3,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/986\/revisions"}],"predecessor-version":[{"id":1978,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/986\/revisions\/1978"}],"wp:attachment":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/media?parent=986"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_category?post=986"},{"taxonomy":"glossaries","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/glossaries?post=986"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_tag?post=986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}