Plugin Directory

Changeset 991925


Ignore:
Timestamp:
09/17/2014 02:19:21 PM (11 years ago)
Author:
BFTrick
Message:

v1.2.1

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

Legend:

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

    r956096 r991925  
    4545        add_action( 'woocommerce_after_add_to_cart_button', array( $this, 'add_to_cart' ) );
    4646        add_action( 'wp_footer', array( $this, 'loop_add_to_cart' ) );
     47
     48        // utm_nooverride parameter for Google AdWords
     49        add_filter( 'woocommerce_get_return_url', array( $this, 'utm_nooverride' ) );
    4750    }
    4851
     
    469472    }
    470473
     474
     475    /**
     476     * Add the utm_nooverride parameter to any return urls. This makes sure Google Adwords doesn't mistake the offsite gateway as the referrer.
     477     *
     478     * @access public
     479     * @param  string $type
     480     * @since  1.2.1
     481     * @return string
     482     */
     483    public function utm_nooverride( $return_url ) {
     484
     485        // we don't know if the URL already has the parameter so we should remove it just in case
     486        $return_url = remove_query_arg( 'utm_nooverride', $return_url );
     487
     488        // now add the utm_nooverride query arg to the URL
     489        $return_url = add_query_arg( 'utm_nooverride', '1', $return_url );
     490
     491        return $return_url;
     492    }
     493
    471494}
  • woocommerce-google-analytics-integration/trunk/readme.txt

    r956096 r991925  
    33Tags: woocommerce, google analytics
    44Requires at least: 3.8
    5 Tested up to: 3.8
    6 Stable tag: 1.2.0
     5Tested up to: 4.0
     6Stable tag: 1.2.1
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    4949== Changelog ==
    5050
     51= 1.2.1 - 17/09/2014 =
     52 * Tweak   - Adding utmnooverride to return url for Google Adwords
     53
    5154= 1.2.0 - 28/07/2014 =
    5255 * Feature - Adding display advertising parameter to Universal Analytics
  • woocommerce-google-analytics-integration/trunk/woocommerce-google-analytics-integration.php

    r956096 r991925  
    66Author: WooThemes
    77Author URI: http://www.woothemes.com
    8 Version: 1.2.0
     8Version: 1.2.1
    99*/
    1010
Note: See TracChangeset for help on using the changeset viewer.