diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2011-04-15 09:10:22 +0400 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2011-04-15 09:10:22 +0400 |
commit | d4915d8f297cb5e8db71567a3b0d77658bd405d1 (patch) | |
tree | 1f1e07876d5d99b3dc1b999b92168fe3ae509044 /plugins/Live/templates | |
parent | 7f98a78eb16d658c289aead654bc4a1b0741f96e (diff) |
Now showing campaign keyword as well as campaign name in the visitor log & live widget
Also fixing yet another Live refresh issue, I think this time it's working 100%!!!
git-svn-id: http://dev.piwik.org/svn/trunk@4467 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/Live/templates')
-rw-r--r-- | plugins/Live/templates/index.tpl | 2 | ||||
-rw-r--r-- | plugins/Live/templates/lastVisits.tpl | 4 | ||||
-rw-r--r-- | plugins/Live/templates/scripts/live.js | 18 | ||||
-rw-r--r-- | plugins/Live/templates/visitorLog.tpl | 7 |
4 files changed, 17 insertions, 14 deletions
diff --git a/plugins/Live/templates/index.tpl b/plugins/Live/templates/index.tpl index 10f621a38d..cfce41b5f2 100644 --- a/plugins/Live/templates/index.tpl +++ b/plugins/Live/templates/index.tpl @@ -16,7 +16,7 @@ function initSpy() isDupe: check_for_dupe, timeout: 5000, customParameterName: 'minTimestamp', - customParameterValueCallback: lastMinTimestamp, + customParameterValueCallback: lastMaxTimestamp, fadeInSpeed: 600, appendTo: 'div#content' }); diff --git a/plugins/Live/templates/lastVisits.tpl b/plugins/Live/templates/lastVisits.tpl index 311825c971..c0d0fab5fb 100644 --- a/plugins/Live/templates/lastVisits.tpl +++ b/plugins/Live/templates/lastVisits.tpl @@ -18,8 +18,8 @@ </div> <!--<div class="settings"></div>--> <div class="referer"> - {if $visitor.referrerType != 'direct'}from <a href="{$visitor.referrerUrl|escape:'html'}" target="_blank">{if !empty($visitor.searchEngineIcon)}<img src="{$visitor.searchEngineIcon}" /> {/if}{$visitor.referrerName|escape:'html'}</a> - {if !empty($visitor.referrerKeyword)}"{$visitor.referrerKeyword|escape:'html'}"{/if} + {if $visitor.referrerType != 'direct'}from {if !empty($visitor.referrerUrl)}<a href="{$visitor.referrerUrl|escape:'html'}" target="_blank">{/if}{if !empty($visitor.searchEngineIcon)}<img src="{$visitor.searchEngineIcon}" /> {/if}{$visitor.referrerName|escape:'html'}{if !empty($visitor.referrerUrl)}</a>{/if} + {if !empty($visitor.referrerKeyword)} - "{$visitor.referrerKeyword|escape:'html'}"{/if} {capture assign='keyword'}{$visitor.referrerKeyword|escape:'html'}{/capture} {capture assign='searchName'}{$visitor.referrerName|escape:"html"}{/capture} {capture assign='position'}#{$visitor.referrerKeywordPosition}{/capture} diff --git a/plugins/Live/templates/scripts/live.js b/plugins/Live/templates/scripts/live.js index f199a87057..a5d292d1e9 100644 --- a/plugins/Live/templates/scripts/live.js +++ b/plugins/Live/templates/scripts/live.js @@ -20,16 +20,20 @@ function check_for_dupe(prev, last) // Pass the most recent timestamp known to the API -var liveMinTimestamp = 0; -function lastMinTimestamp() +var maxTimestamp = 0; +function lastMaxTimestamp() { - minTimestamp = $('#visitsLive > div:lt(1) .serverTimestamp').html(); - if(!isNaN(minTimestamp) - && parseInt(minTimestamp)==minTimestamp) + $('#visitsLive .serverTimestamp').each( function() { + var ts = $(this).text(); + if( ts > maxTimestamp || maxTimestamp == 0) { + maxTimestamp = ts; + } + }); + if(!isNaN(maxTimestamp) + && parseInt(maxTimestamp)==maxTimestamp) { updateTotalVisits(); - liveMinTimestamp = minTimestamp; - return liveMinTimestamp; + return maxTimestamp; } return false; } diff --git a/plugins/Live/templates/visitorLog.tpl b/plugins/Live/templates/visitorLog.tpl index 31dd75e2cb..d07fa15c48 100644 --- a/plugins/Live/templates/visitorLog.tpl +++ b/plugins/Live/templates/visitorLog.tpl @@ -90,11 +90,10 @@ </a> {/if} {if $visitor.columns.referrerType == 'campaign'} - {'Referers_Campaigns'|translate} + {'Referers_ColumnCampaign'|translate} <br /> - <a href="{$visitor.columns.referrerUrl|escape:'html'}" target="_blank" title="{$visitor.columns.referrerUrl|escape:'html'}" style="text-decoration:underline;"> - {$visitor.columns.referrerName|escape:'html'} - </a> + {$visitor.columns.referrerName|escape:'html'} + {if !empty($visitor.columns.referrerKeyword)} - {$visitor.columns.referrerKeyword|escape:'html'}{/if} {/if} {if $visitor.columns.referrerType == 'search'} {if !empty($visitor.columns.searchEngineIcon)} |