// - https://redmine.cubedesigners.com/issues/5473
const SHOW_VISITORS_CUTOFF = 20687;
+ const TOKENS=[
+ 'stats3.fluidbook.com' => '9df722a0bd30878ddc4d737352427502',
+ 'stats4.fluidbook.com' => '3ffdbe052ae625f065573df9fa9515df',
+ 'stats5.fluidbook.com' => '85e9cc307b6e5083249949e9472a80b8',
+ 'stats6.fluidbook.com' => '16f4c1d77cdc4792b807718388db96a0',
+ ];
+
/**
* @var int
return $this->getMatomoToken(static::getMatomoServer($this->fluidbook->id));
}
- protected function getMatomoTokens()
- {
- // Each stats server has a different instance of Matamo, so we need to provide different API tokens for each
- // Normally this information would be stored in the .env but there's no good way to do that with an array, so
- // it is simpler to keep it here. These are also stored in the shared Bitwarden entry for Matomo.
- return [
- 'stats3.fluidbook.com' => '9df722a0bd30878ddc4d737352427502',
- 'stats4.fluidbook.com' => '3ffdbe052ae625f065573df9fa9515df',
- 'stats5.fluidbook.com' => '85e9cc307b6e5083249949e9472a80b8',
- 'stats6.fluidbook.com' => '16f4c1d77cdc4792b807718388db96a0',
- ];
- }
protected static function getPeriods()
{
protected function getMatomoToken($server): bool|string
{
- $tokens = $this->getMatomoTokens();
- return $tokens[$server] ?? false;
+ return self::TOKENS[$server] ?? false;
}
protected function setDatesAndPeriod($period_override = null)