Tutor Tanith

Redirecting the Customer Within CafePress®

A common question:

I reorganized. Following recommendations I kept my old sections but hid them. People are still using links to the old hidden sections. How do I move people to the correct new location?

When sections are moved around within a shop there isn't a problem with existing links because the section URL stays the same. But what happens if you really want to get them to a new section, or need to get people from an old shop to a new one? (Note: Redirecting an outside website or domain to CafePress can use a different method).

  1. The simplest solution is to just put the new link and some explanatory text in the Section Description area. When I provide a new location I like to include the actual URL just in case the page is being shared in a way that the link doesn't work. It looks something like this:

    "The products have been moved to the shop Best Dog Shop Ever. http://www.cafepress.com/dogplay"

  2. The code looks like this:

    The products have been moved to the shop <strong><a href="http://www.cafepress.com/dogplay">Best Dog Shop Ever</a></strong>. <a href="http://www.cafepress.com/dogplay">http://www.cafepress.com/dogplay</a>

    It isn't automatic, but everyone can understand it. 

  3. It doesn't matter what language you use. Some people like to add "a call to action".
  4. "The products have been moved to the shop Best Dog Shop Ever. http://www.cafepress.com/dogplay Go there now!"

  5. You might like to make it so that the user doesn't have to click. They move automatically. To do that you can include a javascript in your Section Description area.

    This is a common script. It works, but it has a problem. In some browsers, if the user uses their "goback" button, they can end up looping. To get out of the loop they have to do two quick "go back", or use other methods to navigate away.

    Test it here. It will probably loop in Internet Explorer, probably not in Firefox. I haven't tested in other browsers.

    <script type="text/javascript">
    <!--
    window.location("http://www.cafepress.com/dogplay");
    //-->
    </script>

  6. A better solution is this script. It replaces the original location with the new one in the history. That solves the problem with looping if the user uses the "back" button. This is the most popular solution for moving people between sections or shops. Test it here.

    <script language="javascript">
    <!--
    location.replace("http://www.cafepress.com/dogplay");
    -->
    </script>

    For details on using redirects to integrate multiple shops see http://www.squidoo.com/Cpshoplinking

  7. You may also want to give the user an opportunity to choose whether they want to be redirected. This one pops up a prompt.If the customer clicks "OK" it redirects them to the new location. If they cancel it returns to the original link location. In other words it doesn't leave them on the page where the script is in either case.Test it here:

    <script language="javascript">
    if(confirm("This page has been moved to a new location. Would you like to be redirected?"))
    {
    location.replace("http://www.cafepress.com/dogplay");
    }
    else
    {
    history.back();
    }
    </script>

    .
  8. A slight change to the confirmation script will allow the user to stay on the landing page if they don't want to be redirected. Test it here:

    <script language="javascript">
    if(confirm("This page has been moved to a new location. Would you like to be redirected?"))
    {
    location.replace("http://www.cafepress.com/dogplay");
    }
    else
    {
    }
    </script>

  9. .

  10. Instead of a popup, a user might prefer a button. Test it here.

    <script language="javascript">
    <!--
    function waitRedirect()
    {
    window.location.replace("http://www.cafepress.com/dogplay");
    }
    // -->
    </script>
    <form name="redirector">
    <input type="button" value="Click for New Location" onClick = "waitRedirect();">
    </form>

  11. This one works automatically, but after a delay, so the user can read text explaining the redirect. Test it here.

    <script language="javascript">
    <!--
    setTimeout('window.location.replace("http://www.cafepress.com/dogplay")', '5000');
    -->
    </script>

    To change the timing, change the 5000 - 5000=5seconds, 8000=8seconds, etc.

  12. Another common method is to use a "metatag" in the "head" of the document. While it is possible to use in in the section description of a section, I don't recommend this method in the CP environment. It looks like this:
    < meta http-equiv="REFRESH" content="0; URL=http://www.cafepress.com/Your shop Id/your section number >

    If the user tries to use the "back" button they will keep getting forwarded unless they quickly press it twice. Many people don't know to press twice quickly, or they may lack the manual dexterity to do it. This article covers the issue in more detail http://www.w3.org/QA/Tips/reback The "redirects" mentioned in that article, however, require access to the server in a way that is not available on CafePress. You can use them if you have your own web site or your own domain.

  13. Search engines generally don't read Javascript so they can't follow the javascript or metatag redirects. The same is true of some browsers, including some screen readers used by the blind. So make sure to include a normal link to follow in addition to the javascript.

    If you want to get fancy you can put that normal link inside a "No script" tag.
    <noscript>The products have been moved to the shop <strong><a href="http://www.cafepress.com/dogplay">Best Dog Shop Ever</a></strong>. <a href="http://www.cafepress.com/dogplay">http://www.cafepress.com/dogplay</a></noscript>

    Anything inside the noscript tag won't be seen by someone using a browser with javascript enabled but will be perfectly visible when javascript is disabled, and to search engines. For this example if you have javascript enabled you won't see the text :

    "If you are not automatically redirected just click the link Best Dog Shop Ever. http://www.cafepress.com/dogplay"

    But you can disable javascript and see it, or just view the page source.



         

Did this help?

Help       About      Site Map     Home

Custom Search
 
Tutor Tanith
Support Alley Cat Allies