WordPress.org

Plugin Directory

Changeset 1679359


Ignore:
Timestamp:
06/15/17 16:14:24 (5 months ago)
Author:
bor0
Message:

Update trunk to version 1.4.3

Location:
woocommerce-google-analytics-integration/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • woocommerce-google-analytics-integration/trunk/includes/class-wc-google-analytics-js.php

    r1653504 r1679359  
    9393        } 
    9494 
     95        $track_404_enabled = ''; 
     96        if ( 'yes' === self::get( 'ga_404_tracking_enabled' ) && is_404() ) { 
     97            // See https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiEventTracking#_trackevent 
     98            $track_404_enabled = "['_trackEvent', 'Error', '404 Not Found', 'page: ' + document.location.pathname + document.location.search + ' referrer: ' + document.referrer ],"; 
     99        } 
     100 
     101 
    95102        $domainname = self::get( 'ga_set_domain_name' ); 
    96103 
     
    104111        _gaq.push( 
    105112            ['_setAccount', '" . esc_js( self::get( 'ga_id' ) ) . "'], " . $set_domain_name . 
    106             $anonymize_enabled . " 
     113            $anonymize_enabled . 
     114            $track_404_enabled . " 
    107115            ['_setCustomVar', 1, 'logged-in', '" . esc_js( $logged_in ) . "', 1], 
    108116            ['_trackPageview']"; 
     
    227235        } 
    228236 
     237        $track_404_enabled = ''; 
     238        if ( 'yes' === self::get( 'ga_404_tracking_enabled' ) && is_404() ) { 
     239            // See https://developers.google.com/analytics/devguides/collection/analyticsjs/events for reference 
     240            $track_404_enabled = "" . self::tracker_var() . "( 'send', 'event', 'Error', '404 Not Found', 'page: ' + document.location.pathname + document.location.search + ' referrer: ' + document.referrer );"; 
     241        } 
     242 
    229243        $ga_snippet_head = "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 
    230244        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 
     
    238252        $support_display_advertising . 
    239253        $support_enhanced_link_attribution . 
    240         $anonymize_enabled . " 
     254        $anonymize_enabled . 
     255        $track_404_enabled . " 
    241256        " . self::tracker_var() . "( 'set', 'dimension1', '" . $logged_in . "' );\n"; 
    242257 
     
    419434        $variation_data = version_compare( WC_VERSION, '3.0', '<' ) ? $_product->variation_data : ( $_product->is_type( 'variation' ) ? wc_get_product_variation_attributes( $_product->get_id() ) : '' ); 
    420435        if ( is_array( $variation_data ) && ! empty( $variation_data ) ) { 
    421             $code = "'" . esc_js( wc_get_formatted_variation( $_product->variation_data, true ) ) . "',"; 
     436            $code = "'" . esc_js( wc_get_formatted_variation( $variation_data, true ) ) . "',"; 
    422437        } else { 
    423438            $out = array(); 
  • woocommerce-google-analytics-integration/trunk/includes/class-wc-google-analytics.php

    r1648869 r1679359  
    7777            'ga_use_universal_analytics', 
    7878            'ga_anonymize_enabled', 
     79            'ga_404_tracking_enabled', 
    7980            'ga_ecommerce_tracking_enabled', 
    8081            'ga_enhanced_ecommerce_tracking_enabled', 
     
    149150                'default'       => 'yes' 
    150151            ), 
     152            'ga_404_tracking_enabled' => array( 
     153                'label'         => __( 'Track 404 (Not found) Errors.', 'woocommerce-google-analytics-integration' ), 
     154                'description'   => sprintf( __( 'Enable this to find broken or dead links. An "Event" with category "Error" and action "404 Not Found" will be created in Google Analytics for each incoming pageview to a non-existing page. By setting up a "Custom Goal" for these events within Google Analytics you can find out where broken links originated from (the referrer). %sRead how to set up a goal%s.', 'woocommerce-google-analytics-integration' ), '<a href="https://support.google.com/analytics/answer/1032415" target="_blank">', '</a>' ), 
     155                'type'          => 'checkbox', 
     156                'checkboxgroup' => '', 
     157                'default'       => 'yes' 
     158            ), 
    151159            'ga_ecommerce_tracking_enabled' => array( 
    152160                'label'             => __( 'Purchase Transactions', 'woocommerce-google-analytics-integration' ), 
     
    239247            'use_universal_analytics'           => $this->ga_use_universal_analytics, 
    240248            'anonymize_enabled'                 => $this->ga_anonymize_enabled, 
     249            'ga_404_tracking_enabled'           => $this->ga_404_tracking_enabled, 
    241250            'ecommerce_tracking_enabled'        => $this->ga_ecommerce_tracking_enabled, 
    242251            'event_tracking_enabled'            => $this->ga_event_tracking_enabled 
  • woocommerce-google-analytics-integration/trunk/package.json

    r1653504 r1679359  
    22  "name": "woocommerce-google-analytics-integration", 
    33  "title": "WooCommerce Google Analytics Integration", 
    4   "version": "1.4.2", 
     4  "version": "1.4.3", 
    55  "homepage": "https://wordpress.org/plugins/woocommerce-google-analytics-integration/", 
    66  "repository": { 
  • woocommerce-google-analytics-integration/trunk/readme.txt

    r1653504 r1679359  
    44Requires at least: 3.8 
    55Tested up to: 4.5.2 
    6 Stable tag: 1.4.2 
     6Stable tag: 1.4.3 
    77License: GPLv3 
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html 
     
    6565== Changelog == 
    6666 
     67= 1.4.3 - 15/06/2017 = 
     68* Fix - WC 3.x notice by using proper variation data. 
     69* Add - Option to track 404 (Not found) errors. 
     70 
    6771= 1.4.2 - 09/05/2017 = 
    6872* Fix - Missing Google Analytics ID. 
  • woocommerce-google-analytics-integration/trunk/woocommerce-google-analytics-integration.php

    r1653504 r1679359  
    66 * Author: WooCommerce 
    77 * Author URI: https://woocommerce.com 
    8  * Version: 1.4.2 
     8 * Version: 1.4.3 
    99 * License: GPLv2 or later 
    1010 * Text Domain: woocommerce-google-analytics-integration 
     
    2828     * @var string 
    2929     */ 
    30     const VERSION = '1.4.2'; 
     30    const VERSION = '1.4.3'; 
    3131 
    3232    /** 
Note: See TracChangeset for help on using the changeset viewer.