I'm trying to test my up-loader written in php for Offline Conversions but I am getting a RequiredError.REQUIRED @ operations[0].operand.conversionGclid error returned for every item (apx 50) in the array. I am able to see that all of the operations I am trying to upload do in fact have the gclid parameter set via this loop:
foreach($operations as $opp){
print "Value of opp->gclid : " . $opp->operand->googleClickID . "\n\n";
}
The gclid's are gathered from our data warehouse, and the operations are generated via this section:
if($queryResult->rowCount() > 0){
print "Query returned " . $queryResult->rowCount() . " rows\n\n";
$operations = array();
while($row = $queryResult->fetch(PDO::FETCH_ASSOC)){
$feed = new OfflineConversionFeed();
$feed->conversionName = $conversionName;
$feed->conversionTime = $row['conversion_datetime'];
$feed->googleClickID = $row['gclid'];
$operations[] = new OfflineConversionFeedOperation($feed, 'ADD');
}
print "Operation Creation Finished \n\n";
foreach($operations as $opp){
print "Value of opp->gclid : " . $opp->operand->googleClickID . "\n\n";
}
//This line throws the errors
$uploadResult = $conversionService->mutate($operations);
printf('Upload for %s : %s complete', $user->GetClientCustomerId() , $conversionName);
return;
}
I asked this question on
StackOverflow but haven't gotten a response yet.