Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Update DB With Click of Email Link

Explorer ,
Nov 04, 2008 Nov 04, 2008
Here's the scenario: Visitor fills out form on website to request report. BizOwner completes report and sends Visitor an email with a link to the report. The report is based on values stored in a database. The email link looks something like this: http://www.MySite.com/freeReport/ReadYours.cfm?reportID=12345.

What I want to do is have ReadYours.cfm (the report output page) recognize when Visitor comes to the page by clicking the email link. (BizOwner views the same page after completing the report, but not by clicking the email link. BizOwner gets there from page on the site where heShe completes report. So, I don't want to record BizOwner's referral from a page on the website - just Visitor's referral from the email link.) If Visitor has arrived at the page by clicking the email link, update the database to record that Visitor has looked at hisHer report. Database has a table called "prospects", which has a column "readReport". I want to update that column/field to "yes" when Visitor gets to the report by clicking their email link.

Hope I'm making sense.

Thanks in advance,
Gwen H
383
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Nov 04, 2008 Nov 04, 2008
you are making sense and what you want to achieve can easily be done by
adding some other var to the url sent to the user. then on the
ReadYours.cfm page check for existence of that var - if it exists than
the user has come there from a link in the email.
i.e.

send this link to users:
http://www.MySite.com/freeReport/ReadYours.cfm?reportID=12345&e=1

on ReadYours.cfm do
<cfif structkeyexists(url, "e") AND url.e eq 1>
<!--- visitor from email link --->
<cfelse>
<!--- not from email --->
</cfif>...
Translate
LEGEND ,
Nov 04, 2008 Nov 04, 2008
you are making sense and what you want to achieve can easily be done by
adding some other var to the url sent to the user. then on the
ReadYours.cfm page check for existence of that var - if it exists than
the user has come there from a link in the email.
i.e.

send this link to users:
http://www.MySite.com/freeReport/ReadYours.cfm?reportID=12345&e=1

on ReadYours.cfm do
<cfif structkeyexists(url, "e") AND url.e eq 1>
<!--- visitor from email link --->
<cfelse>
<!--- not from email --->
</cfif>

another option, but not very precise, is to just check
#cgi.http_referer# variable:
if it contains your site's domain name then the user came from some page
in your site;
if not - then he/she came either from email link... or from a
bookmark... or from a link on some other site...

hth

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 06, 2008 Nov 06, 2008
LATEST
Thanks so much! That worked perfectly.

GwenH
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources