Need some quick javascript help...

1 replies
I have a mp3 website doing very well, about 10,000 u'v daily and 70% from usa/uk. I want to implement a cpa link to the website but I got no clue where to start.

I want to make specific links (or if not possible all links), on the first click, open up the cpa offer in a new browser, then on the second click of that same link, go to whatever the link originally points to.

The second thing I want is for after the user closes the popup player we have (not relating to the cpa ad, actual browser player for the mp3 song on the site), another cpa ad pops up.

Is this possible? Can anybody help me?

Would greatly appreciate it! Thanks in advance!
#javascript #quick
  • Profile picture of the author Brandon Tanner
    Most definitely possible!

    You could solve the first task by using cookies (which could be done with either Javascript or PHP).

    More specifically, you would set the "onclick" event for that link to call a function which uses a conditional statement to check whether or not a cookie has been set. If it has NOT been set, then you set a new cookie, and direct the user to your CPA popup. If the cookie HAS been set, then you simply redirect the user to the normal link.

    Regarding the 2nd task, the answer would depend on what type of popup your audio player uses, but it could most definitely be done.

    All in all, a competent programmer should be able to take care of both tasks within an hour or 2.
    Signature

    {{ DiscussionBoard.errors[6765717].message }}

Trending Topics