Cloaking / Creating Short Links in CPV Lab Pro

Have you heard of link cloaking but unsure what it’s all about?

It sounds like something complicated and not-for-everybody, but it isn’t like that.

In Affiliate Marketing, link cloaking is the process of disguising the affiliate link URL provided by an affiliate program in order to obfuscate your affiliate ID and make the link shorter.

There are many advantages in using cloaked links:

  • replace a long offer URL (one that could contain many parameters) with a shorter and clean URL.
  • hide the actual redirect link (to the offer or to the tracker) and provide a link from the same domain as your landing page.
    • Visitors are more attracted to click on a link that points to the same domain than an external link.
  • easy to change the final destination page by simply editing the cloaking page.
  • you can even display the offer page in a browser while showing another page in the browser address bar.

The cloaking can be done with a redirect page (HTML or PHP) that you will place on any domain that you want to be linked from the landing page.

  • It can be the same domain as the landing page, a subdomain, but it can also be a different domain.

CPV Lab Pro (opens new window) provides several methods of cloaking links using the Create Short Links page which allows you to automatically generate the redirect pages that should be placed in the desired locations.

Mask Redirect

  • The first option available is to create a Mask Redirect.
    • When this is used you can completely replace all CPV Lab Pro setup links using custom redirects.
  • Example:
    • if your CPV Lab Pro installation is at http://mydomain.com then Redirects can be generated as:
      • Instead of http://mydomain.com/base2.php use http://newwebsite.com/linka
      • Instead of http://mydomain.com/base3.php use http://newwebsite.com/linkb

A. Page fields and details

Create Short Links

1. URL to Mask
  • Enter the URL to Create Short Link for the full URL.
2. Page Format
  • Choose HTML, PHP or HTML with Javascript, depending on the use of tokens in the URL being shortened.
3. Pass Parameters (not for HTML)
  • Check this option, if you are Creating a Short Link for a URL that uses dynamic tokens that are populated by the Traffic Source such as Keyword.
  • Example:
    • Creating a Short Link for a Campaign URL that uses: ?keyword=%%KEYWORD%%
  • This option works only for PHP and HTML with Javascript. Please check below the section "B. Passing Tokens when using Masked Pages"
4. Generate
  • Once you’ve entered Steps 1, 2 & 3 Click Generate to Create an Index page that you will place on your server in the location you want to create the short link.
  • Save this file and then simply upload this index.php page to a folder on any domain you wish to use when calling the URL.

B. Passing Tokens when using Masked Pages

  • If you select the option to pass parameters when you create a short link, (this option works only for PHP and HTML with Javascript), then all the parameters received by the short link page are passed to the next page.
  • Example:
    • If you wish to Mask the URL: http://mydomain.com/base2.php
    • And you create a short link as: http://newwebsite.com/linka/?cloid=1
    • Then the parameters and tokens will be passed through to the Masked URL as: http://mydomain.com/base2.php?cloid=1
  • The same goes for any other parameters and you can combine any number of parameters in a single URL separated by ‘&’
    • Example: http://newwebsite.com/linka/?cloid=1&adsub=1&param=111
  • Campaign URLs can be shortened as well, but you have to add the keyword token or any other dynamic tokens in Short Link URL if the traffic source requires it.
    • Example:
      • Original URL: http://mydomain.com/base.php?c=271&key=adsfkajksdfjkwe&keyword=%%KEYWORD%%
      • Short Link URL: http://newwebsite.com/campaign
  • To pass the keyword through to CPV Lab Pro (where this is supported), then the keyword token needs to be in the URL.
    • So you will enter the Short Link at the traffic source as: http://newwebsite.com/campaign/?keyword=%%KEYWORD%%
  • The other parameters (‘c’ and ‘key’) will be added in the Short Link page.
    • In order for this to work you have to generate the Short Link using a method that passes parameters (either PHP or HTML with JavaScript).
    • PHP is the best solution because it is server-based and it is much faster than JavaScript.

Cloak the offer page

  • The second option available is to cloak the offer page and to prevent its URL from appearing in the browser address bar.

There are 2 scenarios in this case:

  • when using a Landing Page campaign (visitors get first to the Landing Page and then click for the Offer)
  • when using a Direct Link campaign (without a Landing Page, visitors are redirected to the offer page)
Example for cloaking the offer page in a Landing Page Campaign:
  • Let’s say that our Offer URL is http://offer-source.com/best-offer.php?id=1234&subid=
  • This Offer URL will have the CPV Lab Pro subID appended at the end of URL automatically for each visitor.
  • The offer gets displayed by following a base2.php (or base3.php for Landing Page Sequence campaigns) link from the Landing Page.
  • We can use another domain that we own to mask the base2.php link and also cloak the offer page and the result will be that the new domain will appear in the address bar while the offer page is displayed in the browser.
    • Let’s say that we want to use http://newwebsite.com/offer as the cloaking location.

Cloaking offer page

1. Offer to hide

  • This will be the base2.php(or base3.php) page from your CPV Lab Pro domain since this is the page that performs the offer redirect: http://cpvlabpro-domain/base2.php

2. Page Title

  • The Title of the offer page that we want to appear in the browser.

3. Meta Description (optional)

  • The Meta Description that we want to appear for the cloak page.

4. Page Icon URL (optional)

  • The favicon that we want to see in the browser for this page.

5. Page Format

  • You can generate an HTML page if you don’t want to pass parameters such as subID to the offer URL. But we recommend that you generate a PHP page that can also pass parameters to the Offer URL.

6. Pass Parameters (not for HTML)

  • Whether to pass the parameters such as subID to the Offer URL or not.

7. Generate

  • Once you’ve entered the above details click on Generate and you will be prompted to download the generated cloaking page.
  • Save this file and upload it to an empty folder on any domain that you want to use.
    • In this example it will be uploaded at: http://newwebsite.com/offer

8. Campaign setup page

  • No changes are needed in the campaign setup page. Make sure that you check the option to Append the subID to the offer since we have added the &subid= parameter to the offer URL.
  • The actual offer URL will be entered as an offer in the campaign setup page:

http://offer-source.com/best-offer.php?id=1234&subid=

9. Landing Page change

  • In your Landing Page you will remove the base2.php (or base3.php) link that points to the offer with the cloaked URL pointing to the page generated above:

    http://newwebsite.com/offer

Testing When you test the campaign you will see that offer page is loaded in the browser, but the address bar shows the cloaking page URL: http://newwebsite.com/offer

  • The subID will be automatically passed to the offer page, so the Postback URL feature from your Affiliate Network will work even if you cloak the offer link.
  • Let’s say that our Offer URL is http://offer-source.com/best-offer.php?id=1234&subid=
  • This Offer URL will have the CPV Lab Pro subID appended automatically for each visitor.
  • The offer page is displayed immediately after visitors access the Campaign URL since we have a Direct Link campaign.
  • We can use another domain that we own to cloak this offer page and this domain will appear in the address bar.
    • Let’s say that we want to use http://newwebsite.com/offer as the cloaking location.

Cloaking Direct Link Campaign

1. Offer to hide

  • This is the URL of the offer without the parameter that received the subID (if such parameter exists):

    http://offer-source.com/best-offer.php?id=1234

2. Page Title

  • The Title of the offer page that we want to appear in the browser.

3. Meta Description (optional)

  • The Meta Description that we want to appear for the cloak page.

4. Page Icon URL (optional)

  • The favicon that we want to see in the browser for this page.

5. Page Format

  • You can generate an HTML page if you don’t want to pass parameters such as subID to the offer URL. But we recommend that you generate a PHP page that can also pass parameters to the Offer URL.

6. Pass Parameters (not for HTML)

  • Whether to pass the parameters such as subID to the Offer URL or not.

7. Generate

  • Once you’ve entered the above details click on Generate and you will be prompted to download the generated cloaking page.
  • Save this file and upload it to an empty folder on any domain that you want to use.
    • In this example it will be uploaded at: http://newwebsite.com/offer

8. Campaign setup page

  • Enter the cloaking page as the Offer URL in the campaign setup page
  • Since we want to pass the subID to the offer page we will check the Append SubID to Offer and add the ?subid= part at the end of the cloaking URL.
  • So the new Offer URL would become: http://newwebsite.com/offer/?subid=

Testing

  • When you test the campaign you will see that offer page is loaded in the browser, but the address bar shows the cloaking page URL: http://newwebsite.com/offer/?subid=qqqqqqqq_11_2222
  • The subID will be automatically passed to the offer page, so the Postback URL feature from your Affiliate Network will work even if you cloak the offer link.
Last Updated: 6/14/2021, 11:18:56 PM