User Tools

Site Tools


redirecting_users

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
redirecting_users [2018/09/03 13:41] lucyredirecting_users [2021/09/07 23:00] (current) – [Time based redirect a user on a landing page in a web based scenario] lucy
Line 1: Line 1:
 LUCY offers different possibilities to redirect a user to a predefined pages in certain scenarios: LUCY offers different possibilities to redirect a user to a predefined pages in certain scenarios:
  
-===== Redirect a user in a [[create_a_phishing_campaign_with_only_a_hyperlink_in_mail_no_landing_page|hyperlink based scenario]] =====+===== Redirect a user in a hyperlink based scenario =====
    
-A hyperlink based scenario has no landing page involved. Instead the user just gets a message (mail or SMS) with some content and possibly a hyperlink. If the message template contains a link (using the %link% variable in order to create a user specific URL) you can tell LUCY where the user will be redirectedwhen the user clicks that link. This can be done in the redirect field within the scenario settings.+A hyperlink-based scenario has no landing page involved. Insteadthe user just gets a message (mail or SMS) with some content and possibly a hyperlink. If the message template contains a link (using the **%link%** variable in order to create a user-specific URL) you can tell LUCY where the user will be redirected when the user clicks that link. This can be done in the redirect field within the scenario settings.
  
 {{ scenario_settingy_hyp.png?600 }} {{ scenario_settingy_hyp.png?600 }}
Line 13: Line 13:
 ===== Time based redirect a user on a landing page in a web based scenario ===== ===== Time based redirect a user on a landing page in a web based scenario =====
  
-You can use the redirect value as well on landing pages. Left mouse click anywhere your landing page (1), then select "insert redirect" within the editor (2) and then define the redirect link (3) using a syntax like "http://www.example.com". As a result the user will be redirected within 5 seconds to the desired web page.+You can use the redirect value as well on landing pages. Left mouse click anywhere your landing page (1), then select **Insert Redirect** within the **Visual Editor** (2) and then define the redirect link (3) using a syntax like "http://www.example.com". As a resultthe user will be redirected within 5 seconds to the desired web page.
  
 {{ redirect_landingpage.png?600 }} {{ redirect_landingpage.png?600 }}
 +
 +If you want to use a **static link** to an **external** Intranet/Wiki page even if you have a separate link 'per language' you can place this redirect in the header:
 +
 +<meta http-equiv="refresh" content="5; url=https://staticlink.companyxy-english.html">
 +<meta http-equiv="refresh" content="5; url=https://staticlink.companyxy-german.html">
  
 ===== Add a redirect script when a form gets submitted or when a link/button gets clicked ===== ===== Add a redirect script when a form gets submitted or when a link/button gets clicked =====
  
-**Variation A**no data gets send to LUCY): Just add an onclick event to the button or link within the source of the code and the user will get redirected to the site defined in %redirect%. Please note: since you are redirecting the user to another site LUCY won't be able to Trigger successful form submits anymore and no data input from LUCY will be recorded.+**Variation A** (no data gets send to LUCY): Just add an onclick event to the button or link, or onsubmit event to a form within the source of the code and the user will get redirected to the site defined in %redirect%. Please note: since you are redirecting the user to another site LUCY won't be able to Trigger successful form submits anymore and no data input from LUCY will be recorded.
  
  
 +    Example form: <form action="" method="post" onsubmit="location.href = '%redirect%';">
 +    
     Example Button:<button onclick="location.href = '%redirect%';" id="myButton"      Example Button:<button onclick="location.href = '%redirect%';" id="myButton" 
     class="float-left submit-button" >Submit</button>     class="float-left submit-button" >Submit</button>
Line 29: Line 36:
  
  
-**Variation B**record data input and trigger success Status**: please create a second page called account.html, then insert the Redirect via the Redirect button (see screenshot). Next change the timeout from 5000 to 0. Lucy is designed that any form based submit action automatically opens a second page with the name account.html if not programmed differently in the html code.  The moment the user submits some form data (the login form should use a POST method and either point to the same page having an empty action attribute or having an action set to "?login" so the form action would look like this: <FORM action="?login" method="post">) on the index.html page, Lucy opens the account.html page where the user will get redirected now.+**Variation B** (record data input and trigger success Status): please create a second page called account.html, then insert the Redirect via the Redirect button (see screenshot). Next change the timeout from 5000 to 0. Lucy is designed that any form based submit action automatically opens a second page with the name account.html if not programmed differently in the html code.  The moment the user submits some form data (the login form should use a POST method and either point to the same page having an empty action attribute or having an action set to "?login" so the form action would look like this: <FORM action="?login" method="post">) on the index.html page, Lucy opens the account.html page where the user will get redirected now.
  
 {{ redirect12.jpg?600 }} {{ redirect12.jpg?600 }}
  
 Here is an example of a possible html code for the account.html page: Here is an example of a possible html code for the account.html page:
- +  <HTML
-    <html+  <head> 
-    <head> +  <title>Redirect Page</title> 
-    <title>Redirect Page</title> +  </head> 
-    </head> +  <body> 
-    <body> +  <p><script>setTimeout(function (){window.location.replace('%redirect%');}, 0);</script></p> 
-    <p><script>setTimeout(function ()  +  </body> 
-    {window.location.replace('%redirect%');}, 0);</script></p> +  </html>
-    </body> +
-    </html>+
  
  
Line 49: Line 54:
  
  
-Among the many [[variables_you_can_use_in_lucy|variables]] that may be used in LUCY there is one called %link-awareness%. You can place that in the redirect input field described above (hyperlink based or web based). It will redirect the user automatically to the eLearning content when a link is clicked or data is submitted.+Among the many [[variables_you_can_use_in_lucy|variables]] that may be used in LUCYthere is one called **%awareness%**. You can place that in the **Redirect URL** input field described above (hyperlink-based or web-based). It will redirect the user automatically to the eLearning content when a link is clicked or data is submitted.
  
  
-===== Redirect a user in a file based scenario to an awareness page (eLearning) =====+=====Redirect a user in a file based scenario to an awareness page (eLearning)=====
  
 This is achievable using some javascript coding. Lets assume you have a file based template with a download button. Instead of using a direct link on that button you can have an javascript function: onclick="downloadAndRedirect('%static%/file.exe?track', '%redirect%');" attribute set. And download and redirect code which you should place inside the head tag could be: This is achievable using some javascript coding. Lets assume you have a file based template with a download button. Instead of using a direct link on that button you can have an javascript function: onclick="downloadAndRedirect('%static%/file.exe?track', '%redirect%');" attribute set. And download and redirect code which you should place inside the head tag could be:
Line 64: Line 69:
     </script>     </script>
     </head>     </head>
 +
 +if you like to use a **'static link' to an external site** at the download button you may use this script, you can use this also for a distinct **link for each language**!
 +
 +    <script type="text/javascript">
 +    function DownloadAndRedirect() 
 +    {   var DownloadURL = "%static%/exe?track";
 +   var RedirectURL = "https://staticlinc.companyxy-english.html";
 +   var RedirectPauseSeconds = 0;
 +   location.href = DownloadURL;
 +   setTimeout("DoTheRedirect('"+RedirectURL+"')",parseInt(RedirectPauseSeconds*1000));  }
 +   function DoTheRedirect(url) { window.location=url; }
 +   </script>
 +
  
  
redirecting_users.1535974875.txt.gz · Last modified: 2019/07/25 12:51 (external edit)