Results 1 to 5 of 5
  1. #1
    Troll Killer and best Snooper!
    I decide when the pigs fly!
    Rhea's Avatar
    Join Date
    January 18th, 2005
    Location
    New York, USA
    Posts
    6,195
    I work with an indy who I've had regular (although not outstanding) sales with for several months. They have great products, but a one session cookie for affiliates.

    About a month ago a pop-up promotion appeared on the site and since then I've had no sales. Sessions are being recorded (apparently) but sales are dead.

    I looked at the source on their home page and found this javascript. If anyone could look at it and tell me if it's overwriting affiliate cookies or not I'd appreciate it.

    * * * * *
    <script language="Javascript1.2">
    <!-- // hide JS from older browsers
    function getCookie(Name) {
    // from Netscape's Client-side JS Guide
    // http://developer.netscape.com/docs/m...uide/index.htm
    var search = Name + "="
    if (document.cookie.length > 0) { // if there are any cookies
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // if cookie exists
    offset += search.length
    // set index of beginning of value
    end = document.cookie.indexOf(";", offset)
    // set index of end of cookie value
    if (end == -1)
    end = document.cookie.length
    return unescape(document.cookie.substring(offset, end))
    }
    }
    }

    // Sets session cookie values (no expiration date)
    //
    function setSessionCookie(name, value) {
    // also from Netscape's Client-side JS guide
    document.cookie = name + "=" + escape(value) + "; PATH=/";
    }

    function openpopup(){
    var url="/promo/s.HdZS2xZj";
    var cook = getCookie('popups');

    if (cook == 'seen') {
    // do nothing
    }
    else {
    winpops=window.open(url,"","width=300,height=220,") ;
    setSessionCookie('popups', 'seen');
    }

    }

    function openpop(url, w, h, cookname){
    var cook;
    if (cookname) {
    cook = getCookie(cookname);
    }

    if (cook == 'seen') {
    // do nothing
    }
    else {
    var args = '';
    if (w > 0) {
    args = 'width=' + w + ',';
    }
    if (h > 0) {
    args = args + 'height=' + h + ',';
    }
    winpops=window.open(url,"", args) ;
    if (cookname) {
    setSessionCookie(cookname, 'seen');
    }
    }

    }

    // -->
    </script>

    * * * * *

  2. #2
    ABW Founder Haiko de Poel, Jr.'s Avatar
    Join Date
    January 18th, 2005
    Location
    New York
    Posts
    21,609
    Rhea,

    It just looks like a cookie based popup script, nothing malicious.
    Continued Success,

    Haiko
    The secret of success is constancy of purpose ~ Disraeli

  3. #3
    Troll Killer and best Snooper!
    I decide when the pigs fly!
    Rhea's Avatar
    Join Date
    January 18th, 2005
    Location
    New York, USA
    Posts
    6,195
    Thanks, Haiko.

    I didn't want to think it was a fraud issue, coz I really like this company, even if they only have a 1 session cookie. But the coincidence of the popup and the lack of sales just kept nibbling away at me, so I thought I should ask someone with a clue!

  4. #4
    ABW Ambassador
    Join Date
    January 18th, 2005
    Location
    North Carolina
    Posts
    1,026
    This script just checks whether the popup has be shown before.

    When a popup is displayed for the firs time, a cookie is set. If the vistor returns, the script checks the cookie to find out whether the popup has been shown before. If not, it shows the popup, otherwise does nothing.

  5. #5
    Troll Killer and best Snooper!
    I decide when the pigs fly!
    Rhea's Avatar
    Join Date
    January 18th, 2005
    Location
    New York, USA
    Posts
    6,195
    Thanks KCEdit. I can understand short, simple JS routines but this one was beyond my skill level.

    I appreciate the help from you both!

  6. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Cookie Overwriting
    By raywood in forum Programming / Datafeeds / Tools
    Replies: 0
    Last Post: January 8th, 2005, 09:08 AM
  2. Help, is this a parasite or cookie overwriting?
    By gagglina in forum Midnight Cafe'
    Replies: 12
    Last Post: March 9th, 2004, 10:50 AM
  3. SID and cookie overwriting
    By Roland in forum Commission Junction - CJ
    Replies: 1
    Last Post: February 12th, 2004, 02:59 PM
  4. Another case of cookie overwriting!
    By Grumpy in forum Rakuten LinkShare - LS
    Replies: 13
    Last Post: January 31st, 2004, 11:49 AM
  5. cookie overwriting
    By Roland in forum Midnight Cafe'
    Replies: 1
    Last Post: October 27th, 2003, 08:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •