Skip to content

Commit 7a7b949

Browse files
committed
Migrate to Adwords API version v201809. Update googleads module to 15.0.2. Default file version set to v4
1 parent 2b91443 commit 7a7b949

File tree

5 files changed

+19
-10
lines changed

5 files changed

+19
-10
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 2.1.0
4+
*2019-01-23*
5+
6+
- Migrate into Adwords API version v201809
7+
- Update googleads-python-lib to 15.0.2
8+
39
## 2.0.0
410
*2018-08-19*
511

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Google Ads Performance Downloader
22

3-
A Python script for downloading performance data and account structure from an [MCC account](https://ads.google.com/home/tools/manager-accounts/) using the Google Adwords API ([v201806](https://developers.google.com/adwords/api/docs/reference/release-notes/v201806)) to local files.
3+
A Python script for downloading performance data and account structure from an [MCC account](https://ads.google.com/home/tools/manager-accounts/) using the Google Adwords API ([v201809](https://developers.google.com/adwords/api/docs/reference/release-notes/v201809)) to local files.
44

55
The [mara Google ads performance pipeline](https://github.com/mara/google-ads-performance-pipeline) can be, then, used for loading and transforming the downloaded data into a dimensional schema.
66

@@ -9,8 +9,8 @@ By default, it creates two data sets:
99

1010
1. **Ad Performance** consists of measures such as impressions, clicks, conversions and cost. The script creates one file per day in a specified time range:
1111

12-
data/2015/03/31/google-ads/ad-performance-v3.json.gz
13-
data/2015/04/01/google-ads/ad-performance-v3.json.gz
12+
data/2015/03/31/google-ads/ad-performance-v4.json.gz
13+
data/2015/04/01/google-ads/ad-performance-v4.json.gz
1414

1515
For the last 30 days, the script always re-downloads the files as data still changes (e.g cost or attributed conversions). Beyond that, files are only downloaded when they do not yet exist.
1616
**Note**: If you are using an attribution window larger than 30 days adjust the `redownload_window` config accordingly.
@@ -39,7 +39,7 @@ By default, it creates two data sets:
3939

4040
2. **Account Structure** information. This file is always overwritten by the script:
4141

42-
data/google-ads-account-structure-v3.csv.gz
42+
data/google-ads-account-structure-v4.csv.gz
4343

4444
Each line contains one ad together with its ad group, campaign and account:
4545

@@ -75,7 +75,7 @@ Optionally, you can apply labels on all hierarchy levels for segmenting the acco
7575
The Google Ads Performance Downloader requires:
7676

7777
Python (>= 3.6)
78-
googleads (==10.0.0)
78+
googleads (==15.0.2)
7979
click (>=6.0)
8080

8181
The easiest way to install google-ads-downloader is using pip
@@ -165,7 +165,7 @@ All options:
165165
data will be redownloaded. Default: "30"
166166
--output_file_version TEXT A suffix that is added to output files,
167167
denoting a version of the data format. Default:
168-
"v3"
168+
"v4"
169169
--max_retries TEXT How often try retry at max in case of 500
170170
errors. Default: "5"
171171
--retry_backoff_factor TEXT How many seconds to wait between retries (is

google_ads_downloader/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def oauth2_refresh_token() -> str:
4141

4242
def api_version() -> str:
4343
"""Which Adwords API version should be called"""
44-
return 'v201802'
44+
return 'v201809'
4545

4646

4747
def redownload_window() -> str:
@@ -51,7 +51,7 @@ def redownload_window() -> str:
5151

5252
def output_file_version() -> str:
5353
"""A suffix that is added to output files, denoting a version of the data format"""
54-
return 'v3'
54+
return 'v4'
5555

5656

5757
def max_retries() -> int:

google_ads_downloader/downloader.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ def download_data():
8686
"""Creates an AdWordsApiClient and downloads the data"""
8787
logger = logging.basicConfig(level=logging.INFO,
8888
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
89+
90+
logging.info('Adwords API version: '+str(config.api_version()))
91+
8992
api_client = AdWordsApiClient()
9093
download_data_sets(api_client)
9194

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
setup(
44
name='google-ads-performance-downloader',
5-
version='2.0.0',
5+
version='2.1.0',
66
description="Downloads data from the Google Adwords Api to local files",
77

88
install_requires=[
9-
'googleads==13.0.0',
9+
'googleads==15.0.2',
1010
'click>=6.0',
1111
'wheel>=0.29'
1212
],

0 commit comments

Comments
 (0)