في الاثنين، 27 ديسمبر، 2021 11:20 م Marcus D'Suza <kaamir6...@gmail.com>
كتب:

> Just to clarify the question, I need clicks, conversions, impressions, id,
> title and ROAS for a single product. So far I am able to get clicks,
> impressions, ctr, id, and titles for individual products. But I am not able
> to get ROAS and conversion.
>
> On Monday, December 27, 2021 at 5:32:47 PM UTC+5 Marcus D'Suza wrote:
>
>> Greetings People!
>>
>> I hope you are having a great time.
>>
>> I was using Google Ads Script (JS) to extract the statistics of the
>> product from the Google Ads account but it seems like there is no direct
>> support for it. Following this conversation on Google Ads Script Group
>> <https://groups.google.com/u/2/g/adwords-scripts/c/ZAVaSez_6FI>, I was
>> directed to this Group.
>>
>> Using *metrics *and *segments *from *MerchantPerformanceView *I am able
>> to extract impressions, clicks, and ctr of products along with ids. But I
>> also need to get the cost and  ROAS for each product based on which I have
>> categorize products using pre-set criteria.
>>
>> Is it possible to do this using Adword API? Also, can I use Adword API
>> inside Google Ads Script that will be hosted on the Google Ads account? In
>> addition to all other queries, can I use Adword API using javascript?
>>
>> I really am stuck with this task and I am not sure whether it is possible
>> or not, please respond.
>>
>> *The code I have written so far. *
>> function productList( ) {
>>   // Merchent Id from Google Merchent Account
>>   var merchantId = "My-Google-Merchent-ID"; // Integer
>>
>>   // Query to retrieve required data - this was the best i could come up
>> with
>>   var query = "SELECT segments.offer_id, metrics.clicks, metrics.ctr,
>> metrics.impressions FROM MerchantPerformanceView WHERE segments.date
>> BETWEEN '2021-01-01' AND '2021-12-24'";
>>   var pageSize = 20;
>>   var pageToken;
>>   var productsDetails = [];
>>
>>   do {
>>     // Get 20 produts per page - for performance measures
>>     var resource = {
>>       "query": query,
>>       "pageSize": pageSize,
>>       "pageToken": pageToken
>>     }
>>
>>     // Get 20 products
>>     var reports = ShoppingContent.Reports.search(resource, merchantId);
>>     // Add them to the array
>>     productsDetails = productsDetails.concat(reports.results);
>>     // Get next page token
>>     pageToken = reports.nextPageToken;
>>
>>   // Repeat above until no more pages are found
>>   } while (pageToken);
>>
>>   // Return array of all products metrics
>>   return productsDetails;
>> }
>>
>>
>> --
> --
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/adwords-api/b1ac8b5c-86c2-4f16-80bc-e9e885e64fc7n%40googlegroups.com
> <https://groups.google.com/d/msgid/adwords-api/b1ac8b5c-86c2-4f16-80bc-e9e885e64fc7n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/CAOmUA%2BSh6MQ7UmdJ%2BXWpJ-mwuiBi5Z3mz-jx84S8%2Bk9QrVCtEg%40mail.gmail.com.
  • Ho... Marcus D'Suza
    • ... Marcus D'Suza
      • ... Mhmoudahmdmohmmd homydt
    • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
      • ... Marcus D'Suza
        • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
          • ... Marcus D'Suza
            • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
              • ... Marcus D'Suza
                • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum

Reply via email to