Home >
Questions and Answers >
Tracking Questions
Javascript popup alert lander with offer redirect & Voluum parameter (13)
07-29-2014 05:46 PM
#1
persona (Member)
Javascript popup alert lander with offer redirect & Voluum parameter
Hi,
I am using Voluum tracking and amazon s3 cdn for landing pages.
I want to learn the correct way to setup a javascript popup alert lander which includes an offer redirect and also displays a Voluum parameter (device model).
Voluum docs show how to display parameter on an ordinary lander here
I don't know javascript but this is the lander i managed to put together myself.
It seems to work correctly on my nexus 7 showing "Nexus 7 user: update your antivirus now".
I would greatly appreciate some feedback from more experienced members.
NB:
For this code to work you need to
1. Create an offer in voluum.
2. Create a lander in voluum and add "?model={model}" to lander url like this: http://example.com/lander/?model={model}
3. Create campaign in voluum and replace "http://XXXXX.trackvoluum.com/click" on landing page code with your voluum click url.
4. Click on campaign url to test. TIP: I paste the campaign url in to a google keep note (so i dont have to type the campaign url) to open it on my nexus 7.
Code:
<html>
<head>
<title> Attention </title>
<script>
function getURLParameter(name) {
return decodeURI(
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1] || ''
);
}
</script>
</head>
<body>
<script type="text/javascript">
alert(getURLParameter('model') +' user: \n\nUpdate your Antivirus now.'); window.location.href='http://XXXXX.trackvoluum.com/click';</script>
</body>
</html>
07-29-2014 07:14 PM
#2
bbrock32 (Administrator)
If you rename your page from .html to .php you can put this code on top :
<?
//this is if you pass your parameter as d=xxxx
$d=@$_GET['d'];
?>
Then on the page where you want to print the value passed in the d variable you put <?=$d?>
07-29-2014 08:23 PM
#3
persona (Member)

Originally Posted by
bbrock32
If you rename your page from .html to .php you can put this code on top :
<?
//this is if you pass your parameter as d=xxxx
$d=@$_GET['d'];
?>
Then on the page where you want to print the value passed in the d variable you put <?=$d?>
thanks for reply bbrock32.
Im using amazon s3 for my landers so i cant use PHP. (I recently moved away from cpvlab and my own server setup)
My
Voluum parameters are working correctly tho, it passes the users device correctly in volumm to my lander.
My issue is i dont know if my javascript is up to scratch/uses best practices. I figured with the amount of
Voluum users here someone has already figured this out.
07-30-2014 04:10 AM
#4
Adamw (AMC Alumnus)
Easiest way I found was just to assign it to a js variable and then put that in the alert. I edited the code to show an example below:
<html>
<head>
<title> Attention </title>
<script>
function getURLParameter(name) {
return decodeURI(
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1] || ''
);
}
var model = getURLParameter('model');
</script>
</head>
<body>
<script type="text/javascript">
alert(model +' user: \n\nUpdate your Antivirus now.'); window.location.href='http://XXXXX.trackvoluum.com/click';</script>
</body>
</html>
</html>
[/CODE]
07-30-2014 12:05 PM
#5
persona (Member)
Thanks buttonedup. Appreciate the help. This is a better way to maintain the variables especially if using more than one. Tried and tested. Works great
08-01-2014 04:09 PM
#6
persona (Member)
.....
08-01-2014 04:09 PM
#7
persona (Member)
I noticed in my Voluum stats, I had 482 visits to my landing page (Javascript alert popup) yet i had 603 clicks from my landing page to my offer.
Im guessing this is pretty normal because people trying to go back on their phones browser which causes the extra clicks right?

08-02-2014 10:53 AM
#8
caurmen (Administrator)
Hmm, that seems a bit weird, actually.
How many clicks do your affiliate network show, and how many of those are duplicates?
08-02-2014 03:54 PM
#9
Adamw (AMC Alumnus)
I dont know for sure, but my guess is the back button that's hardcoded into android phones... users hit that, and go back to your page that has the alert and they get redirected again
08-04-2014 08:59 PM
#10
persona (Member)

Originally Posted by
caurmen
Hmm, that seems a bit weird, actually.
How many clicks do your affiliate network show, and how many of those are duplicates?
Stats are perfectly matching
Voluum. Visits 482 but only 367 Clicks. Thanks for the help man i really appreciate it.

Originally Posted by
buttonedup
I dont know for sure, but my guess is the back button that's hardcoded into android phones... users hit that, and go back to your page that has the alert and they get redirected again
Yes, this is exactly what's happening. I was able to recreate the issue. Thanks again!
The popup alert was the worst conversion rate of all my landers, but i learned something valuable.
I was testing redirect traffic (both parked domains and popup). I removed the parked domain which improved the conversions across the board.
08-05-2014 04:56 PM
#11
caurmen (Administrator)
So, how many clicks are you seeing in your traffic source, Voluum pre and post lander, and your affiliate network?
08-05-2014 06:08 PM
#12
persona (Member)

Originally Posted by
caurmen
So, how many clicks are you seeing in your traffic source,
Voluum pre and post lander, and your affiliate network?
Popup Lander Stats;
Traffic Source: 481 redirects
Affiliate Network: 367 clicks (Correct Post Lander Clicks).
Voluum Report: 482 Visits (Pre Lander), 603 clicks (Incorrect Post Lander Clicks).
I have decided to stop running this PSafe campaign (Too many people running this same offer/Traffic source is now too expensive to work).
I Learned a lot from it tho.
Full PSafe Campaign had over 7,816 visits/ 1,644 clicks/ 55 conversions/ Revenue $20.34/ Cost $139.43 (real cost is only $69.72 because of coupon)
I will focus on a new offer i have just found (different vertical) that has a lower cost per click on same traffic source.
08-07-2014 06:36 PM
#13
jblint ()

Originally Posted by
buttonedup
Easiest way I found was just to assign it to a js variable and then put that in the alert. I edited the code to show an example below:
<html>
<head>
<title> Attention </title>
<script>
function getURLParameter(name) {
return decodeURI(
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1] || ''
);
}
var model = getURLParameter('model');
</script>
</head>
<body>
<script type="text/javascript">
alert(model +' user: \n\nUpdate your Antivirus now.'); window.location.href='http://XXXXX.trackvoluum.com/click';</script>
</body>
</html>
</html>
[/CODE]
Thanks for this!
Is there anyway to insert the variable in the MIDDLE of your message? ie "Attention {MODEL} User: blah blah"
EDIT: update- NM figured it out
alert(' Attention ' + model + 'User: blah blah blah);
Home >
Questions and Answers >
Tracking Questions