Step 4: Integrating Into “Thank You” Page
To cause cookie values to be inserted into the form, create an IFRAME on the post-sale “thank you” page. The SRC of the IFRAME is the URL to the web page created in the previous three steps.
For this example, we’ll make a rather small IFRAME so it’s invisible on the web page. The IFRAME works just as well whether large or small.
Here is the IFRAME (supposing the web page created in the previous steps is at http://example.com/cookieharvest.html)
Make the background color of the cookieharvest.html web page identical to the post-sale “thank you” page containing the IFRAME. Otherwise, the difference in background colors may make the IFRAME obvious.
When the form in the IFRAME is automatically submitted, the top-left 5 pixels of the confirmation page the form handling program generates (or redirects to) will appear with the IFRAME. If that top-left corner of the confirmation page is empty of text and images, and the background color is also identical to the post-sale “thank you” page, the IFRAME may never be noticed.
Of course, the IFRAME may be larger, obvious, and serve a purpose in addition to sending cookies by email. As an example of such a purpose, the confirmation page the form handling program generates (or redirects to) might contain a special thank you with an invitation to an exclusive customer’s area.
To cause cookie values to be inserted into the form, create an IFRAME on the post-sale “thank you” page. The SRC of the IFRAME is the URL to the web page created in the previous three steps.
For this example, we’ll make a rather small IFRAME so it’s invisible on the web page. The IFRAME works just as well whether large or small.
Here is the IFRAME (supposing the web page created in the previous steps is at http://example.com/cookieharvest.html)
<iframe
src="http://example.com/cookieharvest.html"
height="5"
width="5"
scrolling="no"
frameborder="0">
</iframe>That will create an IFRAME 5 pixels square, with no border and no scrollbars. (Use a larger IFRAME for initial testing so any error messages the form handling program may send are visible.)Make the background color of the cookieharvest.html web page identical to the post-sale “thank you” page containing the IFRAME. Otherwise, the difference in background colors may make the IFRAME obvious.
When the form in the IFRAME is automatically submitted, the top-left 5 pixels of the confirmation page the form handling program generates (or redirects to) will appear with the IFRAME. If that top-left corner of the confirmation page is empty of text and images, and the background color is also identical to the post-sale “thank you” page, the IFRAME may never be noticed.
Of course, the IFRAME may be larger, obvious, and serve a purpose in addition to sending cookies by email. As an example of such a purpose, the confirmation page the form handling program generates (or redirects to) might contain a special thank you with an invitation to an exclusive customer’s area.