Changeset 2146384
- Timestamp:
- 08/27/2019 01:37:19 PM (7 years ago)
- Location:
- clickervolt/trunk
- Files:
-
- 15 edited
-
admin/ajax/ajaxLinks.php (modified) (1 diff)
-
admin/js/affiliate-networks.js (modified) (2 diffs)
-
admin/reporting/handlers/handlerWholePath.php (modified) (5 diffs)
-
admin/views/dashboard.php (modified) (2 diffs)
-
admin/views/newLink.php (modified) (4 diffs)
-
clickervolt.php (modified) (2 diffs)
-
db/db.php (modified) (1 diff)
-
db/objects/parallelId.php (modified) (2 diffs)
-
db/objects/sourceTemplateModels.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
redirect/jsTracking/js/cvTrack.js (modified) (1 diff)
-
redirect/jsTracking/js/remoteTracking.js (modified) (1 diff)
-
redirect/jsTracking/jsTracking.php (modified) (4 diffs)
-
redirect/jsTracking/remoteTracking.php (modified) (3 diffs)
-
redirect/redirectors/cloaked.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
clickervolt/trunk/admin/ajax/ajaxLinks.php
r2133010 r2146384 326 326 * 327 327 */ 328 static function getAIDAScriptTemplate() 329 { 330 return JSTracking::getRemoteTrackingScript('#SLUG#', ['minimize ' => true]); 331 } 332 333 /** 334 * 335 */ 328 336 static private function validateUrls(&$urls, &$weights = null, $affNetworks = null) 329 337 { -
clickervolt/trunk/admin/js/affiliate-networks.js
r2133010 r2146384 82 82 AffiliateNetworkHelper.registerNetwork(new AffiliateNetwork("Dr.Cash", "sub1", "{sub1}", "{status}-{uuid}", "{payment}")); 83 83 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}")); 85 85 AffiliateNetworkHelper.registerNetwork(new AffiliateNetwork("ExpertMobi", "subid1", "{{subid1}}", "{{action_id}}", "{{goal_value}}")); 86 86 AffiliateNetworkHelper.registerNetwork(new AffiliateNetwork("Generic - CAKE", "s2", "#s2#", "#tid#", "#price#")); … … 100 100 AffiliateNetworkHelper.registerNetwork(new AffiliateNetwork("MobVista", "aff_sub", "{aff_sub}", "{transaction_id}", "{payout}")); 101 101 AffiliateNetworkHelper.registerNetwork(new AffiliateNetwork("Shareasale", "afftrack", null, null, null)); 102 AffiliateNetworkHelper.registerNetwork(new AffiliateNetwork("SpicyOffers", "clickid", "[spicy_clickid]", "[spicy_transacid]", "[spicy_payout_dot]")); 102 103 AffiliateNetworkHelper.registerNetwork(new AffiliateNetwork("Tapgerine", "aff_sub", "{aff_sub}", "{transaction_id}", "{payout}")); 103 104 AffiliateNetworkHelper.registerNetwork(new AffiliateNetwork("ToroAdvertising", "aff_sub", "{aff_sub}", "{transaction_id}", "{payout:dot_separated}")); -
clickervolt/trunk/admin/reporting/handlers/handlerWholePath.php
r2101794 r2146384 11 11 class HandlerWholePath extends HandlerBase 12 12 { 13 14 13 const FUNNEL_LINK_PREFIX = '#funnel#'; 15 14 … … 20 19 protected function getTableNames($request) 21 20 { 22 23 21 $tables = []; 24 22 … … 34 32 protected function addPathsTables($request, $mainTableName, $existingTables) 35 33 { 36 37 34 if ($request->isSegmentPresent(Segment::TYPE_FUNNEL_LINK)) { 38 35 … … 53 50 function getRows($request, $options = []) 54 51 { 55 56 52 $rows = parent::getRows($request, array_merge($options, [ 57 53 'formatValues' => false, … … 217 213 protected function getMapper($request) 218 214 { 219 220 215 $hasFunnelLink = $request->isSegmentPresent(Segment::TYPE_FUNNEL_LINK); 221 216 -
clickervolt/trunk/admin/views/dashboard.php
r2133590 r2146384 364 364 var $select = jQuery('#link-filter'); 365 365 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 369 366 $select.find('option').each(function() { 370 367 var $option = jQuery(this); … … 373 370 } 374 371 }); 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>`); 375 375 376 376 ClickerVoltFunctions.ajax('wp_ajax_clickervolt_get_all_slugs', null, { -
clickervolt/trunk/admin/views/newLink.php
r2134846 r2146384 422 422 423 423 <div id="aida-script"> 424 <textarea readonly rows=" 4" width="100%"></textarea>424 <textarea readonly rows="7" width="100%"></textarea> 425 425 <a class="button aida-script-copy"><i class="material-icons for-button copy"></i>Copy</a> 426 426 </div> … … 616 616 617 617 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 }); 619 623 620 624 ClickerVoltFunctions.initTabs('#tabs-for-link-edit'); … … 889 893 890 894 ClickerVoltFunctions.ajax('wp_ajax_clickervolt_get_all_slugs', null, { 891 892 895 success: function(slugInfos) { 893 894 896 ClickerVoltLinkController.refreshSlugs(jQuery('#select-slug-copy-from'), slugInfos, '') 895 897 ClickerVoltLinkController.refreshSlugs(jQuery('#select-slug-edit-existing'), slugInfos, '') … … 2102 2104 ClickerVoltLinkController._trackingURLHtml.refreshTrackingURL(); 2103 2105 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 } 2106 2110 2107 2111 ClickerVoltLinkController.refreshConversionPixels(); -
clickervolt/trunk/clickervolt.php
r2134846 r2146384 5 5 * Plugin URI: https://clickervolt.com/ 6 6 * Description: Advanced click tracking, link cloaking and affiliate campaigns management made easy. 7 * Version: 1.1 277 * Version: 1.130 8 8 * Author: ClickerVolt.com 9 9 * License: GPLv3 … … 94 94 add_action('wp_ajax_clickervolt_delete_link_by_slug', ['ClickerVolt\\AjaxLinks', 'deleteLinkBySlugAjax']); 95 95 add_action('wp_ajax_clickervolt_get_all_slugs', ['ClickerVolt\\AjaxLinks', 'getAllSlugsAjax']); 96 add_action('wp_ajax_clickervolt_get_aida_script_template', ['ClickerVolt\\AjaxLinks', 'getAIDAScriptTemplateAjax']); 96 97 add_action('wp_ajax_clickervolt_save_source_template', ['ClickerVolt\\AjaxSources', 'saveSourceAjax']); 97 98 add_action('wp_ajax_clickervolt_get_sources', ['ClickerVolt\\AjaxSources', 'getAllSourcesAjax']); -
clickervolt/trunk/db/db.php
r2134846 r2146384 11 11 class DB 12 12 { 13 const VERSION = 1.1 27;13 const VERSION = 1.130; 14 14 15 15 const OPTION_VERSION = 'clickervolt-version'; -
clickervolt/trunk/db/objects/parallelId.php
r2110518 r2146384 44 44 if ($other['clickId'] != $params['clickId']) { 45 45 require_once __DIR__ . '/../tableClicks.php'; 46 $overwrittenVars = 0; 46 47 foreach (Click::$colVars as $varName) { 47 $overwrittenVars = 0;48 48 if (empty($params['clickData'][$varName]) && !empty($other['clickData'][$varName])) { 49 49 $params['clickData'][$varName] = $other['clickData'][$varName]; … … 51 51 } 52 52 } 53 if ($overwrittenVars ==0) {53 if ($overwrittenVars > 0) { 54 54 $params['clickId'] = $other['clickId']; 55 55 } -
clickervolt/trunk/db/objects/sourceTemplateModels.php
r2134846 r2146384 161 161 162 162 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", 166 168 ], null, null)); 167 169 -
clickervolt/trunk/readme.txt
r2134846 r2146384 263 263 264 264 == 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 265 271 = 1.127 = 266 272 * Fixed issue with old links not loading in some cases -
clickervolt/trunk/redirect/jsTracking/js/cvTrack.js
r2133590 r2146384 25 25 referrer: CVTrack.getReferrer(), 26 26 }; 27 28 window.addEventListener("beforeunload", function () {29 // We force that the page must be seen at least 3 seconds to30 // 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 });36 27 } 37 28 -
clickervolt/trunk/redirect/jsTracking/js/remoteTracking.js
r2133010 r2146384 1 cvTimeStart = Date.now() / 1000; 2 window.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 }); 1 10 2 11 var s = document.createElement('script'); -
clickervolt/trunk/redirect/jsTracking/jsTracking.php
r2133010 r2146384 23 23 $pluginDomain = URLTools::getHost($pluginURL); 24 24 $pluginPath = URLTools::getPath($pluginURL); 25 $serverURL = "//#TOKEN_CVTRACK_JS_DOMAIN#{$pluginPath}/redirect/jsTracking/remoteTracking.php"; 25 26 26 27 $tmpSlug = '#SLUGGISH_SLUG#'; … … 31 32 $tokens = [ 32 33 '#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, 34 35 '#TOKEN_RECAPTCHA_V3_SITE_KEY#' => CVSettings::get(CVSettings::RECAPTCHA3_SITE_KEY), 35 36 '#TOKEN_RECAPTCHA_V3_HIDE_BADGE#' => CVSettings::get(CVSettings::RECAPTCHA3_HIDE_BADGE), … … 43 44 $js = self::minimizeContent($js); 44 45 } 45 46 $js = str_replace("'", '"', $js);47 46 48 47 if (false === file_put_contents($path, $js)) { … … 66 65 '#TOKEN_CVTRACK_JS_DOMAIN#' => $domain, 67 66 ]; 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>"); 69 74 } 70 75 -
clickervolt/trunk/redirect/jsTracking/remoteTracking.php
r2133010 r2146384 17 17 require_once __DIR__ . '/../../utils/dataProxy.php'; 18 18 require_once __DIR__ . '/../../utils/urlTools.php'; 19 require_once __DIR__ . '/../../utils/logger.php'; 19 20 20 21 … … 35 36 case 'trackIfHuman': 36 37 trackIfHuman(); 38 break; 39 40 case 'bt': 41 flagVisitAsBot(); 37 42 break; 38 43 } … … 344 349 $humanResponse(); 345 350 } 351 352 /** 353 * 354 */ 355 function 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 57 57 58 58 $script = JSTracking::getRemoteTrackingScript($slug, ['cloaked' => true, 'minimize' => true]); 59 $script = "<script>{$script}</script>";60 59 } 61 60
Note: See TracChangeset
for help on using the changeset viewer.