Directlink Creation and Integration Guide

Directlink — one of the most flexible traffic monetization solutions. It is a link containing various offers in it. All you need is to place the direct link on the clickable spot. Let’s see how to create a directlink and integrate it on your website.

Ad Placement Creation

Before creating an ad placement, you need to register as a webmaster. You can register on Affilight’s landing page by yourself or our manager can register you by request.

To create an ad placement, click the button New Ad Placement.

Directlink Creation and Integration Guide
Publisher account: section New Ad Placement

Settings of Ad Placement

Give a name to the ad placement. For example, we will name our ad Test Directlink.

Directlink Creation and Integration Guide
Publisher account: Name of Ad Placement

Set location URL. The URL is used for ad mediation. If you want your users to see more relevant ads set a valid URL.

Directlink Creation and Integration Guide
Publisher account: Location URL

If your website has adult materials tick the box Website contains adult content.

Directlink Creation and Integration Guide
Publisher account: section Restrictions

Choose Traffic type. You can specify which traffic source to monetize. Leave a default setting if you are not sure which one to choose.

  • If you want to show ads only on mobile devices set Mobile.
  • If you want to show ads only on desktop devices set Desktop.

In case you limit it by one source (only Mobile or Desktop) it’s better to set up Trafficback. It is used to redirect traffic that doesn’t meet any offer targeting. For example, you send us all your mobile and desktop traffic. All mobile clicks will be monetized by Affilight, and all desktop clicks will be redirected to your trafficback URL. Later we will consider a setup more closely.

Directlink Creation and Integration Guide
Publisher account: section Traffic type

Ad Inventory

Select Directlink. If you use servers that support PHP, then promo domains can be updated automatically. In this case, tick the box PHP integration. For more information about its advantages and integration, please, read in a separate article.

Directlink Creation and Integration Guide
Publisher account: section Ad Inventory

Offer List

Select Smartlink. It is a link that automatically selects the offers by a number of parameters. This way of monetization is one of the most convenient and easy to use. Particular offers or verticals can be set up (or blocked) by an Affilight manager on your request.

Directlink Creation and Integration Guide
Publisher account: section Offer list

Integration

Trafficback URL is important for traffic and restrictions settings. If we didn’t find ads for a user or we couldn’t accept, for example, desktop traffic then some users see a page 404. If you want to avoid that, specify a page of your website or another ad network as a trafficback. Anytime our system can’t find a suitable ad or a show was blocked, your traffic will be redirected to trafficback and you lose nothing.

Besides, you can add specific parameters in your trafficback. Some networks ask to send them additional information. In our system you can use the following parameters:

  • {QUERY} is a keyword. A title of the page is used in the popup script as a keyword by default.
  • S1, S2, S3 are additional parameters. How and when use it you can read below.

If you use third-party affiliate tracker then it makes sense to set up Postback. If you need any help, ask our managers to set it up for you. Most publishers don’t need to fill it. You can find a detailed statistic about your traffic in the section Stats.

Directlink Creation and Integration Guide
Publisher account: section Integration

Click Create.

How to Add Directlink on Your Website

After the directlink was created, it must be added to a website. Go to the Connection section and copy the link of the script.

Directlink Creation and Integration Guide
Publisher account: section Connection

There are many different ways to use directlink. In this article we are going to consider only a particular case — create a banner with the download button.

Here is a code in a simplified way:

<a href="DIRECTLINK HERE" target="_blank"><img src="LINK TO IMAGE" alt="Download-Button" border="0"></a> 

Instead of DIRECTLINK HERE insert the your directlink. Change LINK TO IMAGE to the link with your future button image. 

In our example we are going to use the following code:

<a href="http://getalinkandshare.com/r?token=1642a1e85b789c55188f97560d5980dfd5c98339&q={QUERY}" target="_blank"><img src="https://i.ibb.co/3BN3yTx/Download-Button-PNG-Photo.png" alt="Download-Button" border="0" width="250"></a> 

Note: If the picture is too big, specify the width parameter.

Adding User Parameters for Traffic Optimization

You need to add a few user parameters for each link, that you place on your recourses. It may look that way:

http://sample.com/r?token=115abe184c5c5f950f565a3c4b7b30c9535eac9e&q={QUERY}&s1={S1}&s2={S2}&s3={S3} 

There are the following types of user parameters:

  • &q={QUERY} — you need to change {QUERY} to a keyword or a phrase that will improve targeting.
  • &s1={S1} — instead of {S1} place a traffic source. For example, if a link is placed on a particular website, change {S1} to its domain name. If you buy traffic in another advertising network or use our directlink for trafficback — you can change {S1} to the name of an ad network or code definition. 
  • &s2={S2} — instead of {S2} you have to put traffic subsource. It might be useful in some cases. For example, when you buy traffic from another advertising network and send it to our directlink. Also, you have a few different campaigns from this advertising network. In this situation directlink and user parameters for two campaigns would look like this:
http://sample.com/r?token=115abe184c5c5f950f565a3c4b7b30c9535eac9e&q={QUERY}&s1=ad_network_1&s2=campaign_1 

http://sample.com/r?token=115abe184c5c5f950f565a3c4b7b30c9535eac9e&q={QUERY}&s1=ad_network_1&s2=campaign_2 
  • &s3={S3} — instead of {S3} you can write click_id when you are going to use postback. If you buy traffic from another ad network then you can use generated click_id from this network. In this case change click_id to a macro of another ad network. For each ad network, click_id macro will be unique. If you place a link on your website then you need to generate click_id by yourself.

Note: User parameter &q={QUERY} is obligatory because it can improve your website’s conversion rate. Usually, publishers change {QUERY} to the page title. Depends on a website it can be placed whether manually for each link or automatic.

In this guide, we are going to consider automatic keyword substitution based on CMS WordPress example. If you use another CMS, you need to find the method of keyword substitution in a link by yourself.

If you can’t (for whatever reason) replace a value in a user parameter &q dynamically then you need to write a keyword that will give an overview of traffic. For example, on the download website, you might use this option: &q=download.

User parameters S1, S2, and S3 are optional. But the more accurate they are, the higher conversions you get.

For example, you can place the same link on the two different websites. If you change S1  to (&s1=website.com and &s1=website2.com), then we will understand which website has better conversion and how to optimize each of them. Without this information, we can’t optimize your sites.

Now let’s consider a few ways of script integration.

Adding Script to HTML Code

As an example, we will use a text editor and HTML template on w3schools.com. Visit this page.

Find a place for the button Download and insert there a specific code, that we mentioned above. Don’t forget to change user parameter {QUERY} to a keyword. Press the Run button.

<a href="http://getalinkandshare.com/r?token=1642a1e85b789c55188f97560d5980dfd5c98339&q={QUERY}" target="_blank"><img src="https://i.ibb.co/3BN3yTx/Download-Button-PNG-Photo.png" alt="Download-Button" border="0" width="250"></a> 
Directlink Creation and Integration Guide
Adding script to HTML code

After that, you will see the Download button. Press it.

Directlink Creation and Integration Guide
Adding script to HTML code: checking results

An ad will be open in a new tab.

Note: It is better to place Download buttons above the main content or below the main content.

If the platform has just been created, the script may not work on the page. It takes some time to activate a new platform. Wait 10-15 minutes, then check it again.

Adding Script via CMS Blogger

To add the button Download in CMS Blogger, we will use built-in gadgets. With them, it’s easy to insert the chosen button not only on all pages but also on specific posts.

Go to your Blogger account and visit the section Layout.

Directlink Creation and Integration Guide
Adding script via CMS Blogger

In a new window, click Add a Gadget.

Directlink Creation and Integration Guide
CMS Blogger: Add a Gadget

Click on HTML/JavaScript gadget.

Directlink Creation and Integration Guide
CMS Blogger: HTML/JavaScript

In the field Content add the code and click Save.

Directlink Creation and Integration Guide
CMS Blogger: Configure HTML/JavaScript

Transfer this gadget in the left column Main, in the place you want to put the button. In our case, we added it above the main content.

Directlink Creation and Integration Guide
CMS Blogger: Configure HTML/JavaScript

Now click Save arrangement — script will become active. The Download button will appear on the website page.

Directlink Creation and Integration Guide
CMS Blogger: Checking results

Adding Script via CMS WordPress

If you use WordPress CMS, then you can insert the link of the script in two ways: make changes in the theme of your site on WordPress or use a special plugin. The easiest and fastest way is to use the plugin. We will consider it further.

Go to the admin panel of your site on WordPress. Open the Plugins tab and click Add New.

Directlink Creation and Integration Guide
WordPress website: Add new plugin

Search for Ad Inserter — Ad Manager & AdSense Ads plugin and click Install now.

Directlink Creation and Integration Guide
WordPress website: Install plugin

Activate it.

Directlink Creation and Integration Guide
WordPress website: plugin activation

After that, go to SettingsAd Inserter.

Directlink Creation and Integration Guide
WordPress website: Adding a script

Insert the link of the script in the field Block 1. In this example, we will add the button Download right after the title of the main content. Tick the box Posts and choose Before content from the list. Click Save Settings.

Directlink Creation and Integration Guide
WordPress website: Adding a script

The Download button will appear on the page and will be placed below the title.

Keyword Substitution

As we mentioned above, user parameter &q is obligatory. Thanks to keyword substitution, conversion and revenue can increase. In our example, we are going to replace {QUERY} by a page title because in most cases, it provides the most complete and accurate description of the page content.

Thanks to setting up keyword substitution you can get automatic substitutional of a user parameter q. Here we use the title because it fully described the page’s content.

Note: We can suggest you an easier way. Install our plugin WordPress Plugin for Download sites.

In order to substitute the title of the page in the user parament q, you need to create a shortcode. At first, make sure that you use a child theme on your website. If you don’t have a child theme, then use a plugin Child Theme Configurator to create it.

In our example, we don’t have a child theme, so we will create one. Visit the section Tools — Child Themes.

Directlink Creation and Integration Guide
WordPress website: Child Theme

Tick the box Create a new Child Theme and choose the theme you use. Click Analyze.

Directlink Creation and Integration Guide
WordPress website: Analyzing Child Theme

Scroll down to the bottom of the page and click the button Create New Child Theme.

Directlink Creation and Integration Guide
WordPress website: Create New Child Theme

As soon as the child theme is created, visit the section AppearanceThemes.

Directlink Creation and Integration Guide
WordPress website: Child Theme Configurator

Now make sure that your new theme is active.

Directlink Creation and Integration Guide
WordPress website: Theme activation

Note: Changing a theme on WordPress website can lead to unintended consequences. In most cases Child theme activation should not cause any problem. However, we must warn you of the possible consequences.

Use your file manager, go to the directory where WordPress is placed and find a file with the child theme. Usually, the address is wp-content/themes/your-theme-child.

Directlink Creation and Integration Guide
File manager: finding Child theme

Open the file functions.php and add the following code in the end of the file.

 function post_title_shortcode(){ return get_the_title(); } add_shortcode('post_title','post_title_shortcode'); 
Directlink Creation and Integration Guide
File manager: file functions.php

Save the file and make sure that the changes took effect. If you add the shortcode [post_title] in the text of the post, you will see it in preview.

Directlink Creation and Integration Guide
WordPress website: post title

If everything works correctly then you can complement directlink. Now it will look like this:

  http://getalinkandshare.com/r?token=1642a1e85b789c55188f97560d5980dfd5c98339&q=[post_title] 

Let’s go back to the WordPress section Settings — Ad Inserter.

Directlink Creation and Integration Guide
WordPress website: Settings — Ad Inserter

In the field Block 1 add the shortcode to directlink, which is used in the Download button. The result should be similar to this one:

<a href="http://getalinkandshare.com/r?token=1642a1e85b789c55188f97560d5980dfd5c98339&q=[post_title]" target="_blank"><img src="https://i.ibb.co/3BN3yTx/Download-Button-PNG-Photo.png" alt="Download-Button" border="0"  width="250"></a> 

Click Save Settings.

Directlink Creation and Integration Guide
WordPress website: checking results

Final Notes

  • Fill in sections such as Settings of ad placement, Ad inventory, Offer list, and Integration is obligatory.
  • When you set up directlink pay special attention to Trafficback.
  • Copy and paste on your website a link of the script that you received.
  • Don’t forget about a &q parameter during directlink integration because it will increase revenue.

Share This Post

Share on facebook
Share on linkedin
Share on twitter
Share on email

More To Explore

Paid traffic for website
Articles

Payments

We strongly recommend you to choose a payment method and provide all the necessary information before you launch a campaign. It will take only a

referral program
Articles

Affilight’s referral program

Table of Contents What is Affilight’s referral program?Referral Link: How to Start?Statistics: How Much I Earn per Day?Referral Payouts: Ways to Attract Other PublishersInvite your