forked from LiveCarta/LiveCartaWP
home page early redirect
This commit is contained in:
@@ -34,6 +34,20 @@ $scripts = [];
|
||||
var isHomeTemplate = true;
|
||||
</script>
|
||||
<?php endif;?>
|
||||
|
||||
<script>
|
||||
(function(){ // early redirect if needed
|
||||
|
||||
if (typeof frontSettings === 'undefined' || frontSettings.isGuest) return;
|
||||
|
||||
if (typeof isHomeTemplate != 'undefined' && isHomeTemplate === true) {
|
||||
var urlParams = new URLSearchParams(window.location.search);
|
||||
var redirectGetParam = urlParams.get('law') ? '?law=1' : '';
|
||||
window.location.href = lawCartaDomain + '/dashboard' + redirectGetParam;
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
<?php $scripts[] = ['type' => 'script', 'source' =>"https://www.googleoptimize.com/optimize.js?id=OPT-TCXZSGK"]; ?>
|
||||
<?php if (LAWCARTA_ENVIRONMENT_NAME == 'prod'):?>
|
||||
<?php $scripts[] = ['type' => 'comment', 'source' =>'Google Tag Manager']; ?>
|
||||
|
||||
Reference in New Issue
Block a user