How to generate affiliate QR codes in WordPress
You can generate an affiliate QR code without a dedicated WordPress plugin: copy the affiliate’s tracked referral URL, add campaign parameters if needed, and turn that complete URL into a QR image. For many affiliates, an add-on that creates codes in their dashboards is the faster option.
- 01Copy the tracked affiliate URL
- 02Add campaign tracking if needed
- 03Generate the QR image manually
- 04Test the scan and attribution
- 05Check caching before launch
- 06Use an affiliate QR add-on
What you need
- An active WordPress affiliate programme
- A valid affiliate referral URL
- Access to your WordPress dashboard or a QR code generator
- A phone for scan testing
Copy the tracked affiliate URL
Start with the affiliate’s actual referral link, not the ordinary product or home-page URL. It may contain a query parameter such as ?ref=123 or use a pretty path such as /ref/123. The affiliate system uses that identifier to assign the visit and any later conversion to the right partner. AffiliateWP documents both query-string and pretty referral URL formats.
If the code should open a particular product or landing page, create the referral URL for that destination first. Do not copy the destination URL by itself, or the QR code will open the page without affiliate attribution.
Add campaign tracking if needed
Use UTM parameters when you want to distinguish printed materials or locations in your analytics. For example, add utm_source=poster, utm_medium=qr, and utm_campaign=summer_event to the affiliate URL. Keep the affiliate identifier and the UTM parameters in the same final URL. Google Analytics recommends using source, medium, and campaign parameters for campaign URLs.
Use a separate campaign value for each flyer, event, shop, or affiliate placement you need to compare. Check that your affiliate system still receives its own referral parameter after you add the UTM values.
Generate the QR image manually
Paste the complete tracked URL into a QR code generator that can export a PNG or SVG image. A WordPress plugin is not required for a static code because the QR image only stores the URL; the affiliate platform does the tracking when the scan opens that URL.
Choose a high-resolution export, keep strong contrast between the code and its background, and leave clear space around the outside. Do not edit the encoded URL after generating the image. If you change the referral link, generate a new QR code.
Test the scan and attribution
Scan the finished image with a phone in a private browser window. Confirm that it opens the intended page, retains the affiliate information, and does not produce a 404 error. If your affiliate platform has a visits or clicks report, check for the test visit before printing hundreds of copies.
For AffiliateWP pretty links that return a 404, visit Settings » Permalinks and save the existing settings without changing them, then clear relevant caches and test again. This refreshes WordPress rewrite rules.
Check caching before launch
If scans open the page but visits or referrals are missing, check caching, CDN, consent tools, ad blockers, and JavaScript errors. Affiliate tracking normally depends on a referral cookie, so a cache or optimisation layer that strips or mishandles tracking data can break attribution. AffiliateWP specifically warns that caching and script optimisation can interfere with its tracking cookies.
Test while logged out and use a clean browser session. Do not assume a successful page load means the affiliate visit was recorded.
Use an affiliate QR add-on
The fast way is to use AffiliateWP Affiliate QR Codes if your site already runs AffiliateWP. It creates a QR code from each affiliate’s referral link and makes the code available from the affiliate dashboard, so you do not have to copy links and generate images by hand for every partner.
This is worth using when several affiliates need their own print-ready codes or when you want the QR image tied directly to the referral-link workflow. The manual route is fine for a small number of static codes; the add-on is more practical for a growing programme.
Let AffiliateWP Affiliate QR Codes do it
Automatically creates tracked QR codes from AffiliateWP referral links for print and offline promotions.
Sources
- affiliatewp.com /docs/affiliate_referral_url/?utm_source=openai
- support.google.com /analytics/answer/10917952?hl=en&utm_source=openai
- affiliatewp.com /docs/why-do-i-see-404-page-when-testing-referral-link/?utm_…
- affiliatewp.com /docs/getting-support-affiliatewp/?utm_source=openai
Questions
- Can I create an affiliate QR code without a WordPress plugin?
- Yes, you can create a static affiliate QR code without a WordPress plugin. Copy the complete tracked referral URL into a QR generator, download the image, and test it before printing. The QR code itself does not record commissions; it simply opens the referral URL, while your affiliate platform handles cookies, visits, and conversion attribution.
- Should the QR code contain the affiliate link or the normal product URL?
- The QR code should contain the complete affiliate referral URL. A normal product URL may open the right page but will not identify the referring affiliate. If you want campaign reporting, add UTM parameters to the affiliate URL rather than replacing its referral parameter, then verify the final address before generating the image.
- Can I use a QR code for a specific product or landing page?
- Yes, create the affiliate link for the specific product or landing page first, then turn that full link into the QR code. AffiliateWP supports referral URLs for custom destinations, including specific pages and posts. This lets you make separate codes for a product flyer, event poster, email insert, or business card.
- Why does my affiliate QR code open the page but not track the referral?
- The usual causes are a missing referral parameter, a URL copied before it was generated for the affiliate, caching that interferes with tracking cookies, JavaScript errors, or testing in a session that already has conflicting affiliate data. Test the exact URL while logged out, inspect the affiliate visits report, clear caches, and check browser cookies before changing the QR image.
- Do QR scans count as affiliate clicks?
- A QR scan normally counts like a visit to the encoded affiliate URL, provided the code opens the valid tracked link and the visitor’s browser accepts the tracking data. It does not guarantee a commission: the visitor still needs to complete an eligible conversion within your programme’s rules and tracking window.