function FBTrackingCode() { $request = $this->request; $order = $request->requestVar("order"); $tracking_code = ''; if (isset($order) && $order == "complete") { //add FB tracking script $page = ConferencePage::get()->byID($this->ID); if ($page && !empty($page->FBPixelId) && !empty($page->FBValue) && !empty($page->FBCurrency)) { $tracking_code = $this->renderWith("ConferencePage_FB", array("FB_Data" => new ArrayData(array("FBPixelId" => $page->FBPixelId, "FBValue" => $page->FBValue, "FBCurrency" => $page->FBCurrency)))); } } return $tracking_code; }
function GATrackingCode() { $request = $this->request; $order = $request->requestVar("order"); $tracking_code = ''; if (isset($order) && $order == "complete") { //add GA tracking script $page = ConferencePage::get()->byID($this->ID); if ($page && !empty($page->GAConversionId) && !empty($page->GAConversionLanguage) && !empty($page->GAConversionFormat) && !empty($page->GAConversionColor) && !empty($page->GAConversionLabel)) { $tracking_code = $this->renderWith("ConferencePage_GA", array("GA_Data" => new ArrayData(array("GAConversionId" => $page->GAConversionId, "GAConversionLanguage" => $page->GAConversionLanguage, "GAConversionFormat" => $page->GAConversionFormat, "GAConversionColor" => $page->GAConversionColor, "GAConversionLabel" => $page->GAConversionLabel, "GAConversionValue" => $page->GAConversionValue, "GARemarketingOnly" => $page->GARemarketingOnly ? "true" : "false")))); } } return $tracking_code; }