How the Embed Tag is Processed

When your HTML page is browsed by a customer, the following happens:

  1. The request to serve the page to a user is sent to your web server first.
  2. Your web server renders the email address of the current user into the widget embed tag.
  3. Your web server then sends the rendered page to the customer's browser.
  4. When the widget embed tag (now including a rendered, real email address) is loaded into the browser, it uses JavaScript to send the rendered email address to our database.
  5. Our database looks up the customer, based on their email address, and then sends back the customer's properties (first name, last name, point balance, and so on) to the widget.
  6. The widget then displays whatever properties you have chosen in your widget design. This can be the customer's first name, or an accounting of the users loyalty program point earning, balance, and point expenditures.

How Do I Get the Address of the Current Customer?

Almost all commerce websites today maintain and display personalized information for their users. This is accomplished in a variety of ways, but most often by using cookies and session variables. When a customer logs in, the web server for the site often stores information about that user (including the user's email address) into a cookie. Some sites that maintain more strict security store an encrypted ID for the customer in the cookie, then use that ID to look up the email address of the customer in a protected database at run time. In one way or another, almost all pages of a modern commerce web site have the ability to retrieve the customer's email address.

Users might not even need to be "logged in" to be recognized; instead, they might be "passively recognized". Amazon.com serves as a good example of this approach: if Jane Q. Doe logs in once, closes her browser, then reopens it later (even weeks later), she is greeted with the message "Hello, Jane Doe!". After receiving this personalized greeting, if you try to do anything that requires a higher level of security, like editing personal information, you are asked to login formally.