Skip to first unread message

MWA

unread,
Oct 23, 2017, 8:20:57 AM10/23/17
to AdWords API Forum
Hi,

I'm trying to push offline conversion on behalf of my clients.


            $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build();
            
            $session = (new AdWordsSessionBuilder())->fromFile()->withOAuth2Credential($oAuth2Credential)->withClientCustomerId($customerid)->enablePartialFailure()->build();
            
            $adWordsServices=new AdWordsServices();
            $offlineConversionService = $adWordsServices->get($session, OfflineConversionFeedService::class);

            $feed = new OfflineConversionFeed();
            $feed->setConversionName($conversionName);
            $feed->setConversionTime($conversionTime);
            $feed->setConversionValue($conversionValue);
            $feed->setGoogleClickId($gclid);
            $offlineConversionOperation = new OfflineConversionFeedOperation();
            $offlineConversionOperation->setOperator(Operator::ADD);
            $offlineConversionOperation->setOperand($feed);
            $offlineConversionOperations = [$offlineConversionOperation];

            $result = $offlineConversionService->mutate($offlineConversionOperations);



With other clients above code is working perfectly fine, but with some specific clients it doesn't work. The Error is

Google\AdsApi\AdWords\v201708\cm\OfflineConversionFeedReturnValue Object
(
[value:protected] => Array
(
[0] => Google\AdsApi\AdWords\v201708\cm\OfflineConversionFeed Object
(
[googleClickId:protected] => 
[conversionName:protected] => 
[conversionTime:protected] => 
[conversionValue:protected] => 
[conversionCurrencyCode:protected] => 
[externalAttributionCredit:protected] => 
[externalAttributionModel:protected] => 
)

)

[partialFailureErrors:protected] => Array
(
[0] => Google\AdsApi\AdWords\v201708\cm\OfflineConversionError Object
(
[reason:protected] => UNAUTHORIZED_USER
[fieldPath:protected] => operations[0].operand
[fieldPathElements:protected] => Array
(
[0] => Google\AdsApi\AdWords\v201708\cm\FieldPathElement Object
(
[field:protected] => operations
[index:protected] => 0
)

[1] => Google\AdsApi\AdWords\v201708\cm\FieldPathElement Object
(
[field:protected] => operand
[index:protected] => 
)

)

[trigger:protected] => 
[errorString:protected] => OfflineConversionError.UNAUTHORIZED_USER
[ApiErrorType:protected] => OfflineConversionError
[parameterMap:Google\AdsApi\AdWords\v201708\cm\ApiError:private] => Array
(
[ApiError.Type] => ApiErrorType
)

)

)

[ListReturnValueType:protected] => OfflineConversionFeedReturnValue
[parameterMap:Google\AdsApi\AdWords\v201708\cm\ListReturnValue:private] => Array
(
[ListReturnValue.Type] => ListReturnValueType
)

)


I have access these clients in my MCM account. 

Can anyone help with this?

Shwetha Vastrad (AdWords API Team)

unread,
Oct 23, 2017, 10:58:47 AM10/23/17
to AdWords API Forum
Hi, 

This error occurs when the GCLID in the request is not for the account that you're trying to upload conversions for. You can't upload a conversion for a GCLID that was generated from a different account. You need to ensure that your uploaded clicks really belong to the account specified in the clientCustomerId in the request. Could you cross-check the GCLIDs in CLICK_PERFORMANCE_REPORT? The GCLIDs available via CLICK_PERFORMANCE_REPORT should be the valid ones. If you still encounter this issue, please enable logging and send over the SOAP request and response logs so I can take a look. Please use Reply privately to author when responding. 

Regards,
Shwetha, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages