Home > The Newbie Zone > Questions and Answers

¡HELP - if user older than 26 show the best offer ; else 2nd best offer - HELP! (8)


07-06-2021 07:48 AM #1 cezary (Member)
¡HELP - if user older than 26 show the best offer ; else 2nd best offer - HELP!

hello @everybody

i've been reading tips, tutorials, follow-alongs and i saw that many of pro affiliates tell that for quality (sweeps, dating) it is better to send older traffic to best offer
so in questionnaire landing page user select his age - younger than 26 ; older than 26
the rule should be: if user select the box 'older than 26', on offer click redirect to the best offer ; else redirect to the 2nd best offer

all questionnaires i've seen are made in javascript so i was looking for solution in javascript, but i didn't find the anwer on how to

after that i've found this post and it looks like it can be done with php

right now i'm confused, programming is not my strenght but i would like to know how to do it

is it possible with javascript, or php is a must?
i'm looking for hint, advice on where should i put the focus, as time is limited and programming knowledge is not
...or a ready to use solution, whatever works best for you

please help


07-06-2021 11:24 AM #2 matuloo (Legendary Moderator)

I'm pretty sure this can be done with javascript too... but in such cases it's always the best and fastest to simply hire a coder and get it done quickly.

Let me tag @jeremie here, he's really good with this tech things

BTW: many LPs that have these age selectors in place do not really use them, so whatever the user clicks they get still redirected to the same offer. In such case, it's more about the psychology... you're making the users believe they are getting access to something thats "age" restricted... many of them will actually "lie" and click the wrong age option.

But yes, the right way to utilize such LP is to use the data and segment the users based on their responses.


07-06-2021 12:53 PM #3 jeremie (Moderator)

Quote Originally Posted by cezary View Post
is it possible with javascript
Yes

Quote Originally Posted by cezary View Post
...or a ready to use solution
Please post a link with the lander you would like to use so I can have an idea of what your funnel is.


07-06-2021 03:30 PM #4 cezary (Member)

thanks for response
@jeremie i added the LP in 1st post it is a LP from anstrex depository

i think it is one of the pages that @matuloo mentioned -

many LPs that have these age selectors in place do not really use them, so whatever the user clicks they get still redirected to the same offer.
the LP doesnt use logic people just click whatever

i tried to add "btnno" bcs i thought it reffering to #q5 the age question, but it turned out to be just a CSS button

Code:
<div id="q4" class="toggleDiv" style="display: none;" align="left">
            <div id="top" align="center">Question <span class="circle2">1</span> <span class="circle2">2</span> <span
                    class="circle2">3</span> <span class="circle1">4</span></div>
            <div id="box"> <span class="styleq2">Are you at least 24 years old? The women have requested that we not let
                    those younger than 24 contact them because of past rude behavior by younger men.</span></div>
            <div align="center">
                <pre><a class="show_hide btnyes" href="#" rel="#q5">YES</a></pre>
                <pre><a class="show_hide btnno" href="#" rel="#q5">NO</a></pre>
            </div>
        </div>
Code:
<div align="center">
                <pre><a class="btnyes" href="https://www.anstrex.com/?utm_campaign=referral&utm_sourc=lpgallery" target="_blank" rel="#q5">Continue »</a></pre>
            </div>
i havent figured out how to add this decision making element like

if q5 btnno - go to url/click1 ; else url/click2

or something like that


07-06-2021 04:00 PM #5 jeremie (Moderator)

Define the main offer in the link, using HTML.
Then, you can use this code to replace by another link when someone is younger than 24

Code:
<script>
document.querySelector('#q4  .btnno').addEventListener('click', () => {
     document.querySelector('#q9  .btnyes').href = '/click2' })
</script>
If you add/remove questions, you may need to update the #q4 / #q9 in the script.


07-06-2021 11:58 PM #6 matuloo (Legendary Moderator)

JEREMIE! You're da man... I knew you would be able to help


07-09-2021 10:09 AM #7 cezary (Member)

yeaaah! jeremie is da man

got it working thanks a lot


07-10-2021 11:29 PM #8 matuloo (Legendary Moderator)

Quote Originally Posted by cezary View Post
yeaaah! jeremie is da man

got it working thanks a lot
Perfect! I can't even remember how many people jeremie helped with something technical here on the forum , either by posting it or via PM. Can't thank you enough @jeremie for doing this!


Home > The Newbie Zone > Questions and Answers