[ic] AOL losing session data.

interchange-users@icdevgroup.org interchange-users@icdevgroup.org
Tue Aug 27 14:33:01 2002


Quoting mike@perusion.com (mike@perusion.com):
> Quoting Dan (ic@concolor.org):
> > On Mon, 2002-08-26 at 19:14, Dan Browning wrote:
> > > Aha, I see what you mean.  You don't get the benefit of the random mv_pc 
> > > since you are using it to track affiliates.   If I were you, I'd look 
> > > into using another variable for the affiliate tracking or for the unique 
> > > URL (perhaps forcing id=? even if they do have cookies enabled).
> > 
> > Hmm. I like the idea of forcing id=? even with cookies. I'll have to
> > look into how to do that. The main issue is that these are coming in via
> > google adwords and the URL set up there is static. As it is for many
> > affiliates. 
> > 
> > I think this is an issue that needs to be addressed. It is not an issue
> > that would be readily obvious for most affiliate programs. Who is going
> > to notice that you aren't giving an affiliate credit? We noticed it
> > because we have tied our shipping charges to affiliate referals and are
> > having to send refund checks for shipping.
> 
> I agree it needs to be addressed. I think the way to go is
> to add a third auto-writing parameter to URLs, that can be turned
> on with a similar scratch variable. It should be mv_source (not taken)
> and enabled with $Scratch->{mv_add_source}. That would mean that
> all links on the cached page would have the source, and it would
> persist.
> 

I have put it in the IC 4.9 branch. The patch is below, and you could
pretty easily make the same changes in bin/interchange and Util.pm to
add this to 4.8.

(I have no plans to udpate 4.8 with this, but perhaps some other core
developer will feel strongly about it and do it.)

The changes are below.

----- Forwarded message from interchange-cvs@chevelle.interchange.redhat.com -----

To: interchange-cvs@chevelle.interchange.redhat.com
From: interchange-cvs@chevelle.interchange.redhat.com
Subject: [interchange-cvs] interchange - heins modified 2 files
Reply-To: interchange-core@icdevgroup.org
Date: Tue, 27 Aug 2002 12:52 -0400

User:      heins
Date:      2002-08-27 16:52:07 GMT
Modified:  scripts  interchange.PL
Modified:  lib/Vend Util.pm
Log:
* Add mv_source parameter which sets an affiliate program source
  and can be carried around in URLs when $Scratch->{mv_add_source}
  is set. This solves the problem of AOL caching the page with
  the source embedded, then forwarding the next request sans source.

  From a suggestion by Dan <ic@concolor.org>.

Revision  Changes    Path
2.52      +6 -3      interchange/scripts/interchange.PL


rev 2.52, prev_rev 2.51
Index: interchange.PL
===================================================================
RCS file: /var/cvs/interchange/scripts/interchange.PL,v
retrieving revision 2.51
retrieving revision 2.52
diff -u -r2.51 -r2.52
--- interchange.PL	15 Aug 2002 20:18:48 -0000	2.51
+++ interchange.PL	27 Aug 2002 16:52:06 -0000	2.52
@@ -3,7 +3,7 @@
 #
 # Interchange version 4.9.3
 #
-# $Id: interchange.PL,v 2.51 2002/08/15 20:18:48 mheins Exp $
+# $Id: interchange.PL,v 2.52 2002/08/27 16:52:06 mheins Exp $
 #
 # Copyright (C) 1996-2002 Red Hat, Inc. and others.
 # http://www.icdevgroup.org/
@@ -2228,11 +2228,14 @@
 	}
 
 	$Vend::Session->{'arg'} = $Vend::Argument = ($CGI::values{mv_arg} || undef);
-#::logDebug("arg is $Vend::Session->{arg}");
+
 	if ($CGI::values{mv_pc} =~ /\D/) {
-		$Vend::Session->{'source'} =	$CGI::values{mv_pc} eq 'RESET'
+		$Vend::Session->{source} =	$CGI::values{mv_pc} eq 'RESET'
 										? ''
 										: $CGI::values{mv_pc};
+	}
+	elsif($CGI::values{mv_source}) {
+		$Vend::Session->{source} =	$CGI::values{mv_source};
 	}
 
 	$Vend::Session->{'user'} = $CGI::user;



2.34      +8 -2      interchange/lib/Vend/Util.pm


rev 2.34, prev_rev 2.33
Index: Util.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Util.pm,v
retrieving revision 2.33
retrieving revision 2.34
diff -u -r2.33 -r2.34
--- Util.pm	15 Aug 2002 16:30:34 -0000	2.33
+++ Util.pm	27 Aug 2002 16:52:07 -0000	2.34
@@ -1,6 +1,6 @@
 # Vend::Util - Interchange utility functions
 #
-# $Id: Util.pm,v 2.33 2002/08/15 16:30:34 mheins Exp $
+# $Id: Util.pm,v 2.34 2002/08/27 16:52:07 mheins Exp $
 # 
 # Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -82,7 +82,7 @@
 use Safe;
 use subs qw(logError logGlobal);
 use vars qw($VERSION @EXPORT @EXPORT_OK);
-$VERSION = substr(q$Revision: 2.33 $, 10);
+$VERSION = substr(q$Revision: 2.34 $, 10);
 
 BEGIN {
 	eval {
@@ -1245,6 +1245,12 @@
 		if $path =~ $need_escape;
     $r .= '/' . $path;
 	$r .= '.html' if $::Scratch->{mv_add_dot_html} and $r !~ /\.html?$/;
+
+	if($::Scratch->{mv_add_source} and $Vend::Session->{source}) {
+		my $sn = hexify($Vend::Session->{source});
+		push @parms, "$::VN->{mv_source}=$sn";
+	}
+
 	push @parms, "$::VN->{mv_session_id}=$id"			 	if defined $id;
 	push @parms, "$::VN->{mv_arg}=" . hexify($arguments)	if defined $arguments;
 	push @parms, "$::VN->{mv_pc}=$ct"                 	if defined $ct;





_______________________________________________
interchange-cvs mailing list
interchange-cvs@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-cvs

----- End forwarded message -----

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

For a successful technology, reality must take precedence over public
relations, for Nature cannot be fooled. -- Dick Feynman