Plugin Directory

Changeset 2224713


Ignore:
Timestamp:
01/09/2020 09:34:46 AM (6 years ago)
Author:
bookwize
Message:

tracking code update

Location:
bookwize-integrated-booking-engine
Files:
170 added
3 edited

Legend:

Unmodified
Added
Removed
  • bookwize-integrated-booking-engine/trunk/README.txt

    r2223349 r2224713  
    9898= 2.5.4 =
    9999bug fixing
     100
     101= 2.5.5 =
     102tracking code update
  • bookwize-integrated-booking-engine/trunk/bookwize-integrated.php

    r2223349 r2224713  
    1717 * Plugin URI:        https://www.bookwize.com/
    1818 * Description:       This is a short description of what the plugin does. It's displayed in the WordPress admin area.
    19  * Version:           2.5.4
     19 * Version:           2.5.5
    2020 * Author:            Bookwize
    2121 * Author URI:        https://www.bookwize.com/
  • bookwize-integrated-booking-engine/trunk/public/class-bookwize-public.php

    r2223349 r2224713  
    220220        <script type="text/javascript">
    221221            //<![CDATA[
    222             <?php echo 'var IBEConfig = ' . json_encode($this->settings) . ';'; ?>
    223 
     222            <?php echo 'var IBEConfig = ' . json_encode($this->settings) . ';'; ?>       
    224223            //]]>
    225             <?php if(get_option('bw_googleAnalyticsId')!='') { ?>
    226             // Google Analytics, eCommercs
    227             (function (i, s, o, g, r, a, m) {
    228                 i['GoogleAnalyticsObject'] = r;
    229                 i[r] = i[r] || function () {
    230                         (i[r].q = i[r].q || []).push(arguments);
    231                     }, i[r].l = 1 * new Date();
    232                 a = s.createElement(o),
    233                     m = s.getElementsByTagName(o)[0];
    234                 a.async = 1;
    235                 a.src = g;
    236                 m.parentNode.insertBefore(a, m);
    237             })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
    238 
    239             ga('create', '<?php echo get_option('bw_googleAnalyticsId');?>', 'auto', {'allowLinker': true});
    240             ga('require', 'ecommerce'); // Load the ecommerce plug-in.
    241             ga('require', 'displayfeatures');
    242             ga('require', 'linker'); // include the linker plugin
    243             ga('set', 'anonymizeIp', true);
    244             <?php } ?>
    245 
    246224        </script>
     225       
     226        <?php if(get_option('bw_googleAnalyticsId') !='' || get_option('bw_adwordsTrack') != '') { ?>
     227            <script async src="https://www.googletagmanager.com/gtag/js?id=<?php echo get_option('bw_googleAnalyticsId'); ?>"></script>
     228            <script>
     229                window.dataLayer = window.dataLayer || [];
     230                function gtag(){dataLayer.push(arguments);}
     231                gtag('js', new Date());     
     232            </script>                               
     233        <?php } ?>   
     234        <?php if(get_option('bw_googleAnalyticsId') !='') { ?>
     235            <script>
     236                gtag('config', '<?php echo get_option('bw_googleAnalyticsId'); ?>', { 'anonymize_ip': true,  'send_page_view': false, 'linker': {'accept_incoming': true } });                 
     237            </script>
     238        <?php } ?>
    247239        <?php if(get_option('bw_adwordsTrack') != '') { ?>
    248         <script async src="https://www.googletagmanager.com/gtag/js?id=AW-<?php echo get_option('bw_adwordsTrack');?>"></script>
    249         <script>
    250             window.dataLayer = window.dataLayer || [];
    251             function gtag(){dataLayer.push(arguments)};
    252             gtag('js', new Date());
    253 
    254             gtag('config', 'AW-<?php echo get_option('bw_adwordsTrack');?>', { 'anonymize_ip': true });
    255         </script>
    256     <?php } ?>
     240            <script>
     241                gtag('config', 'AW-<?php echo get_option('bw_adwordsTrack');?>', { 'anonymize_ip': true });
     242            </script>
     243        <?php } ?>
    257244        <?php if(get_option('bw_facebookTrack') != '') { ?>
    258245        <script>
Note: See TracChangeset for help on using the changeset viewer.