Skip to content

Commit

Permalink
Fixing more tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
diosmosis committed Nov 27, 2014
1 parent 18e0043 commit 36c7c60
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 33 deletions.
2 changes: 1 addition & 1 deletion core/API/DataTablePostProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public function removeTemporaryMetrics(DataTableInterface $dataTable)

$report = $this->report;
$dataTable->filter(function (DataTable $table) use ($report, $allColumns) {
$processedMetrics = Report::getProcessedMetricsForTable($table, $this->report);
$processedMetrics = Report::getProcessedMetricsForTable($table, $report);

$allTemporaryMetrics = array();
foreach ($processedMetrics as $metric) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,46 @@
<dimension>Website</dimension>
<metrics>
<nb_visits>Visits</nb_visits>
<visits_evolution>Visits Evolution</visits_evolution>
<nb_actions>Actions</nb_actions>
<actions_evolution>Actions Evolution</actions_evolution>
<nb_pageviews>Pageviews</nb_pageviews>
<pageviews_evolution>Pageviews Evolution</pageviews_evolution>
<revenue>Revenue</revenue>
<revenue_evolution>Revenue Evolution</revenue_evolution>
<nb_conversions>Conversions</nb_conversions>
<nb_conversions_evolution>Conversions Evolution</nb_conversions_evolution>
<orders>Ecommerce Orders</orders>
<orders_evolution>Ecommerce Orders Evolution</orders_evolution>
<ecommerce_revenue>Product Revenue</ecommerce_revenue>
<ecommerce_revenue_evolution>Product Revenue Evolution</ecommerce_revenue_evolution>
</metrics>
<metricsDocumentation>
<nb_visits>If a visitor comes to your website for the first time or if he visits a page more than 30 minutes after his last page view, this will be recorded as a new visit.</nb_visits>
<nb_actions>The number of actions performed by your visitors. Actions can be page views, internal site searches, downloads or outlinks.</nb_actions>
<nb_pageviews>The number of times this page was visited.</nb_pageviews>
</metricsDocumentation>
<processedMetrics>
<visits_evolution>Visits Evolution</visits_evolution>
<actions_evolution>Actions Evolution</actions_evolution>
<pageviews_evolution>Pageviews Evolution</pageviews_evolution>
<revenue_evolution>Revenue Evolution</revenue_evolution>
<nb_conversions_evolution>Conversions Evolution</nb_conversions_evolution>
<orders_evolution>Ecommerce Orders Evolution</orders_evolution>
<ecommerce_revenue_evolution>Product Revenue Evolution</ecommerce_revenue_evolution>
</processedMetrics>
<imageGraphUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=MultiSites&amp;apiAction=getAll&amp;period=range&amp;date=2010-01-03,2010-01-09</imageGraphUrl>
<imageGraphEvolutionUrl>index.php?module=API&amp;method=ImageGraph.get&amp;idSite=1&amp;apiModule=MultiSites&amp;apiAction=getAll&amp;period=day&amp;date=2010-01-03,2010-01-09</imageGraphEvolutionUrl>
<uniqueId>MultiSites_getAll</uniqueId>
</metadata>
<columns>
<label>Website</label>
<nb_visits>Visits</nb_visits>
<visits_evolution>Visits Evolution</visits_evolution>
<nb_actions>Actions</nb_actions>
<actions_evolution>Actions Evolution</actions_evolution>
<nb_pageviews>Pageviews</nb_pageviews>
<pageviews_evolution>Pageviews Evolution</pageviews_evolution>
<revenue>Revenue</revenue>
<revenue_evolution>Revenue Evolution</revenue_evolution>
<nb_conversions>Conversions</nb_conversions>
<nb_conversions_evolution>Conversions Evolution</nb_conversions_evolution>
<orders>Ecommerce Orders</orders>
<orders_evolution>Ecommerce Orders Evolution</orders_evolution>
<ecommerce_revenue>Product Revenue</ecommerce_revenue>
<visits_evolution>Visits Evolution</visits_evolution>
<actions_evolution>Actions Evolution</actions_evolution>
<pageviews_evolution>Pageviews Evolution</pageviews_evolution>
<revenue_evolution>Revenue Evolution</revenue_evolution>
<nb_conversions_evolution>Conversions Evolution</nb_conversions_evolution>
<orders_evolution>Ecommerce Orders Evolution</orders_evolution>
<ecommerce_revenue_evolution>Product Revenue Evolution</ecommerce_revenue_evolution>
</columns>
<reportData>
Expand All @@ -63,10 +65,10 @@
<pageviews_evolution>100%</pageviews_evolution>
<revenue_evolution>100%</revenue_evolution>
<nb_conversions>0</nb_conversions>
<nb_conversions_evolution>0</nb_conversions_evolution>
<orders>0</orders>
<orders_evolution>0</orders_evolution>
<ecommerce_revenue>$ 0</ecommerce_revenue>
<nb_conversions_evolution>0</nb_conversions_evolution>
<orders_evolution>0</orders_evolution>
<ecommerce_revenue_evolution>0</ecommerce_revenue_evolution>
</row>
</result>
Expand All @@ -82,10 +84,10 @@
<pageviews_evolution>-50%</pageviews_evolution>
<revenue_evolution>-100%</revenue_evolution>
<nb_conversions>0</nb_conversions>
<nb_conversions_evolution>0</nb_conversions_evolution>
<orders>0</orders>
<orders_evolution>0</orders_evolution>
<ecommerce_revenue>$ 0</ecommerce_revenue>
<nb_conversions_evolution>0</nb_conversions_evolution>
<orders_evolution>0</orders_evolution>
<ecommerce_revenue_evolution>0</ecommerce_revenue_evolution>
</row>
<row>
Expand All @@ -99,10 +101,10 @@
<pageviews_evolution>100%</pageviews_evolution>
<revenue_evolution>0%</revenue_evolution>
<nb_conversions>0</nb_conversions>
<nb_conversions_evolution>0</nb_conversions_evolution>
<orders>0</orders>
<orders_evolution>0</orders_evolution>
<ecommerce_revenue>$ 0</ecommerce_revenue>
<nb_conversions_evolution>0</nb_conversions_evolution>
<orders_evolution>0</orders_evolution>
<ecommerce_revenue_evolution>0</ecommerce_revenue_evolution>
</row>
</result>
Expand All @@ -118,10 +120,10 @@
<pageviews_evolution>400%</pageviews_evolution>
<revenue_evolution>100%</revenue_evolution>
<nb_conversions>0</nb_conversions>
<nb_conversions_evolution>0</nb_conversions_evolution>
<orders>0</orders>
<orders_evolution>0</orders_evolution>
<ecommerce_revenue>$ 0</ecommerce_revenue>
<nb_conversions_evolution>0</nb_conversions_evolution>
<orders_evolution>0</orders_evolution>
<ecommerce_revenue_evolution>0</ecommerce_revenue_evolution>
</row>
</result>
Expand All @@ -137,10 +139,10 @@
<pageviews_evolution>0%</pageviews_evolution>
<revenue_evolution>0%</revenue_evolution>
<nb_conversions>0</nb_conversions>
<nb_conversions_evolution>0</nb_conversions_evolution>
<orders>0</orders>
<orders_evolution>0</orders_evolution>
<ecommerce_revenue>$ 0</ecommerce_revenue>
<nb_conversions_evolution>0</nb_conversions_evolution>
<orders_evolution>0</orders_evolution>
<ecommerce_revenue_evolution>0</ecommerce_revenue_evolution>
</row>
</result>
Expand All @@ -156,10 +158,10 @@
<pageviews_evolution>0%</pageviews_evolution>
<revenue_evolution>0%</revenue_evolution>
<nb_conversions>0</nb_conversions>
<nb_conversions_evolution>0</nb_conversions_evolution>
<orders>0</orders>
<orders_evolution>0</orders_evolution>
<ecommerce_revenue>$ 0</ecommerce_revenue>
<nb_conversions_evolution>0</nb_conversions_evolution>
<orders_evolution>0</orders_evolution>
<ecommerce_revenue_evolution>0</ecommerce_revenue_evolution>
</row>
</result>
Expand All @@ -175,10 +177,10 @@
<pageviews_evolution>0%</pageviews_evolution>
<revenue_evolution>0%</revenue_evolution>
<nb_conversions>0</nb_conversions>
<nb_conversions_evolution>0</nb_conversions_evolution>
<orders>0</orders>
<orders_evolution>0</orders_evolution>
<ecommerce_revenue>$ 0</ecommerce_revenue>
<nb_conversions_evolution>0</nb_conversions_evolution>
<orders_evolution>0</orders_evolution>
<ecommerce_revenue_evolution>0</ecommerce_revenue_evolution>
</row>
</result>
Expand All @@ -194,10 +196,10 @@
<pageviews_evolution>0%</pageviews_evolution>
<revenue_evolution>0%</revenue_evolution>
<nb_conversions>0</nb_conversions>
<nb_conversions_evolution>0</nb_conversions_evolution>
<orders>0</orders>
<orders_evolution>0</orders_evolution>
<ecommerce_revenue>$ 0</ecommerce_revenue>
<nb_conversions_evolution>0</nb_conversions_evolution>
<orders_evolution>0</orders_evolution>
<ecommerce_revenue_evolution>0</ecommerce_revenue_evolution>
</row>
</result>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
All Websites dashboard
label,nb_visits,nb_actions,nb_pageviews,revenue,nb_conversions,visits_evolution,actions_evolution,pageviews_evolution,revenue_evolution,nb_conversions_evolution,orders,orders_evolution,ecommerce_revenue,ecommerce_revenue_evolution
Site 1,10,43,43,$ 0,0,100%,100%,100%,0%,0%,0,0,$ 0,0
Site 2,1,3,3,$ 0,0,100%,100%,100%,0%,0%,0,0,$ 0,0
label,nb_visits,nb_actions,nb_pageviews,revenue,nb_conversions,visits_evolution,actions_evolution,pageviews_evolution,revenue_evolution,nb_conversions_evolution,orders,ecommerce_revenue,orders_evolution,ecommerce_revenue_evolution
Site 1,10,43,43,$ 0,0,100%,100%,100%,0%,0%,0,$ 0,0,0
Site 2,1,3,3,$ 0,0,100%,100%,100%,0%,0%,0,$ 0,0,0

Visits Summary
nb_uniq_visitors,nb_users,nb_visits,nb_actions,max_actions,nb_actions_per_visit,avg_time_on_site,bounce_rate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<nb_users>0</nb_users>
<nb_visits>1</nb_visits>
<nb_actions>4</nb_actions>
<nb_visits_converted>0</nb_visits_converted>
<bounce_count>0</bounce_count>
<sum_visit_length>1</sum_visit_length>
<max_actions>4</max_actions>
<bounce_rate>0%</bounce_rate>
<nb_actions_per_visit>4</nb_actions_per_visit>
Expand All @@ -16,6 +19,9 @@
<nb_users>0</nb_users>
<nb_visits>1</nb_visits>
<nb_actions>6</nb_actions>
<nb_visits_converted>0</nb_visits_converted>
<bounce_count>0</bounce_count>
<sum_visit_length>1</sum_visit_length>
<max_actions>6</max_actions>
<bounce_rate>0%</bounce_rate>
<nb_actions_per_visit>6</nb_actions_per_visit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<nb_users>0</nb_users>
<nb_visits>1</nb_visits>
<nb_actions>5</nb_actions>
<nb_visits_converted>0</nb_visits_converted>
<bounce_count>0</bounce_count>
<sum_visit_length>361</sum_visit_length>
<max_actions>5</max_actions>
<bounce_rate>0%</bounce_rate>
<nb_actions_per_visit>5</nb_actions_per_visit>
Expand All @@ -17,6 +20,9 @@
<nb_users>0</nb_users>
<nb_visits>1</nb_visits>
<nb_actions>6</nb_actions>
<nb_visits_converted>0</nb_visits_converted>
<bounce_count>0</bounce_count>
<sum_visit_length>1</sum_visit_length>
<max_actions>6</max_actions>
<bounce_rate>0%</bounce_rate>
<nb_actions_per_visit>6</nb_actions_per_visit>
Expand Down

0 comments on commit 36c7c60

Please sign in to comment.