Implementing subscription
The subscription Web page displays a form in which a user can enter an e-mail address, a name and a password. The subscription page performs basic validation on the form fields, and creates a new Contact record.
When a visitor submits the subscription data, the subscription page checks whether the user is unique and displays an error message if this is not the case. If subscription is successful, the Audience Manager sends out an e-mail message which includes a confirmation link to the confirm subscription page in an e-mail.
The following image shows the sample subscribe page:
Implement or customize subscription as follows:
- For ASP.NET Web sites—modify or customize the
subscribe.aspxand thesubscribe.aspx.cspages and deploy them on your Web site - For JSP Web sites—modify or customize the
subscribe.jsppage and deploy it on your Web site
Add code to your Page Templates to insert subscription links in E-mails using one of the following frameworks (see details below):
- Modular Templating Framework
- VBScript Templating Framework
Modular Templating Framework
Create a link in an e-mail to a subscription confirmation page as follows:
- Add a
OutboundEmail_ConfirmURLmethod to the Dreamweaver Template, used in your Page Template Building Block, to create a link to the Web page in which a new subscriber confirms their subscription. For example:<a href="@@OutboundEmail_ConfirmURL@@">Click here to confirm subscription</a> - Define a query string in the Confirm URL Query String parameter, in the PreProcessing Template Building Block, to define a query string to add to the Confirm Subscription URL. The Subscription confirmation page URL is the URL of the Web page in which a new subscriber confirms their subscription and is defined in a Publication's Audience Management tab.
VBScript Templating Framework
Use the following VBScript function in the E-mail Page Template to create a link in an e-mail to a subscription confirmation page:
OutboundEmail.GetConfirmURL()
This function returns the URL of the confirmation page. Here is an example of how to use this function: www.website.com received a request to register you for our e-mail service.
<br />
Click <a href='[% WriteOut OutboundEmail.GetConfirmURL() %]'>here</a> to
confirm your subscription.
This function has one optional parameter:
Optional ByVal customQueryStringParameterValue As String = ""
You can use this parameter to add one custom parameter, called custom, to the URL you create. The value of this custom parameter is the value of customQueryStringParameterValue. By using this parameter, you can, for example, add a Publication ID to the URL. The confirmation page can then retrieve this Publication ID and change its behavior accordingly.