Lesson 1, Topic 1
In Progress

Creating a Custom Affiliate Link

CLICK HERE TO USE THE LINK CODE GENERATOR!

Click on the titles below to expand the section. Click on images to enlarge.

Creating a custom affiliate link

You add affiliate tracking to any NaturalWellnessAcademy.org page simply by appending ?ap_id=exampleid to the end of the web address (replace “example” with the affiliate’s affiliate user id — to see a list of affiliates, with affiliate ID in the first column, click here), such as: naturalwellnessacademy.org/cannabis?ap_id=exampleid or naturalwellnessacademy.org/?ap_id=exampleid. So, for any affiliate link, you need:

  1. the affiliate’s user ID and
  2. an NWA webpage that you want to send the visitor to

If we want to, we can add a third option — an image.

  1. an ad image

Above on this page, we learned how to get an image URL. So now we can use these three ingredients to create an image banner link.

In HTML, a link is created as follows. The thing you want to link (text or an image) is wrap in code. Here is an example.

So, in this case, we want to put an image for the thing we link. In HTML, an image is displayed as follows.


Generic Banner Code Template

So we want to take our image code, and put it inside the link code. This will cause the image to be linked. In the code sample below, replace WEBSITE-ADDRESS-YOU-WANT-LINK-TO-GO-TO and URL-ADDRESS-OF-THE-IMAGE with the appropriate URLs. Make sure the WEBSITE-ADDRESS-YOU-WANT-LINK-TO-GO-TO has the ?ap_id=exampleid appended to add affiliate tracking, if it is needed. Do not remove any of the quotation marks, backslashes, or left/right brackets in the code — they are needed.

There are other things we can add to the code to style it and so on, but that is for another lesson.


Working Example Code: Banner Link

This is an example of a banner code that shows a certain image and when clicked, takes the user to the front page with affiliate tracking attached.

Here is what this code displays:


Need help uploading or finding an image? Click here.

Natural Wellness Academy