Skip to content

Commit

Permalink
always fetch all possible dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Jun 9, 2017
1 parent db295e7 commit a26ec64
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
14 changes: 6 additions & 8 deletions CustomDimensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,16 +304,14 @@ public function addVisitFieldsToPersist(&$fields)
}
}

public function provideActionDimensionFields(&$fields, &$joins, $idSite)
public function provideActionDimensionFields(&$fields, &$joins)
{
$configuration = new Dao\Configuration();
$dimensions = $configuration->getCustomDimensionsHavingScope($idSite, CustomDimensions::SCOPE_ACTION);
$logTable = new Dao\LogTable(CustomDimensions::SCOPE_ACTION);
$indices = $logTable->getInstalledIndexes();

foreach ($dimensions as $dimension) {
if ($dimension['active'] && $dimension['scope'] === CustomDimensions::SCOPE_ACTION) {
$field = Dao\LogTable::buildCustomDimensionColumnName($dimension);
$fields[] = $field;
}
foreach ($indices as $index) {
$field = Dao\LogTable::buildCustomDimensionColumnName($index);
$fields[] = $field;
}
}

Expand Down
8 changes: 8 additions & 0 deletions VisitorDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ public function extendActionDetails(&$action, $nextAction, $visitorDetails)
}
unset($action[$field]);
}

$logTable = new Dao\LogTable(CustomDimensions::SCOPE_ACTION);
$indices = $logTable->getInstalledIndexes();

foreach ($indices as $index) {
$field = Dao\LogTable::buildCustomDimensionColumnName($index);
unset($action[$field]);
}
}

public function renderVisitorDetails($visitorDetails)
Expand Down

0 comments on commit a26ec64

Please sign in to comment.