Forum Moderators: coopster & phranque

Message Too Old, No Replies

Pass variables without cookies or query strings

         

webgo2

6:29 pm on May 4, 2006 (gmt 0)

10+ Year Member



I'm creating an affiliate program but was wondering if there's a way to pass an affiliate ID through my site if:

a) the visitor doesn't allow cookies in their browser
b) I don't tack it on the end of a url in a query string

My goal is to have the visitor register on the first visit, even if they don't purchase so I can lock in the affiliate ID. The site isn't live so I can't test the conversion yet, but this is my goal.

I know that I can create static replicated pages for each affiliate, but don't want to mess with that on this website. Even though this might be the best way to do it.

I could also try an IP address matching thing: like if I try to set the affiliate cookie & it doesn't take I can add the IP address and affiliate ID to a database & if this IP address visits again I'll credit the affiliate with the sale. (I know that this method is by no means perfect).

Aside from all that, is there a way that I can store the ID info of an affiliate? I'm on Apache, if that makes any difference. I tried searching for it, but I'm not wording the searches right, or it's not possible: I've found things for php session variables (I don't know how to code in php) and something for apache, but that looks like it depends on the use of cookies by the visitor.

Any input would be appreciated on this: whether it is suggested that I create the replicated pages (and use cookies as a backup) or if there's an alternative that I don't know about.

Thanks for your help.

Philosopher

6:40 pm on May 4, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I know you posted in the Perl forum, but you might look using sessions via php (does Perl have an equivalent?). I've found that even if a user doesn't allow cookies, sessions will work.

webgo2

7:06 pm on May 4, 2006 (gmt 0)

10+ Year Member



Thanks for your response.

I don't know anything about coding in php - except I should probably learn it. My entire site is in perl, and I've tried to run an xml parser php script in the same file as a perl script on my local machine & it didn't work. I didn't really think it would, but I was going to try it anyway.

I can't (that I know of) execute a php script in a perl script - and it's taken me 2 years to learn what I know now (learning as necessity dictates). . . I don't think this would work in my situation.

However, If you think that there is a way that I could incorperate this into a perl scipt let me know.

Thanks.

perl_diver

9:33 pm on May 4, 2006 (gmt 0)

10+ Year Member



If you use sessions (CGI::Session) then you pass the session ID in the query string (or in a cookie which is the usual way or in a hidden form field). The session file holds all the other data you might need, such as the affiliate ID number.

[search.cpan.org...]
[search.cpan.org...]

webgo2

5:41 pm on May 5, 2006 (gmt 0)

10+ Year Member



Thanks perl_diver, I will look into that.