How to split traffic [CPA]
2017-03-18, 09:29 PM,
#1
Hello,

Ok, so I want to split my traffic and redirect desktop users to CPAGrip and mobile users to Ogads. I found few methods with I can use, but I don't really know how to set them up properly.

Here are two examples of methods, which I'm trying to setup. Anyone can help me?

PHP Code:
<html>
 
<
head>
  <
script type="text/javascript">
    function 
myFoo() {
      var 
lck false;
      
src "https://blissinstalls.com/script_include.php?id=xxxx"
    
};
 
  </
script>
 
  <
script type="text/javascript">
    var 
ogblock true;
 
  </
script>
  <
script type="text/javascript" src="https://www.liveappsearch.com/contentlockers/load.php?id=xxxxxx"></script>
  <
script type="text/javascript">
    if (
ogblockwindow.location.href "https://www.liveappsearch.com/contentlockers/adblock.php";
 
  </
script>
  <?
php
 
// At this point, we are checking user agent string for most used mobile devices
 
$ua strtolower($_SERVER['HTTP_USER_AGENT']);
 
$mob strpos($ua,"mobile");
$iphone strpos($ua,"iphone");
$android strpos($ua,"android");
$win strpos($ua,"windows phone");
$palmpre strpos($ua,"webos");
$berry strpos($ua,"blackberry");
$ipod strpos($ua,"ipod");
$ipad strpos($ua,"ipad");
 
if (
$mob || $iphone || $android || $palmpre || $ipod || $berry || $win || $ipad == true) {
   
$url 'myFoo();'// If mobile is detected, we will choose mobile URL
}
else
{
   
$url = echo "<script> myFoo(); </script>"// If no mobile detected, we will choose non-mobile URL
}
 
header("Location: $url"); // Redirect the visitor to chosen URL
?>
</head>
 
<body></body>
 
</html> 


2.
PHP Code:
.....
<
script src="js/main.js"></script>
<!-- *** 
GATEWAY CODE ***_______________________________________________ -->
        <
script>function myFunction() {
            var 
lck false;
            
src="https://blissinstalls.com/script_include.php?id=xxxxx"
            
if(!lck){top.location 'https://blissinstalls.com/help/ablk.php';
          }
          }
  </
script>
                   
<!-- *** /
GATEWAY CODE ***_______________________________________________ -->
 
<
script type="text/javascript">var ogblock=true;</script>
<
script type="text/javascript" src="https://www.liveappsearch.com/contentlockers/load.php?id=xxxxxxxxxxxx"></script>
<
script type="text/javascript">if(ogblockwindow.location.href "https://www.liveappsearch.com/contentlockers/adblock.php";</script>
<!-- *** 
GATEWAY CODE ***_______________________________________________ -->
  <?
php
require_once 'Mobile_Detect.php';
$detect = new Mobile_Detect;
 
// Any mobile device (phones or tablets).
if ( $detect->isMobile() ) {
 
$locker 'http://google.com';
}
else
{
   
$locker 'myFunction();'// If no mobile detected, we will choose non-mobile URL
 
}
   
header("Location: $locker");
 
?>
<script>
$("#humanverification").click(function(e) {
    e.preventDefault();
    <?php echo $locker ?>
 
});
</script>
<!-- *** /GATEWAY CODE ***_______________________________________________ -->  
 
</body>
</html> 
Reply
Share This Thread :

2017-03-18, 09:38 PM,
#2
Am using http://smarturl.it , it works fine for me.
Reply
2017-03-18, 11:02 PM,
#3
It's looking very nice, but how I can put CPAGrip link there? If I put blissinstalls.com/script_include.php?id=xxxx, It redirect me to wall of text (probably code of locker). Where can I find a normal link, which I can put to smarturl?
Reply
2017-03-19, 02:11 PM,
#4
Even i need a code to split desktop and mobile traffic, following this thread.
Reply
2017-03-19, 07:57 PM,
#5
Direct all traffic to a file called let's say 'redirect.php'

In this file put the mobile detect script.

If user is on mobile redirect to mobilelanding.php if desktop redirect to desktoplanding.php
Reply
2017-03-22, 02:49 AM,
#6
Do as lancerimpact said, it is very good idea.
Reply
2017-03-22, 08:01 AM, (This post was last modified: 2017-03-22, 08:02 AM by g3lux.)
#7
you can try this code. You put this where you want to show the button:
Code:
<script type="text/javascript">
testExp = new RegExp('Android|webOS|iPhone|iPad|BlackBerry|Windows Phone|Opera Mini|IEMobile|Mobile' , 'i');
    if (testExp.test(navigator.userAgent)) {
        window.location.href="http://ogadslocker.com/";
        or with button
        document.write("<button onclick='window.location.href=\'http://your ogads direct link \''> Click here </button>");
    }
    else {
        document.write("<button onclick='call_locker();> Click here </button>");
        //this calls the cpagrip locker
        or
        document.write("<button onclick='window.location.href=\'http://your cpagrip file locker \''> Click here </button>");
    }
</script>
Reply


Related Threads
Thread Author Replies Views Last Post
  Chat Notification Sound cpa grip 2slick 3 146 2018-07-21, 08:22 PM
Last Post: hutiya
  Beginners Guide to Native Advertising [Non Incent CPA] CPAGold 9 969 2018-07-20, 03:37 PM
Last Post: wadezwd
  Is CPA Marketing actually SCAM marketing? f1rew1re 15 964 2018-07-19, 11:15 PM
Last Post: dice
  Any good traffic sources for contest/sweepstakes? Ruriko 2 118 2018-07-19, 03:47 PM
Last Post: blackbrut
  What CPA or other link / click methods do you use ? LorenzoSupreme 1 118 2018-07-18, 07:05 AM
Last Post: CharlieHarper





About Us | Contact Us | CPA Elites | Advertise | Stats

© 2013-2018 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top