theiconic / php-ga-measurement-protocol

Send data to Google Analytics from the server using PHP. Implements GA measurement protocol.
MIT License
655 stars 135 forks source link

Google Optimize #61

Open gety9 opened 6 years ago

gety9 commented 6 years ago

Guys hi,

Can php-ga-measurement-protocol be used to pass data to Google Optimize?

Basically it's need to pass following details:

  // 2. Create a tracker.
  ga('create', 'UA-XXXXX-Y', 'auto');
  // 3. Set the experiment ID and variation ID.
  ga('set', 'exp', '$experimentId.$variationId');
  // 4. Send a pageview hit to Google Analytics.
  ga('send', 'pageview');

https://developers.google.com/optimize/devguides/experiments

Seems like it's should be possible, but I don't see Google Optimize in parameters categories mentioned in Description.