Source of file GoogleContentExperiments.php
Size: 1,013 Bytes - Last Modified: 2021-12-24T06:51:15+00:00
/var/www/docs.ssmods.com/process/src/src/Heyday/GoogleContentExperiments/GoogleContentExperiments.php
123456789101112131415161718192021222324252627282930313233343536373839404142 | <?php namespace Heyday\GoogleContentExperiments; use GoogleApi\Contrib\AnalyticsService; class GoogleContentExperiments { private $analytics; private $projectID; private $webPropertyID; private $profileID; public function __construct(AnalyticsService $analytics, $projectID, $webPropertyID, $profileID) { $this->analytics = $analytics; $this->projectID = $projectID; $this->webPropertyID = $webPropertyID; $this->profileID = $profileID; } /** * Creates local experiments which exist within analytics but not here. Updates experiments which already exist * locally but have been changed within analytics. */ public function getExperiments() { $experiments = $this->analytics->management_experiments ->listManagementExperiments( $this->projectID, $this->webPropertyID, $this->profileID ); return $experiments->getItems(); } } |