Hi Folks,

I am completely new to this google adword API, so please be patience with 
me. I am trying  to upload offline adword conversion through adword API and 
I am stuck here, so I hope someone could help me getting over it.

I have the required information like GCLID and other conversion data, what 
I need to do is just upload it to the adword account.

I am doing it on PHP so let me list out what i have done till now.

1. I have downloaded the PHP library using composer 
from https://github.com/googleads/googleads-php-lib 
2. I am 
referring 
https://developers.google.com/adwords/api/docs/guides/conversion-tracking#importing_conversions
 
documentation. Here i found a code snippet that upload offline conversion

$offlineConversionService = $adWordsServices->get($session, 
OfflineConversionFeedService::class);


// Associate offline conversions with the existing named conversion tracker.
// If this tracker was newly created, it may be a few hours before it can
// accept conversions.
$feed = new OfflineConversionFeed();
$feed->setConversionName($conversionName);
$feed->setConversionTime($conversionTime);
$feed->setConversionValue($conversionValue);
$feed->setGoogleClickId($gclid);


// Optional: To upload fractional conversion credits, set the external
// attribution model and credit. To use this feature, your conversion
// tracker should be marked as externally attributed. See
// 
https://developers.google.com/adwords/api/docs/guides/conversion-tracking#importing_externally_attributed_conversions
// to learn more about importing externally attributed conversions.


// $feed->setExternalAttributionModel('Linear');
// $feed->setExternalAttributionCredit(0.3);


$offlineConversionOperation = new OfflineConversionFeedOperation();
$offlineConversionOperation->setOperator(Operator::ADD);
$offlineConversionOperation->setOperand($feed);
$offlineConversionOperations = [$offlineConversionOperation];


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


$feed = $result->getValue()[0];
printf(
    "Uploaded offline conversion value of %d for Google Click ID = '%s' to 
'%s'.\n",
    $feed->getConversionValue(),
    $feed->getGoogleClickId(),
    $feed->getConversionName()
);


*What problem I have now:*

1. I couldn't understand how to use above code snippet.Full implementation.
2. I couldn't find the way of linking this to my adword account. Where 
could i add the credentials that will link the API to my account.

*Can anyone point me to the right direction? Any code snippet, explanation 
or supporting links would be helpful.*

Thanks in advance,
Navin


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/9c263ec7-8c80-4991-9f6c-bb52a7c13b5a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • ... navin bista
    • ... 'Dhanya Sundararaju (AdWords API Team)' via AdWords API and Google Ads API Forum

Reply via email to