How to set up a tracker for media buying (a step-by-step guide)

Dear publishers,


I hope you are doing great and earning a lot of money online on MyLead’s partner programs. Recently, we have begun our series of educational articles, and today we continue with another lesson.


Today, you will learn everything you need to know about tracking. I’ll teach you how to set up a tracker server, and we’ll also talk about installing and configuring it. I will use a self-hosted tracker because I feel safer when the information I collect is on my server.




Let me first define some basic terms and provide explanations.


What is a tracker, and do you need one to succeed in affiliate marketing?


A tracker is a software tool that tracks and manages data about your campaigns. It is an essential part of every media buyer's tool belt.


The collected data is divided into:


  1. Events - the basis for all of the details that affect impressions, clicks, and conversions (leads or sales).
  2. Data about Internet users who generated clicks and leads - location, type of device, the device's software, the time it takes from the first click to a sale, etc.

A tracker will collect that data and allow you to change your campaign for the better.


How do the trackers collect the data?


Traffic Source → Tracker → Affiliate Network (MyLead) → Tracker → Traffic Source




There are two main types of trackers:


  1. Cloud-hosted - you do not have to set up a server just for the tracker, and you can use it right away.
  2. Self-Hosted - just like we’ve mentioned, first, you have to set up a server to install the tracker. Even though it might sound hard at first, it’s not as complicated as it seems.

Here are some life hacks on how to use the tracker more successfully:


  1. Take advantage of the tracker to identify the sites and platforms that take your money and don’t generate any leads, and get rid of them as soon as possible.
  2. Check at what times throughout the day the number of leads peaks and post your ads in those hours.
  3. If, by mistake or for some other reason, you are using different ad formats in one campaign (for example, a classic push and an in-page push), use the tracker to identify which one makes you more money.
  4. Check the subscription age of your classic push notifications (usually, the new subscribers give the best results).

Doesn’t that sound good?


There are high chances some of you already know how the tracker works and how to use it, but there are many new publishers, who need some further information, so here it goes.


In many cases, users don’t understand what exactly S2S postback is, so we’ve prepared a short explanation. It’s a signal from the advertiser's servers via your tracker’s server (either self-hosted or cloud-hosted, it doesn’t matter) back to the traffic source’s servers, notifying you of a conversion. The tracker works like a “bridge” between the traffic source and your affiliate network. S2S postback is a method that works independently of the user’s browser.


Another important term is a macro token. Marcos, also called tracking tokens, are a type of HTTP protocol on a URL that gives you the ability to track any data from the click ID to the type of the device that the user was using. You add a macro token to your URL and immediately get to track that type of information. To fully understand macros, you first need to learn about parameters and values. A parameter is a label or dimension for the parameter you’re trying to track, like typical performance or source of leads. Next, it is defined by the value following. The macro holds the place of the value, but then quickly changes to show the true value for the parameter. Remember that all traffic sources have different tracking tokens that you can take advantage of! We will address this topic later.


Let’s move on to the tracker setup!


I will explain how to use the Keitaro tracker - it's a very dependable, fast, convenient, and accessible tracker. It’s also quite affordable - only $20 for the basic version and $40 for the Pro version, so go ahead and use it.


What do you need to set up the Keitaro tracker? A VPS with CentOS (it is a Linux distribution), license needed for Keitaro, and about half an hour of time. That's all.


Start with a server!


Keitaro’s creators’ advice is to use a server from Digital Ocean, so let’s do it that way.


In the last article, we explained how to use DO, so now I will take advantage of my previous project and create a droplet-based on it:




To set up Keitaro, choose CentOS - make sure to mark it and select the last 8th 64-bit version.


If your volume reaches less than 10000 clicks daily (and it’s probably the case if you have just started), set up the tracker on an affordable VPS - 2 GB / 1 Intel Core. If you predict your volumes to be between 10,000 and 100,000 clicks on a daily basis, choose a VPS with 4 GB and two cores. I'd also recommend selecting a droplet with an NVMe SSD, as it’s displayed below:




My campaign is targeted at Europe, so I will locate my VPS in Frankfurt, Germany, but you can choose any other place accessible that is near your chosen GEO. If you’re running your campaigns in Asia, for example, choose droplet in Singapore:




To use the authentication method, select “Password” and insert your password in the blank field:




After that, change the hostname, add appropriate tags, and decide if you’re going to use a backup or not (I recommend using it because you will spend money on your data, and its protection):




Now the time has come to connect to our server.


For additional info on how to do that, please read our previous article.


If you’re working on Windows, you can use a software called “PuTTY”. If you are on Linux or macOS, you can connect to the server through the terminal with the following command:


ssh root@xxx.xxx.xxx.xxx - where xxx.xxx.xxx.xxx is your server’s IP




Answer the questions with “yes” to and insert the password for your VPS.




Once you're logged in, check for CentOS updates:


…and update your OS:




It should take about 3-5 minutes, and the time depends on how many updates there are and what type of VPS you’re using. After the update is complete, restart your server with the reboot command.




Wait for half a minute and connect to the server again.


Now we are all set to install the Keitaro tracker on our server.


Copy this command in the terminal or Putty (you need to be connected to the server):

curl -fsSL keitaro.io/install.sh | bash -s -- -L en


The installation process will begin automatically:




Right away, you will be asked for the Keitaro’s license (look for it in your Keitaro’s dashboard in the “Licenses” area), so paste it into the terminal.




The process of installation will begin and take some time, so you can take a break and have a hot or cold beverage while you wait.


If you did it all correctly, you should see the following message in your terminal:




Insert your password and username and let’s move on.


Insert the IP address of your server in your browser like this:


http://xxx.xxx.xxx.xxx/admin and enter the username and the password:




If you can see the dashboard after you hit the “Sign in” button, then everything is working perfectly for now:




The next step is changing the access password because it's not easy to remember computer-generated passwords.


Go to the “Maintenance” dropdown menu in the upper right corner and then click on “Users”:




Once you are in the “Users” settings, go to the “Edit” button next to the admin user and a new window will pop up:




If you wish to do so, you can change the password, username, and the time zone (it is usually best to run your campaigns in your current time zone - this will let you avoid confusion when you have multiple campaigns), and save the changes.


Now, let’s connect your domain to the tracker and Cloudflare (Cloudfare is not a necessity, but it’s a useful solution) because it’s not possible to run campaigns only on an IP address.


In the last article, we explained how to connect a domain from Namecheap to Cloudflare, and in this one, I will show you a shorter version. If any problems arise, read it again.


First, buy one or two domains - the first one connected to Keitaro’s admin panel (e.g. keitaroadmin.com) and the second one for your campaigns with a name related to the advertised vertical (e.g., hotandsexydating.com).


As I’ve already said, I'm using Namecheap for domain registration, and all the screenshots you will see below are from it.


OK, so you have your domain(s). Let's use the first one for a Keitaro’s dashboard and connect it to Cloudflare.


I will take advantage of the domain that I used before, so It’s already been connected to Cloudflare. Now, I just need to delete the previous records and add an “A” record with the proper DNS record:




For the domain name, add “@” and for the IPv4, enter your server’s IP and click “Save”. Once you’re done, you will receive the new nameservers - go back to your domain registrant and replace the default nameservers with the ones you have from Cloudflare (we explained this in the last article as well).


Return to the Cloudflare settings, click the “SSL/TLS” tab and go to the “Flexible” Mode for your SSL/TLS encryption:




Wait 15 minutes (at times, it could take a bit more) and try to access Keitaro’s admin panel, which is already connected to your domain. Insert the domain name like this: yourdomain.com/admin:




If you have been asked for your username and password, and this little padlock is next to the domain name, you’re good.


Log in to the tracker, and let’s move on. If there are any updates, make sure to use them and get the software to the latest version:






Now click on the “Maintenance” menu and choose the “Settings” tab:




Click on the “Bots” tab, and mark “Yes” in every box, just as it’s shown on the screenshot below:




If you own a bot database, add it to “Additional bot IPs” and then click the “Add” button.


When you’re finished, go to the “Main” tab and activate the campaign autosave mode (trust me, it can be a real lifesaver):




Now, let’s add the domain that will be your first campaign with Keitaro (you can use the default one as well, but in my experience, it is better to use a different one).


Log in to Cloudflare and your registrant, and do the same things as before:

  1. Connect your domain with Cloudflare.
  2. Delete all the previous entries and add a new “A” record to your domain - use “@” for the name and for IPv4, your server’s IP.
  3. Replace the default nameservers in the registrant with Cloudflare's new ones.
  4. Enable the SSL Flexible Mode for the domain in Cloudflare (You can skip this step because the tracker will automatically generate a FREE SSL certificate for the newly added domain).

When you're done, go to the "Domains" tab in Keitaro and click the "Add" button:




You will see this window:




Enter the domain name, enable "redirect to HTTPS" (in case you don't use Cloudflare's SSL certificate or both), and disable indexing (this will prevent search engine bots from inspecting your landing pages). Click the “Create” button.


There is usually a little period of time while the nameservers are redirected and your domain is connected to the tracker; simply wait an hour and check back.


After that, you may create your first campaign and start earning money with MyLead offers. The topic of our next article will be how to start a campaign with the knowledge you already have.


As promised at the start of the article, I'd want to clarify values and parameters in detail before the end! Let’s take a look at the example below:


https://systemupdate.app/nzBvY3?cost={bid}&creative_id={creativity_id}&ad_campaign_id={campaign_id}


The domain name appears in blue. The green section is an alias that Keitaro assigned to my campaign automatically (but it can be modified). The query string begins after the red question mark after the alias. Parameter names appear in yellow, whereas property values appear in magenta. The & signs are used to separate query strings.


When you click and redirect, the query string is the section of the URL where information is sent from one server to the next.


Every offer will have some way to pass your tracking "click ID" to the query string - in Keitaro URL, you'll place the token {subid} in a specific place in every offer URL. That “place” is in a Query String Parameter. It’s the yellow-colored section of the URL (e.g. cost, creatve_id).


All of the parameters used in the MyLead network are listed here.


That concludes today's discussion. We'll talk again shortly.


Alex from MyLead


About MyLead:

MyLead is a dynamically developing affiliate network operating for over 8 years. It offers over 3,000 programs in dozens of categories, among others fitness, accessories and additions, dating, health and beauty, gaming, fashion, gambling. It offers strong and very fast multilingual support, available 7 days a week. Publishers get tutorials, mentoring, and tools (such as Content Locker or HideLink) - everything free of charge.

Alpha Affiliates