mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-22 22:52:35 +03:00
Added the google_analytics_code in the booking page.
This commit is contained in:
parent
e0c3c0eba5
commit
6bfa642339
3 changed files with 460 additions and 436 deletions
|
@ -88,6 +88,8 @@ class Appointments extends CI_Controller {
|
|||
$customer = array();
|
||||
}
|
||||
|
||||
$google_analytics_code = $this->settings_model->get_setting('google_analytics_code');
|
||||
|
||||
// Load the book appointment view.
|
||||
$view = array (
|
||||
'available_services' => $available_services,
|
||||
|
@ -96,7 +98,8 @@ class Appointments extends CI_Controller {
|
|||
'manage_mode' => $manage_mode,
|
||||
'appointment_data' => $appointment,
|
||||
'provider_data' => $provider,
|
||||
'customer_data' => $customer
|
||||
'customer_data' => $customer,
|
||||
'google_analytics_code' => $google_analytics_code
|
||||
);
|
||||
|
||||
} catch(Exception $exc) {
|
||||
|
|
|
@ -403,5 +403,17 @@
|
|||
<script
|
||||
type="text/javascript"
|
||||
src="<?php echo $this->config->item('base_url'); ?>/assets/js/general_functions.js"></script>
|
||||
|
||||
<?php if ($google_analytics_code !== ''): ?>
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', '<?php echo $google_analytics_code; ?>', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
</body>
|
||||
</html>
|
|
@ -66,7 +66,8 @@
|
|||
<?php } ?>
|
||||
</legend>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="wrapper row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="company-name"><?php echo $this->lang->line('company_name'); ?> *</label>
|
||||
<input type="text" id="company-name" data-field="company_name" class="required form-control">
|
||||
|
@ -91,12 +92,20 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
<a href="<?php echo $this->config->item('base_url'); ?>" target="_blank" class="btn btn-info">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
<?php echo $this->lang->line('go_to_booking_page'); ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="google-analytics-code">
|
||||
Google Analytics ID</label>
|
||||
<input type="text" id="google-analytics-code" placeholder="UA-XXXXXXXX-X"
|
||||
data-field="google_analytics_code" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue