Plugin Directory

Changeset 2346006


Ignore:
Timestamp:
07/24/2020 10:50:59 AM (6 years ago)
Author:
wecantrack
Message:

1.1.2 - Support facebook and youtube clickout referrers

Location:
wecantrack
Files:
21 added
4 edited

Legend:

Unmodified
Added
Removed
  • wecantrack/trunk/WecantrackApp.php

    r2345403 r2346006  
    142142            $post_data = array(
    143143                'affiliate_url' => rawurlencode($original_affiliate_url),
    144                 'clickout_url' => !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : self::get_site_url(),
     144                'clickout_url' => self::get_clickout_url(),
    145145                '_ga' => !empty($_COOKIE['_ga']) ? sanitize_text_field($_COOKIE['_ga']) : null,
    146146                '_wctrck' => !empty($_COOKIE['_wctrck']) ? sanitize_text_field($_COOKIE['_wctrck']) : null,
     
    174174
    175175        return $original_affiliate_url;
     176    }
     177
     178    /**
     179     * Get Clickout URL
     180     *
     181     * @return string
     182     */
     183    private static function get_clickout_url() {
     184        if (!empty($_SERVER['HTTP_REFERER'])) {
     185            if (preg_match("~^https?:\/\/[^.]+\.(?:facebook|youtube)\.com~i", $_SERVER['HTTP_REFERER'])) {
     186                return self::get_site_url();
     187            } else {
     188                return $_SERVER['HTTP_REFERER'];
     189            }
     190        } else {
     191            return self::get_site_url();
     192        }
    176193    }
    177194
  • wecantrack/trunk/readme.txt

    r2345403 r2346006  
    55Tested up to: 5.4
    66Requires PHP: 5.6.20
    7 Stable tag: 1.1.1
     7Stable tag: 1.1.2
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
     
    6161== Changelog ==
    6262
     63= 1.1.2 - 23rd July 2020 =
     64 * Support facebook and youtube clickout referrers
     65
    6366= 1.1.1 - 15th July 2020 =
    6467 * Integrated redirect_through WCT option into the plugin
    65  * Disable www.ezoic.com
     68 * Disable Ezoic for WCT script
    6669 * Load WCT script faster
    6770
  • wecantrack/trunk/wecantrack.php

    r2344893 r2346006  
    77Plugin URI: https://wecantrack.com/wordpress
    88Description: Integrate all you affiliate sales in Google Analytics, Google Ads, Facebook, Data Studio and more!
    9 Version: 1.1.1
     9Version: 1.1.2
    1010Author: wecantrack.com
    1111Author URI: https://wecantrack.com
     
    1717if(!defined('ABSPATH')) { die('You are not allowed to call this page directly.'); }
    1818
    19 define('WECANTRACK_VERSION', '1.1.1');
     19define('WECANTRACK_VERSION', '1.1.2');
    2020define('WECANTRACK_PLUGIN_NAME', 'wecantrack');
    2121define('WECANTRACK_PATH', WP_PLUGIN_DIR.'/'.WECANTRACK_PLUGIN_NAME);
  • wecantrack/trunk/wecantrack.pot

    r2344893 r2346006  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WeCanTrack 1.1.1\n"
     5"Project-Id-Version: WeCanTrack 1.1.2\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wecantrack\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2020-07-22T16:55:11+00:00\n"
     12"POT-Creation-Date: 2020-07-23T15:02:34+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.4.0\n"
Note: See TracChangeset for help on using the changeset viewer.