Entering referring url directly into promotion code field
Job of the week
Featured threads
- How relevant do links need to be? 14 replies
- Tracking Online Response to Marketing/Communications Activities 8 replies
- Behavioural targeting software 4 replies
- Penalty avoidance on English-speaking foreign sites 5 replies
- 3 way linking - good or bad? 21 replies
Most viewed threads in last month
Most active threads in last month
- Best Practice SEO Guide Jan 2012 2 replies
- Social networks for business: to be or not to be… 0 replies
- Acceretle 0 replies
- ZNAP 0 replies
- internet marketing consulting service 0 replies

Digital Marketing & Strategy Consultant at Emotion Associates Limited
16 February 2007 12:45pm
Hi,
Have a query which I think should have a simple answer but maybe not...
We have recently put in place a simple referral scheme on a cost per acquisition basis. Hence, every visitor that arrives on our site from a particluar website e.g. www.iwasreferred.com gets a discount if they add the promotion code to the Promo Code field on the application page.
I was wondering if there was a simpler way of doing this where they would not have to physically enter the code but the url from which they were referred was automatically added to that promo field.
Any ideas or advice will be appreciated.
Regards
Amit Sharma
E-Business Consultant at Dan Barker
16 February 2007 17:47pm
hi, Amit, how are you?
Do you code your site yourself? Are you using off-the-shelf software? Do you have a development team?
Yes, you can do this simply:
- What you need to do is grab the referring URL (or, better, domain) when a visitor first arrives at your site.
- Store this in what's called a 'session variable' (a variable that can be called by a page at any point during their session on your site).
- As the 'checkout' page is loading, check for the existence of this session variable &, if it does exist, use it to pre-fill the promotion code field.
A couple of hiccups you might face:A couple of workarounds that may better achieve your objective:
Is that of any use?
daniel
Digital Marketing & Strategy Consultant at Emotion Associates Limited
19 February 2007 09:21am
Hi Daniel,
Very helpful indeed. I guess the "problem" is that our IT department does code the website and all development is done internally. They have been working on this and have promised to have it all resolved but it hasn't happened and I was hoping there was a quick workaround.
Your post was extremely helpful as it primarily confirms all the research we have done in the past on the subject and also the fact that we are going to have to wait for our IT team to sort this out for us.
Thanks again for taking the time to reply.
Kind regards
Amit Sharma
Retired at Retired
19 February 2007 18:28pm
Just to add a little to Daniel's excellent reply. I would recommend his final option of including some sort of code in the URL your referring site uses to identify them. For example http://www.mydomain.com?id=associate. The things after the question mark is called a search string and get to it in javascript with location.search.
The javascript to pick up the code and put it into a cookie is fairly trivial (do view source on www.handleanything.com for example - around line 100.) No doubt it can be improved if you have a lot of associates.
Then picking up the cookie value and storing it is not rocket science. Alternatively if you have an promotion code you can probably put the promotion code into a cookie and use javascript to copy it to your existing web form.
As long as you have some way of injecting some Javascript into the existing site then it shouldn't take very long to do.
Bob
Digital Marketing & Strategy Consultant at Emotion Associates Limited
20 February 2007 12:26pm
Hi Bob,
Thanks for that. Apparently it seems our problem is with someone "sticking their finger out " and doing the job... as you said not rocket science.
Thanks for this. I have forwarded both posts to our technical team and hopefull we will have a result somewhere along the line.
Thanks
Amit
On 18:28:51 19 February 2007 textor wrote:
E-Business Consultant at Dan Barker
20 February 2007 14:02pm
hi, Bob, Amit,
I agree with Bob, it is not 'rocket science'. I would recommend doing the processing on the backend though (in php/asp/whatever you're using) - there are a few disadvantages if you do this with javascript & no advantage that I can think of.
The 'search string' is actually called the 'query string'. I think the confusion is that in javascript you gemerally use 'location.search' to grab its contents.
daniel
Retired at Retired
20 February 2007 14:57pm
I stand corrected on the name.
The only advantage of the javascript is that it is often easier to get access to the page layouts than the programs. In general I would agree best and safest done server-side.