$conversionTracker->markupLanguage = 'HTML'; $conversionTracker->textFormat = 'HIDDEN'; $conversionTracker->conversionPageLanguage = 'en'; $conversionTracker->backgroundColor = '#0000FF'; // Create operation. $operation = new ConversionTrackerOperation(); $operation->operand = $conversionTracker; $operation->operator = 'ADD'; $operations = array($operation); // Make the mutate request. $result = $conversionTrackerService->mutate($operations); // Display result. $conversionTracker = $result->value[0]; printf("Conversion type with name '%s' and ID '%.0f' was added.\n", $conversionTracker->name, $conversionTracker->id); printf("Tag code:\n%s\n", $conversionTracker->snippet); } // Don't run the example if the file is being included. if (__FILE__ != realpath($_SERVER['PHP_SELF'])) { return; } try { // Get AdWordsUser from credentials in "../auth.ini" // relative to the AdWordsUser.php file's directory. $user = new AdWordsUser(); // Log every SOAP XML request and response. $user->LogAll(); // Run the example. AddConversionTrackerExample($user); } catch (Exception $e) { printf("An error has occurred: %s\n", $e->getMessage()); }
/** * Tests AddConversionTrackerExample. */ public function testAddConversionTrackerExample() { AddConversionTrackerExample($this->user); }