Personalization of a sales letter

Would you like to have your webpages and sales letters personalized?
I know you’d like.

It’s possible!
Basically someone arrives at a webpage they only enter their name then press a button to be taken to the next pages which would then be personalized with their name.

Take this great easy-to-use script to create personalized webpages.
When a web-form is completed all the other pages arrived at on that domain will be personalized.

Download the script

Click this link below with the right mouse-button then select the “Save Target As…” item and save the personalize.js file on your local PC.

Download: personalize.js

Now upload it onto your site beside your webpages.
Insert the <script> tag with the script-file just before the </body> tag of every your personalized page.

You can copy the code from the box below and paste it into your page.

This code should look like this:


    <script type="text/javascript" src="personalize.js">

From now your web-forms would be personalized.
But you have to specify where the prospect’ names should be appear in the text.

Personalize the text

In order to push the prospect’ name into your text place the “anchor” tag with the name-attribute:
<A name="first_name"></A>
The first name would be inserted into the text there in this case.

What if your visitor hasn’t enter his name?
Insert your alternative text between the <A> and </A> tags.

This is the code that personalizes web pages:
<P>Hello <A name="first_name">Fellow Internet Marketer<A>!

The new visitors would see this text:

Hello Fellow Internet Marketer!

After submitting a form they will see the text like this:

Hello John!

Personalizing fields

You can use this script for first name, last name, full name and email.

Various forms and applications use different field-names, so this script can work with:
 * first name as first_name, first_Name, firstname and firstName
 * last name as last_name, last_Name, lastname and lastName
 * full name as full_name, full_Name, fullname, fullName and name
 * email as email and from

This fields can be used as a form-fields and as the names of the <A>-tags.

Personalize a page with the Page URL
(was added at Nov 20, 2006)

You can personalize a page with the URL parameters.
So you can provide your subscribers with a personalized link.

Use this URL parameters below:
__fn - for the first name,
__ln - for the last name,
__n - for the full name,
__e - for the email address.
(use double underscore letter ‘_’)

Your personalized link would look like this:
Or with your AWeber Tags:{!firstname}&__ln={!lastname}

Live sample

Lets use the code below to personalize our sample:


    <P>Hello <A name="first_name">Friend<A>!
    <form method="post">
      First Name <input name="first_name">
      <input type="submit" value="Test">
      Enter your name and click the "Test" button.

    <script type="text/javascript" src="personalize.js">

Hello Friend!

First Name
Enter your name and click the “Test” button.


by Michel Komarov, © Copyright 2006.


Share in social bookmarking:These icons link to social bookmarking sites where readers can share and discover new web pages.  digg BlinkList Reddit NewsVine YahooMyWeb co.mments

Related Articles:

20 Responses to “Personalization of a sales letter”

  1. gyoumans Says:

    I can not get this scrip to work on my web site. I have did all of the instructions but the name will not go on my thank you page or sales page.

  2. michel Says:

    Hi Gyoumans,

    1) You have an error in another javascript at your form-page. This is why no whatever script work at this page.
    You have 2 blocks of code like this:
    <script LANGUAGE=”JavaScript”>
    <!–//Begin script function emailCheck()
    {if (”") { alert(”Please enter your Email Address.”);;return false
    // End script // –>

    The first script-line should be splitted into 1-comment and 2-function declaration:
    <script LANGUAGE=”JavaScript”>
    <!–//Begin script
    function emailCheck()

    Also remove the second script-block with the same function-declaration.

    2) You inserted the personalize.js script twice at your thank-you page. Please remove the script at the top of the page. The script just before the </body> tag would be enough.

    I hope this helps.

  3. My Magic Web Utilities » Personalize your online sales letters Says:

    […] Please visit […]

  4. treypat Says:

    Michel, First of all. Thank you so much for these scripts. You are the man.
    I love the personalization of the letter. My site goes from opt-in page to squeeze page and then the same day or maybe the next they go to the sales page.

    I can get the script to work for the confirmation page but is there a way for it to
    work when they get to the sales page- later in the day or the next day.

    Thank you again,


  5. michel Says:

    Hi Trey,

    Yes, you can use this script with your sales page the same way you use it with the confirmation page. The personalization data is saved in cookie and can be used in a year or until they remove their cookies.

    Insert the script at the bottom of your page (above the </body> -tag):
    <script type="text/javascript" src="personalize.js">

    And place the named <A name="first_name">Dear friend</A> -tags where you’d like to have the customers name.

    Hope this helps.

  6. Richard Says:

    Hi Michel

    On my email optin web form,
    could I use this personalize script so if they only gave me their email address and left first name blank, I could use “Dog Lover” as alternative.

    Just make the following change in your above “Live Sample”
    First Name <A>Dog Lover</A>



  7. michel Says:

    Hi Richard,

    Yes, you can use this personalize script with a template like below within the html-text of your page:
    Dear <a name="first_name">Dog Lover</a>! …

    And if they left first name blank, the “Dog Lover” alternative will be used.


  8. treypat Says:

    Thank you Michel. That worked.


  9. Richard Says:

    Hi Michel

    Thank you!

    Best regards,


  10. rtharp Says:

    Great script.

    Is there anyway this can work with Aweber and their autoresponders?

    I have contacts that are 4 years old on it.

  11. rtharp Says:

    Can this be done in aweber?

    I’ve got clients that are 4 years old on my list.

    It would have to be done through the links on my html either in the email or
    on the page..

    something like this{!firstname_fix} can the js somehow recoginize what Aweber enters?

  12. michel Says:

    Hi Richard,
    Thanks for your question.

    I’ve just uploaded a new version of this script.
    It allows you to use personalization parameters with a page URL.
    So you can provide your AWeber subscribers with a personalized link.

    Download the script with the same link: personalize.js
    Click the link with the right mouse-button and select the “Save target As…” menu item.

    Use this URL parameters below:
    __fn - for the first name,
    __ln - for the last name,
    __n - for the full name,
    __e - for the email address.

    So, your link would look like this:
    Or with your AWeber Tags:{!firstname_fix}&__ln={!lastname}

    I hope this helps.


  13. Larry Keenan Says:

    I have edited the script with the following:

    * Added user field for Autoresponder Unlimited.
    * Added nickname field for Rapid Action Profits.
    * Added f , l and e fields for Infinite Responder.
    * Added category2 and category3 for getresponse.
    * Added affname to allow for affiliate name display
    * Shorten Document Domain to allow script to work across sub domains.

    Grab my revised version from:

    Have a Great Day!
    Larry Keenan

  14. Sum Gye Says:

    Michael -

    When you personalize a page with the page URL, can you then
    PULL that info (first name, last name) INTO the the sales page
    and avoid having to use a form to grab the data?

    I haven’t tested this yet, but will it work??? Or is ti obvious that
    it WILL work and I’m not seeing it (or obvious that it WON’T work
    and I’m not seeing that either).

    I am NOT a programmer, just fascinated with webpages, etc…


  15. Osman Says:

    I’m still confused how this thing works.

    I’ve set up a squeeze page which will direct
    to a thank you page after someone enter
    their name and email address.

    But how can the autoresponder script integrate
    with your personalisation script.

    I tried following the steps shown but it just
    don’t seem to work.

    Please help.



  16. michel Says:

    Hi Osman,

    1) You need to include this script into your squeeze page with the form.
    So when someone submits the form, their Email and Name would be
    saved in cookies.

    This could be any form you’d like.
    This form could send the data to your autoresponder.

    2) You need to include this script into the thank-you page.
    Also adjust your thank-you page with the personalize <A name="firstname"> tags.
    So the script would take the Email and Name from cookies and
    substitute the text inside the personalize tags.

    By another words, you need to include the script into both
    the squeeze page and the thank-you page to get it working.

    Hope this helps.


  17. Osman Says:

    Hi Michel,

    Thanks for this script… I’ve managed to
    get it to work on my website.

    But how can I get it to work on a blog?
    Where should i upload the personalize.js
    script on? Is it on the theme folder or the
    main blog folder?

    And I also can’t find a
    tag to have the script pasted on.

  18. Osman Says:

    I mean I can’t find the tag to
    have the script pasted on.


  19. Osman Says:


    the tag doesn’t appear.

    this is what I’m trying to type in.


  20. michel Says:

    Hi Osman,

    You can upload the personalize.js file into the root folder of your blog and insert the script tag into the blog footer template:
    <script type="text/javascript" src="/personalize.js">

    Note. You need to enter the correct path to the personalize.js file.
    If you upload it into the root folder, use precedent slash befor the file-name.

    You also need to use personalization tags like is shown above.
    <A name="first_name"></A>

    Hope this helps.

Got a question?   Leave a Reply

You must be logged in to post a comment.