I'm trying to use the ConversionTrackerService to retrieve all conversions 
tracked in an account. The problem is that - seemingly quite randomly - it 
seems to return only part of the conversions (6 out of 10). Has anyone here 
had similar experiences? Or might this be a bug I should report?

Here is the definition I use to retrieve the conversions

from googleads import adwords

PAGE_SIZE = 100

def get_conversions(client):
    # Use ConversionTrackerService
    conversion_tracker_service = client.GetService(
'ConversionTrackerService', version='v201806') 

    # Construct selector and get all accounts.
    offset = 0;
    selector = {
        'fields': [
            'Name', 
            'Status',
            'Category', 
            'CountingType', 
            'DefaultRevenueValue'
        ],
        'paging': {
            'startIndex': str(offset),
            'numberResults': str(PAGE_SIZE)
        }
    }

    result = []
    more_pages = True
    while more_pages:
        page = conversion_tracker_service.get(selector)
        if 'entries' in page:
            for conversion in page['entries']:
                result.append({
                    "name": conversion['name'], 
                    "status": conversion['status'], 
                    "category": conversion['category'],
                    "countingType": conversion['countingType'], 
                    "defaultRevenueValue": conversion['defaultRevenueValue'
],        
                })
        else:
            print 'No conversions were found.'

    offset += PAGE_SIZE
    selector['paging']['startIndex'] = str(offset)
    more_pages = offset < int(page['totalNumEntries'])

    return result


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
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/6b02e87f-2de0-4905-9bfc-5531443b2da0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • ... Stijn van Lieshout
    • ... 'Dannison Yao (AdWords API Team)' via AdWords API and Google Ads API Forum
      • ... Stijn van Lieshout

Reply via email to