#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    3
    Rep Power
    0

    Post tracking a url in cold fusion


    Question...Please help if you can.

    I have 5 emails that all link to a nearly indentical "offer page." The only difference is that on the offer page is a "proceed to checkout" image which somehow picks up the url parameters from the email and that ID is brought to the shopping cart and can be tracked to the sale.

    I think I can get the parameters from the email url, but how do I get it "into" the link property of the "proceed to checkout" image on the offer page. Example: if a person comes from email #1 the link under the "proceed to checkout" image is http://www.xyz.com/abc.cfm?aID=1234 and if another person comes from email #2 the link under the "proceed to checkout" image is http://www.xyz.com/abc.cfm?aID=5678

    It seems as though the link under the "proceed to checkout" image has to change DYNAMICALLY, depending on what email they come from. How do I change to link dynamically?

    If I am not explaining myself properly, I will send the actual emails and the corresponding offer pages that are identical, with the exception of the link underneath the proceed to checkout image which corespondes to the different emails.

    Any help you could offer would be truely appreciated. Maybe I am going about this wrong. Thank.

    Scott
  2. #2
  3. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,286
    Rep Power
    968

    Re: tracking a url in cold fusion


    Originally posted by sdoscher
    Example: if a person comes from email #1 the link under the "proceed to checkout" image is http://www.xyz.com/abc.cfm?aID=1234 and if another person comes from email #2 the link under the "proceed to checkout" image is http://www.xyz.com/abc.cfm?aID=5678
    Maybe I'm missing something, but this seems to be very easy. In your email, have the link be dynamic, something like this:

    http://mysite.com/page.cfm?aID=1234

    Then on the page that's showing the proceed to checkout link you do:

    a href="mysite.com/checkout/page.cfm?aID=#url.aID#

    Any variables passed via the url are available to CF via the URL scope. Same goes for form fields which are available via the FORM scope.

    Hope that helps,

    Brian
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    3
    Rep Power
    0
    Hi Brian,

    It does seem easy doesn't it and it probably is. I must be missing something obvious. The way you suggested doesn't work because when the aID is sent to the offer page, the status bar shows (when hovering over the image) http://www.beealive.com/index.cfm?fu...1&catID=1&aID= &aID=#url.aID". In other words it doesn’t seem to be able resolve the url.aID parameter. When you click the image it throws and error on the site. However, if you hardwire in the aID….perfect.

    I am sure it something simple, like a variable declaration problem or synax. Again, I am very close so any help you could offer would be so appreciated. Thanks.

    Scott
  6. #4
  7. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,286
    Rep Power
    968
    When outputting variables in CF the variable must be within a set of <cfoutput></cfoutput> tags. You can wrap the whole page in cfoutput, or only that variable, but it must be within cfoutput tags. Also, you can't nest cfoutput tags so watch out for that. The only time you'd nest cfoutput tags is when you use the "group" attribute which is a specific situation (and this isn't one of those).
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    3
    Rep Power
    0
    IT worked! Thank you ALL SO MUCH for your help. It is really nice to have a place to go for real practical help in time of need. Thanks for the giving of your time and expertise. It truely is appreciated.

    Scott
  10. #6
  11. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,286
    Rep Power
    968
    You're welcome. I recommend giving Fusebox a try if you are going to do more CF work. It is a great framework for building CF (and PHP) applications. www.fusebox.org.

    Regards,

    Brian

IMN logo majestic logo threadwatch logo seochat tools logo