<?php
require_once(WPMETASEO_ADDON_PLUGIN_DIR . 'inc/pages/google-services/menu.php');
if (empty($this->google_alanytics['tableid_jail'])) {
    echo "<div class='error'><p>";
    esc_html_e('Please select a profile first in order to get Google Analytics data', 'wpmsPro');
    echo '</p></div>';
    wp_redirect(admin_url('admin.php?page=metaseo_google_analytics'));
}
?>

<!--Slide toggle-->
<script>
    // Set default
    <?php if (empty($this->google_alanytics['tableid_jail'])) {
        ?>
    jQuery('.wpms-ga-setting-content').removeClass('hidden');
        <?php
    } else {
        ?>
    jQuery('.wpms-ga-setting-content').addClass('hidden');
        <?php
    }
    ?>
    // Up/Down arrow
    jQuery('body').on('click', '.wpms-ga-setting-title', function (e) {
        if (jQuery(this).hasClass('down')) {
            jQuery(this).removeClass('down').addClass('up');
        } else {
            jQuery(this).removeClass('up').addClass('down');
        }

        jQuery(this).closest('.wpms-ga-setting').find('.wpms-ga-setting-content').stop().slideToggle();
    });
</script>