Jump to content

URL Parameters - Encoding / Token / ?


kirk112

Recommended Posts

Hi,

 

Just looking for some advice over a feature I am currently working on.  I am building on top of a custom e-commerce site and to increase conversions etc. I want to be able to send a URL to customers that is encoded with their details so that I can identify them when they arrive on the site.

 

For example 

 

customer_id=1&offer_id=50&sale_products=1,2,3,4&promoted_product=12&agent=99

 

From this query string I can query the database and get:

  • the customer details from their id
  • which special offer to display i.e. 20% of products
  • Which products are on sale for them
  • promoted product to display on the landing page
  • who the referrer / agent was so we can show the partner logo

I could use some 2 way encryption to encrypt / decrypt this and then I would be able to use the parameters and variables, but I would have to split then and check which were there. Not all the vars are required.

 

But got a bad feeling over this (don't know why, it just does not feel right... and that there is a better way to do this....)

 

Can anyone see if this is a good way to achieve this or think of a better way...

 

 

Thanks

 

 

 

 

 

 

Link to comment
Share on other sites

Off the top of my head, you could create a table that holds deal details (customer_id, product_id, agent, expiry, etc) and simply pass the deal id in the e-mail. Thatway all your necessary info is at your fingertips but not exposed.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.