RequiredError.REQUIRED @ operations[0].operand.conversionGclid when the gclid is present

218 views
Skip to first unread message

Jacob Lambert

unread,
Dec 19, 2014, 11:22:20 AM12/19/14
to adwor...@googlegroups.com
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.

Josh Radcliff (AdWords API Team)

unread,
Dec 19, 2014, 1:43:55 PM12/19/14
to adwor...@googlegroups.com
Hi,

I'm not a PHP expert, but comparing your code to the client library example, I think you've got a case mismatch on the field name. Could you try:

$feed->googleClickId = $row['gclid'];

instead of:

$feed->googleClickID = $row['gclid'];

and let me know if that fixes the issue?

Thanks,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages