Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Track refer code to an order in my site

Track refer code to an order in my site

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasehelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    machocr
    wrote on last edited by
    #1

    Hi this is the scenario: The users of my site can get a link with a refer code (query string) to promote their products on their blogs or sites. I want to track those codes so if a order is created I can give points to refer users as a kind of omission. The problem is before visitor creates an order he/she needs to log in or even register to the site. So I'm looking for a way to trap that code once the visitor enter to my site and don't loose it when he\she log in with a new session . :confused: I was thinking to store that code in the session or profile but it will change once the visitor logs in. In brief I need to capture a refer query string value once the visitor came to mi site, store it and if he/she log in and create an order I can know whow refer him/her. I'm using asp.net 3.5. I'm going to try some things but I would like to know if you can suggest me something. Thanks ;)

    La realidad no es más que impulsos eléctricos del cerebro - Morpheus

    N 1 Reply Last reply
    0
    • M machocr

      Hi this is the scenario: The users of my site can get a link with a refer code (query string) to promote their products on their blogs or sites. I want to track those codes so if a order is created I can give points to refer users as a kind of omission. The problem is before visitor creates an order he/she needs to log in or even register to the site. So I'm looking for a way to trap that code once the visitor enter to my site and don't loose it when he\she log in with a new session . :confused: I was thinking to store that code in the session or profile but it will change once the visitor logs in. In brief I need to capture a refer query string value once the visitor came to mi site, store it and if he/she log in and create an order I can know whow refer him/her. I'm using asp.net 3.5. I'm going to try some things but I would like to know if you can suggest me something. Thanks ;)

      La realidad no es más que impulsos eléctricos del cerebro - Morpheus

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      1 - You get a request with the code in URL as query string. 2 - Keep that in a session. 3 - When user logs in, check this session's value. If session has value, take the code and proceed.

      machocr wrote:

      I was thinking to store that code in the session or profile but it will change once the visitor logs in.

      I didn't understood this. How come a value stored in session changes when user logs in? :)

      Navaneeth How to use google | Ask smart questions

      M 1 Reply Last reply
      0
      • N N a v a n e e t h

        1 - You get a request with the code in URL as query string. 2 - Keep that in a session. 3 - When user logs in, check this session's value. If session has value, take the code and proceed.

        machocr wrote:

        I was thinking to store that code in the session or profile but it will change once the visitor logs in.

        I didn't understood this. How come a value stored in session changes when user logs in? :)

        Navaneeth How to use google | Ask smart questions

        M Offline
        M Offline
        machocr
        wrote on last edited by
        #3

        Thanks, "I didn't understood this. How come a value stored in session changes when user logs in?" yep that's right for some reason I thought so :^)

        La realidad no es más que impulsos eléctricos del cerebro - Morpheus

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups