DEV Community

SIYUM
SIYUM

Posted on

Affiliate Tracking System for Networks — Part 1

Today I started to building the backend. As technologies I will use NodeJS. I will use the express server and MongoDB as database.

My first function is like this, after affiliate click the link that is generated on the dashboard, should redirect him to relevant offer. Meantime the data also should stored on the database. For example the User agent, OS, Browser …etc must be stored on the database. This will later used to the generate the reports. And when we redirecting the user to the relevant offer, we should be cared the targeting too. If the user has to live on the specific country in order to access the offer.

This is the core concept of the Click. I started creating the Data models. The clicks contains following attributes.

Here is my Click Model:

Image description

After basic implementation I might add the other data like SubID1, SubID2 also for that. In the app, I created route like this

/click?a={affiliateID}&o={offerID}. Whenever user clicks on the link if will redirecting to the offer, after registering the relevant data.

Image description

And the code will go on. Thats how I determined the relevent data. And for the click ID I used uuid. This must be a unique on as the postbacks are firing to this. Then it will check on the database for the clickID, then it will save a lead on the database. More on that later.

Thats update on the backend, for the front end I might use the bootstrap as I have only few knowledge on the React or any other. So I am comfortable with bootstrap. I will use the handlebars as the view engine.

And I choose a template, I found an eye catching one from creative tim. I really need that.

Image description

I really like that design and I am going to use that.

Thats all updates about the current project. I will update more on ASAP. If you have any suggestion please let me know. Thanks for your time on reading this.

Top comments (0)