1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81:
<?php
namespace Apptus\ESales\Connector\Report;
/**
* Sub class for AdConversionReport.
*
* Contains information about an ad together with average conversion rate for the campaign that this ad is part of and timelines for:
* <ul>
* <li>Conversion rate for visits that has seen this ad.</li>
* <li>Conversion rate for visits that has not seen this ad.</li>
* <li>Conversion rate for the campaign that this ad is part of.</li>
* </ul>
*/
class AdConversionReportSection {
private $ad;
private $crWithAd;
private $crWithoutAd;
private $crCampaign;
private $avgCrCampaign;
/**
* @param Ad
* Information about this ad. Can not be null.
* @param Rate|null
* Average conversion rate for the campaign that this ad is part of. Use Rate::NaN() if the average conversion rate can not be calculated.
* @param Timeline
* Conversion rate for visits that has seen this ad. Can not be null.
* @param Timeline
* Conversion rate for visits that has not seen this ad. Can not be null.
* @param Timeline
* Conversion rate for the campaign that this ad is part of. Can not be null.
*/
public function __construct(Ad $ad, Rate $avgCrCampaign, Timeline $crWithAd, Timeline $crWithoutAd, Timeline $crCampaign) {
$this->ad = $ad;
$this->avgCrCampaign = $avgCrCampaign;
$this->crWithAd = $crWithAd;
$this->crWithoutAd = $crWithoutAd;
$this->crCampaign = $crCampaign;
}
/**
* @return Ad
* The ad information.
*/
public function ad() {
return $this->ad;
}
/**
* @return Rate
* The average conversion rate for the campaign that this ad is part of. Returns a Rate with NaN as value if average conversion rate could not be calculated.
*/
public function averageCampaignConversionRate() {
return $this->avgCrCampaign;
}
/**
* @return Timeline
* A timeline of conversion rate for visits that has seen this ad.
*/
public function conversionRateWithAd() {
return $this->crWithAd;
}
/**
* @return Timeline
* A timeline of conversion rate for visits that has not seen this ad.
*/
public function conversionRateWithoutAd() {
return $this->crWithoutAd;
}
/**
* @return Timeline
* A timeline of conversion rate for visits that has seen the campaign that this ad is part of.
*/
public function conversionRateForCampaign() {
return $this->crCampaign;
}
}