Plugin Directory

Changeset 2146384


Ignore:
Timestamp:
08/27/2019 01:37:19 PM (7 years ago)
Author:
clickervolt
Message:

1.130

  • Added template for SpicyOffers affiliate network
  • Updated source template for FB Ads
  • The new advanced fraud detection detects even more bots (only after you update the AIDA script on your landers if you're not using the Cloaked redirect)
  • Some UI fixes
Location:
clickervolt/trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • clickervolt/trunk/admin/ajax/ajaxLinks.php

    r2133010 r2146384  
    326326     *
    327327     */
     328    static function getAIDAScriptTemplate()
     329    {
     330        return JSTracking::getRemoteTrackingScript('#SLUG#', ['minimize ' => true]);
     331    }
     332
     333    /**
     334     *
     335     */
    328336    static private function validateUrls(&$urls, &$weights = null, $affNetworks = null)
    329337    {
  • clickervolt/trunk/admin/js/affiliate-networks.js

    r2133010 r2146384  
    8282            AffiliateNetworkHelper.registerNetwork(new AffiliateNetwork("Dr.Cash", "sub1", "{sub1}", "{status}-{uuid}", "{payment}"));
    8383            AffiliateNetworkHelper.registerNetwork(new AffiliateNetwork("Everad", "sid1", "{sid1}", "{status}-{id}", "{payout}"));
    84             AffiliateNetworkHelper.registerNetwork(new AffiliateNetwork("Everflow (Nexus)", "sub1", "{sub1}", "{transaction_id}", "{payout_amount}"));
     84            AffiliateNetworkHelper.registerNetwork(new AffiliateNetwork("Everflow", "sub1", "{sub1}", "{transaction_id}", "{payout_amount}"));
    8585            AffiliateNetworkHelper.registerNetwork(new AffiliateNetwork("ExpertMobi", "subid1", "{{subid1}}", "{{action_id}}", "{{goal_value}}"));
    8686            AffiliateNetworkHelper.registerNetwork(new AffiliateNetwork("Generic - CAKE", "s2", "#s2#", "#tid#", "#price#"));
     
    100100            AffiliateNetworkHelper.registerNetwork(new AffiliateNetwork("MobVista", "aff_sub", "{aff_sub}", "{transaction_id}", "{payout}"));
    101101            AffiliateNetworkHelper.registerNetwork(new AffiliateNetwork("Shareasale", "afftrack", null, null, null));
     102            AffiliateNetworkHelper.registerNetwork(new AffiliateNetwork("SpicyOffers", "clickid", "[spicy_clickid]", "[spicy_transacid]", "[spicy_payout_dot]"));
    102103            AffiliateNetworkHelper.registerNetwork(new AffiliateNetwork("Tapgerine", "aff_sub", "{aff_sub}", "{transaction_id}", "{payout}"));
    103104            AffiliateNetworkHelper.registerNetwork(new AffiliateNetwork("ToroAdvertising", "aff_sub", "{aff_sub}", "{transaction_id}", "{payout:dot_separated}"));
  • clickervolt/trunk/admin/reporting/handlers/handlerWholePath.php

    r2101794 r2146384  
    1111class HandlerWholePath extends HandlerBase
    1212{
    13 
    1413    const FUNNEL_LINK_PREFIX = '#funnel#';
    1514
     
    2019    protected function getTableNames($request)
    2120    {
    22 
    2321        $tables = [];
    2422
     
    3432    protected function addPathsTables($request, $mainTableName, $existingTables)
    3533    {
    36 
    3734        if ($request->isSegmentPresent(Segment::TYPE_FUNNEL_LINK)) {
    3835
     
    5350    function getRows($request, $options = [])
    5451    {
    55 
    5652        $rows = parent::getRows($request, array_merge($options, [
    5753            'formatValues' => false,
     
    217213    protected function getMapper($request)
    218214    {
    219 
    220215        $hasFunnelLink = $request->isSegmentPresent(Segment::TYPE_FUNNEL_LINK);
    221216
  • clickervolt/trunk/admin/views/dashboard.php

    r2133590 r2146384  
    364364        var $select = jQuery('#link-filter');
    365365
    366         $select.append(`<option reserved="true" selected="true" value="${clickerVoltVars.const.ReportTypes.LINKS_ALL_AGGREGATED}">All Links (Aggregated)</option>`);
    367         $select.append(`<option reserved="true" value="${clickerVoltVars.const.ReportTypes.LINKS_ALL_SEPARATED}">All Links (Separated)</option>`);
    368 
    369366        $select.find('option').each(function() {
    370367            var $option = jQuery(this);
     
    373370            }
    374371        });
     372
     373        $select.append(`<option selected="true" value="${clickerVoltVars.const.ReportTypes.LINKS_ALL_AGGREGATED}">All Links (Aggregated)</option>`);
     374        $select.append(`<option value="${clickerVoltVars.const.ReportTypes.LINKS_ALL_SEPARATED}">All Links (Separated)</option>`);
    375375
    376376        ClickerVoltFunctions.ajax('wp_ajax_clickervolt_get_all_slugs', null, {
  • clickervolt/trunk/admin/views/newLink.php

    r2134846 r2146384  
    422422
    423423                                    <div id="aida-script">
    424                                         <textarea readonly rows="4" width="100%"></textarea>
     424                                        <textarea readonly rows="7" width="100%"></textarea>
    425425                                        <a class="button aida-script-copy"><i class="material-icons for-button copy"></i>Copy</a>
    426426                                    </div>
     
    616616
    617617        static init() {
    618             ClickerVoltLinkController.templateAIDAScript = `<?php echo \ClickerVolt\JSTracking::getRemoteTrackingScript('#SLUG#', ['minimize ' => true]); ?>`;
     618            ClickerVoltFunctions.ajax('wp_ajax_clickervolt_get_aida_script_template', null, {
     619                success: function(template) {
     620                    ClickerVoltLinkController.templateAIDAScript = template;
     621                },
     622            });
    619623
    620624            ClickerVoltFunctions.initTabs('#tabs-for-link-edit');
     
    889893
    890894            ClickerVoltFunctions.ajax('wp_ajax_clickervolt_get_all_slugs', null, {
    891 
    892895                success: function(slugInfos) {
    893 
    894896                    ClickerVoltLinkController.refreshSlugs(jQuery('#select-slug-copy-from'), slugInfos, '')
    895897                    ClickerVoltLinkController.refreshSlugs(jQuery('#select-slug-edit-existing'), slugInfos, '')
     
    21022104            ClickerVoltLinkController._trackingURLHtml.refreshTrackingURL();
    21032105
    2104             var aidaScript = ClickerVoltLinkController.templateAIDAScript.replace('#SLUG#', slug);
    2105             jQuery('#aida-script textarea').val(`<script>${aidaScript}<\/script>`);
     2106            if (ClickerVoltLinkController.templateAIDAScript) {
     2107                var aidaScript = ClickerVoltLinkController.templateAIDAScript.replace('#SLUG#', slug);
     2108                jQuery('#aida-script textarea').val(aidaScript);
     2109            }
    21062110
    21072111            ClickerVoltLinkController.refreshConversionPixels();
  • clickervolt/trunk/clickervolt.php

    r2134846 r2146384  
    55 * Plugin URI:  https://clickervolt.com/
    66 * Description: Advanced click tracking, link cloaking and affiliate campaigns management made easy.
    7  * Version:     1.127
     7 * Version:     1.130
    88 * Author:      ClickerVolt.com
    99 * License:     GPLv3
     
    9494    add_action('wp_ajax_clickervolt_delete_link_by_slug', ['ClickerVolt\\AjaxLinks', 'deleteLinkBySlugAjax']);
    9595    add_action('wp_ajax_clickervolt_get_all_slugs', ['ClickerVolt\\AjaxLinks', 'getAllSlugsAjax']);
     96    add_action('wp_ajax_clickervolt_get_aida_script_template', ['ClickerVolt\\AjaxLinks', 'getAIDAScriptTemplateAjax']);
    9697    add_action('wp_ajax_clickervolt_save_source_template', ['ClickerVolt\\AjaxSources', 'saveSourceAjax']);
    9798    add_action('wp_ajax_clickervolt_get_sources', ['ClickerVolt\\AjaxSources', 'getAllSourcesAjax']);
  • clickervolt/trunk/db/db.php

    r2134846 r2146384  
    1111class DB
    1212{
    13     const VERSION = 1.127;
     13    const VERSION = 1.130;
    1414
    1515    const OPTION_VERSION = 'clickervolt-version';
  • clickervolt/trunk/db/objects/parallelId.php

    r2110518 r2146384  
    4444                        if ($other['clickId'] != $params['clickId']) {
    4545                            require_once __DIR__ . '/../tableClicks.php';
     46                            $overwrittenVars = 0;
    4647                            foreach (Click::$colVars as $varName) {
    47                                 $overwrittenVars = 0;
    4848                                if (empty($params['clickData'][$varName]) && !empty($other['clickData'][$varName])) {
    4949                                    $params['clickData'][$varName] = $other['clickData'][$varName];
     
    5151                                }
    5252                            }
    53                             if ($overwrittenVars == 0) {
     53                            if ($overwrittenVars > 0) {
    5454                                $params['clickId'] = $other['clickId'];
    5555                            }
  • clickervolt/trunk/db/objects/sourceTemplateModels.php

    r2134846 r2146384  
    161161
    162162        self::push($models, self::createTemplate(self::FB, [
    163             "campaign_replace" => "Campaign",
    164             "adset_replace" => "Adset",
    165             "ad_replace" => "Ad",
     163            "{{campaign.name}}" => "Campaign",
     164            "{{adset.name}}" => "Adset",
     165            "{{ad.name}}" => "Ad",
     166            "{{placement}}" => "Placement",
     167            "{{site_source_name}}" => "Site Source",
    166168        ], null, null));
    167169
  • clickervolt/trunk/readme.txt

    r2134846 r2146384  
    263263
    264264== Changelog ==
     265= 1.130 =
     266* Added template for SpicyOffers affiliate network
     267* Updated source template for FB Ads
     268* The new advanced fraud detection detects even more bots (only after you update the AIDA script on your landers if you're not using the Cloaked redirect)
     269* Some UI fixes
     270
    265271= 1.127 =
    266272* Fixed issue with old links not loading in some cases
  • clickervolt/trunk/redirect/jsTracking/js/cvTrack.js

    r2133590 r2146384  
    2525                referrer: CVTrack.getReferrer(),
    2626            };
    27 
    28             window.addEventListener("beforeunload", function () {
    29                 // We force that the page must be seen at least 3 seconds to
    30                 // be sure the remote tracking has a chance to be triggered...
    31                 var minTimeOnPage = 3;
    32                 do {
    33                     var curTime = Date.now() / 1000;
    34                 } while (curTime < (window.clickerVolt.timeOnPageStart + minTimeOnPage));
    35             });
    3627        }
    3728
  • clickervolt/trunk/redirect/jsTracking/js/remoteTracking.js

    r2133010 r2146384  
     1cvTimeStart = Date.now() / 1000;
     2window.addEventListener('beforeunload', function () {
     3    // We force that the page must be seen at least 3 seconds to
     4    // be sure the remote tracking has a chance to be triggered...
     5    var minTimeOnPage = 3;
     6    do {
     7        var curTime = Date.now() / 1000;
     8    } while (curTime < (cvTimeStart + minTimeOnPage));
     9});
    110
    211var s = document.createElement('script');
  • clickervolt/trunk/redirect/jsTracking/jsTracking.php

    r2133010 r2146384  
    2323        $pluginDomain = URLTools::getHost($pluginURL);
    2424        $pluginPath = URLTools::getPath($pluginURL);
     25        $serverURL = "//#TOKEN_CVTRACK_JS_DOMAIN#{$pluginPath}/redirect/jsTracking/remoteTracking.php";
    2526
    2627        $tmpSlug = '#SLUGGISH_SLUG#';
     
    3132            $tokens = [
    3233                '#TOKEN_SLUG#' => $tmpSlug,
    33                 '#TOKEN_REMOTE_TRACKING_SERVER_URL#' => "//#TOKEN_CVTRACK_JS_DOMAIN#{$pluginPath}/redirect/jsTracking/remoteTracking.php",
     34                '#TOKEN_REMOTE_TRACKING_SERVER_URL#' => $serverURL,
    3435                '#TOKEN_RECAPTCHA_V3_SITE_KEY#' => CVSettings::get(CVSettings::RECAPTCHA3_SITE_KEY),
    3536                '#TOKEN_RECAPTCHA_V3_HIDE_BADGE#' => CVSettings::get(CVSettings::RECAPTCHA3_HIDE_BADGE),
     
    4344                $js = self::minimizeContent($js);
    4445            }
    45 
    46             $js = str_replace("'", '"', $js);
    4746
    4847            if (false === file_put_contents($path, $js)) {
     
    6665            '#TOKEN_CVTRACK_JS_DOMAIN#' => $domain,
    6766        ];
    68         return str_replace(array_keys($dynamicReplacements), array_values($dynamicReplacements), $js);
     67
     68        $botTrapURL = "{$serverURL}?action=bt";
     69        $botTrapURL = str_replace(array_keys($dynamicReplacements), array_values($dynamicReplacements), $botTrapURL);
     70        $botTrapHTML = "<span style='width:0;height:0;position:absolute;bottom:0;right:0;overflow:hidden;'><a href='{$botTrapURL}'>-</a></span>";
     71
     72        $js = str_replace(array_keys($dynamicReplacements), array_values($dynamicReplacements), $js);
     73        return str_replace("'", '"', "{$botTrapHTML}<script>{$js}</script>");
    6974    }
    7075
  • clickervolt/trunk/redirect/jsTracking/remoteTracking.php

    r2133010 r2146384  
    1717require_once __DIR__ . '/../../utils/dataProxy.php';
    1818require_once __DIR__ . '/../../utils/urlTools.php';
     19require_once __DIR__ . '/../../utils/logger.php';
    1920
    2021
     
    3536        case 'trackIfHuman':
    3637            trackIfHuman();
     38            break;
     39
     40        case 'bt':
     41            flagVisitAsBot();
    3742            break;
    3843    }
     
    344349    $humanResponse();
    345350}
     351
     352/**
     353 *
     354 */
     355function flagVisitAsBot()
     356{
     357    $session = new SessionClick();
     358    $clickInfo = $session->getClickInfo();
     359    if ($clickInfo) {
     360        $suspiciousClick = new SuspiciousClick($clickInfo->getClickId(), 100);
     361        $suspiciousClick->queue();
     362
     363        //Logger::getGeneralLogger()->log("flagVisitAsBot(): " . json_encode($clickInfo->toArray()));
     364    }
     365}
  • clickervolt/trunk/redirect/redirectors/cloaked.php

    r2114955 r2146384  
    5757
    5858            $script = JSTracking::getRemoteTrackingScript($slug, ['cloaked' => true, 'minimize' => true]);
    59             $script = "<script>{$script}</script>";
    6059        }
    6160
Note: See TracChangeset for help on using the changeset viewer.