Rev 8314 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<br/>
<div id="wpsg_tab">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#tab1" aria-controls="home" role="tab" data-toggle="tab"><?php echo __('Auswertung Bestellstatus', 'wpsg'); ?></a></li>
<li role="presentation"><a href="#tab2" aria-controls="profile" role="tab" data-toggle="tab"><?php echo __('Matomo', 'wpsg'); ?></a></li>
<li role="presentation"><a href="#tab3" aria-controls="profile" role="tab" data-toggle="tab"><?php echo __('Google', 'wpsg'); ?></a></li>
<!-- <li role="presentation"><a href="#tab4" aria-controls="profile" role="tab" data-toggle="tab"><?php echo __('Social Media', 'wpsg'); ?></a></li> -->
<li role="presentation"><a href="#tab5" aria-controls="messages" role="tab" data-toggle="tab"><?php echo __('Sonstiges', 'wpsg'); ?></a></li>
</ul>
<div class="tab-content" >
<div role="tabpanel" class="tab-pane active" id="tab1" >
<br/>
<?php
$arSelectedStatus = explode(',', $this->get_option('wpsg_mod_statistics_status'));
echo __('Bitte wählen Sie die Zustände aus unter welchen die Bestellung eines Produktes als abgeschlossen Gültigkeit besitzt.', 'wpsg');
?>
<br/><br/>
<?php
foreach ($this->arStatus as $statusCode => $statusName)
{
echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_status['.$statusCode.']', $statusName, (is_array($arSelectedStatus) && is_string($arSelectedStatus[0]) && strlen($arSelectedStatus[0]) && in_array($statusCode, $arSelectedStatus)?true:false));
}
?>
<?php /* Kartendarstelung START */ ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_googlekey', __('Google API-Key', 'wpsg'), $this->get_option('wpsg_mod_statistics_googlekey'), array('help' => 'wpsg_mod_statistics_googlekey')); ?>
<a class="button-primary" id="button-google" target="popup" href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend&keyType=CLIENT_SIDE&reusekey=true" onclick="window.open('', 'popup', 'width=500;height=200,resizable=yes,menubar=yes')">
<?php echo __('Schlüssel über Ihr Googlekonto anfordern', 'wpsg'); ?>
</a>
<?php /* Kartendarstellung ENDE */?>
<div class="wpsg_clearer"></div>
</div>
<div role="tabpanel" class="tab-pane" id="tab2">
<br/>
<?php echo __('Ermöglicht die Integration des Trackintools "Matomo".', 'wpsg'); ?>
<br/><br/>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_trackingcode', __('Trackingcode einbinden', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_trackingcode'), array('help' => 'wpsg_mod_statistics_piwik_trackingcode')); ?>
<div id="wpsg_mod_statistik_tracking_layer" style="display:none;">
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_url', __('URL zur Matomo Installation', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_url'), array('help' => 'wpsg_mod_statistics_piwik_url'), array('hint' => __('Ohne Protokoll, Beispiel: matomo.domain.de', 'wpsg'))); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_SiteId', __('Matomo Seiten ID', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_SiteId'), array('help' => 'wpsg_mod_statistics_piwik_SiteId')); ?>
</div>
<br />
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_generel', __('Allgemeine Protokollierung', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_generel'), array('help' => 'wpsg_mod_statistics_piwik_generel')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_ecommerce', __('Käufe (eCommerce) tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_ecommerce'), array('help' => 'wpsg_mod_statistics_piwik_ecommerce')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_productView', __('Produkte tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_productView'), array('help' => 'wpsg_mod_statistics_piwik_productView')); ?>
<?php if ($this->hasMod('wpsg_mod_produktartikel')) echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_categoryView', __('Produktkategorien tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_categoryView'), array('help' => 'wpsg_mod_statistics_piwik_categoryView')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_basketdata', __('Warenkorbdaten tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_basketdata'), array('help' => 'wpsg_mod_statistics_piwik_basketdata')); ?>
<br /><br />
<strong><?php echo __('Matomo Goals tracken:', 'wpsg'); ?></strong>
<br />
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_basket', __('Warenkorb tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_basket'), array('help' => 'wpsg_mod_statistics_piwik_basketdata')); ?>
<div id="wpsg_mod_statistics_piwik_basket_layer" style="display: none;">
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_basket_target', __('Matomo ID', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_basket_target')); ?>
</div>
<br />
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_checkout', __('Checkout tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_checkout')); ?>
<div id="wpsg_mod_statistics_piwik_checkout_layer" style="display: none;">
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_checkout_target', __('Matomo ID', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_checkout_target')); ?>
</div>
<br />
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_checkout2', __('Checkout2 tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_checkout2')); ?>
<div id="wpsg_mod_statistics_piwik_checkout2_layer" style="display: none;">
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_checkout2_target', __('Matomo ID', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_checkout2_target')); ?>
</div>
<br />
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_overview', __('Overview tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_overview')); ?>
<div id="wpsg_mod_statistics_piwik_overview_layer" style="display: none;">
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_overview_target', __('Matomo ID', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_overview_target')); ?>
</div>
<br />
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_piwik_done', __('Done tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_done')); ?>
<div id="wpsg_mod_statistics_piwik_done_layer" style="display: none;">
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_piwik_done_target', __('Matomo ID', 'wpsg'), $this->get_option('wpsg_mod_statistics_piwik_done_target')); ?>
</div>
<div class="wpsg_clearer"></div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function() {
var trackingCheckbox = document.getElementById('wpsg_mod_statistics_piwik_trackingcode');
var trackingDiv = document.getElementById('wpsg_mod_statistik_tracking_layer');
var basketCheckbox = document.getElementById("wpsg_mod_statistics_piwik_basket");
var basketDiv = document.getElementById("wpsg_mod_statistics_piwik_basket_layer");
var checkoutCheckbox = document.getElementById("wpsg_mod_statistics_piwik_checkout");
var checkoutDiv = document.getElementById("wpsg_mod_statistics_piwik_checkout_layer");
var checkout2Checkbox = document.getElementById("wpsg_mod_statistics_piwik_checkout2");
var checkout2Div = document.getElementById("wpsg_mod_statistics_piwik_checkout2_layer");
var overviewCheckbox = document.getElementById("wpsg_mod_statistics_piwik_overview");
var overviewDiv = document.getElementById("wpsg_mod_statistics_piwik_overview_layer");
var doneCheckbox = document.getElementById("wpsg_mod_statistics_piwik_done");
var doneDiv = document.getElementById("wpsg_mod_statistics_piwik_done_layer");
function toggleDivVisibility(checkbox, div)
{
if (checkbox.checked) div.style.display = "block";
else div.style.display = "none";
}
// Event Listener für die Checkboxen
trackingCheckbox.addEventListener("change", function() {
toggleDivVisibility(trackingCheckbox, trackingDiv);
});
basketCheckbox.addEventListener("change", function() {
toggleDivVisibility(basketCheckbox, basketDiv);
});
checkoutCheckbox.addEventListener("change", function() {
toggleDivVisibility(checkoutCheckbox, checkoutDiv);
});
checkout2Checkbox.addEventListener("change", function() {
toggleDivVisibility(checkout2Checkbox, checkout2Div);
});
overviewCheckbox.addEventListener("change", function() {
toggleDivVisibility(overviewCheckbox, overviewDiv);
});
doneCheckbox.addEventListener("change", function() {
toggleDivVisibility(doneCheckbox, doneDiv);
});
// Überprüfen und Initialisieren des Anfangszustands der Checkboxen
toggleDivVisibility(trackingCheckbox, trackingDiv);
toggleDivVisibility(basketCheckbox, basketDiv);
toggleDivVisibility(checkoutCheckbox, checkoutDiv);
toggleDivVisibility(checkout2Checkbox, checkout2Div);
toggleDivVisibility(overviewCheckbox, overviewDiv);
toggleDivVisibility(doneCheckbox, doneDiv);
});
</script>
<div role="tabpanel" class="tab-pane" id="tab3">
<br/>
<?php echo __('Ermöglicht die Integration von "Google Analytics 4".', 'wpsg'); ?>
<br/><br/>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_google_active', __('Trackingcode einbinden', 'wpsg'), $this->get_option('wpsg_mod_statistics_google_active'), array('help' => 'wpsg_mod_statistics_google_active')); ?>
<div id="wpsg_mod_statistik_google_tracking_layer" style="display:none;">
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_google_tracking_code', __('Google Tag ID', 'wpsg'), $this->get_option('wpsg_mod_statistics_google_tracking_code'), array('help' => 'wpsg_mod_statistics_google_tracking_code')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_google_tracking_debug_mode', __('Google Debug Mode', 'wpsg'), $this->get_option('wpsg_mod_statistics_google_tracking_debug_mode'), array('help' => 'wpsg_mod_statistics_google_tracking_debug_mode')); ?>
</div>
<br />
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_statistics_google_ecommerce', __('Käufe (eCommerce) tracken', 'wpsg'), $this->get_option('wpsg_mod_statistics_google_ecommerce'), array('help' => 'wpsg_mod_statistics_google_ecommerce')); ?>
<div class="wpsg_clearer"></div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function() {
var GoogleTrackingCheckbox = document.getElementById('wpsg_mod_statistics_google_active');
var GoogleTrackingDiv = document.getElementById('wpsg_mod_statistik_google_tracking_layer');
function toggleGoogleDivVisibility(checkbox, div)
{
if (checkbox.checked) div.style.display = "block";
else div.style.display = "none";
}
// Event Listener für die Checkboxen
GoogleTrackingCheckbox.addEventListener("change", function() {
toggleGoogleDivVisibility(GoogleTrackingCheckbox, GoogleTrackingDiv);
});
// Überprüfen und Initialisieren des Anfangszustands der Checkboxen
toggleGoogleDivVisibility(GoogleTrackingCheckbox, GoogleTrackingDiv);
});
</script>
<!-- <div role="tabpanel" id="tab4" class="tab-pane">
<?php // echo wpsg_drawForm_input('wpsg_mod_statistics_socialmedia_fb_px', __('Facebook Pixel', 'wpsg'), $this->get_option('wpsg_mod_statistics_socialmedia_fb_px'), array('help' => 'wpsg_mod_statistics_socialmedia_fb_px')); ?>
<div class="wpsg_clearer"></div>
</div> -->
<div role="tabpanel" class="tab-pane" id="tab5">
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_line_chart_width', __('Liniendiagramm (Breite in px)', 'wpsg'), $this->get_option('wpsg_mod_statistics_line_chart_width'), array('help' => 'wpsg_mod_statistics_line_chart_width')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_line_chart_height', __('Liniendiagramm (Hoehe in px)', 'wpsg'), $this->get_option('wpsg_mod_statistics_line_chart_height'), array('help' => 'wpsg_mod_statistics_line_chart_height')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_pie_chart_width', __('Kuchendiagramm (Breite in px)', 'wpsg'), $this->get_option('wpsg_mod_statistics_pie_chart_width'), array('help' => 'wpsg_mod_statistics_pie_chart_width')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_pie_chart_height', __('Kuchendiagramm (Höhe in px)', 'wpsg'), $this->get_option('wpsg_mod_statistics_pie_chart_height'), array('help' => 'wpsg_mod_statistics_pie_chart_height')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_bar_chart_width', __('Balkendiagramm (Breite in px)', 'wpsg'), $this->get_option('wpsg_mod_statistics_bar_chart_width'), array('help' => 'wpsg_mod_statistics_bar_chart_width')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_bar_chart_height', __('Balkendiagramm (Höhe in px)', 'wpsg'), $this->get_option('wpsg_mod_statistics_bar_chart_height'), array('help' => 'wpsg_mod_statistics_bar_chart_height')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_topproductcount', __('Anzeige Top-Produkte', 'wpsg'), $this->get_option('wpsg_mod_statistics_topproductcount'), array('help' => 'wpsg_mod_statistics_topproductcount')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_statistics_productinterval', __('Intervall-Zeitraum für Produktstatistik', 'wpsg'), $this->get_option('wpsg_mod_statistics_productinterval'), array('help' => 'wpsg_mod_statistics_productinterval')); ?>
<div class="wpsg_clearer"></div>
</div>
</div>
</div>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#wpsg_tab').wpsg_tab( {
'cookiename': 'wpsg_statistics_tab'
} );
} );
</script>