{"id":27777,"library":"ga-attribution-scrape","title":"GA Attribution Scrape","description":"Scrapes attribution data from Google Analytics Model Comparison Tool via JS network requests and sends to BigQuery. Currently v0.2.1, pre-1.0 with sporadic releases. Works only on GA Goals (not ecommerce) and loops through each goal individually.","status":"active","version":"0.2.1","language":"python","source_language":"en","source_url":"https://github.com/lewisaustinbryan/ga-attribution-scrape","tags":["google-analytics","attribution","scraping","bigquery"],"install":[{"cmd":"pip install ga-attribution-scrape","lang":"bash","label":"Default"}],"dependencies":[],"imports":[{"note":"Top-level import is correct; submodule path not exposed.","wrong":"from ga_attribution_scrape.scraper import ScrapeAttribution","symbol":"ScrapeAttribution","correct":"from ga_attribution_scrape import ScrapeAttribution"}],"quickstart":{"code":"from ga_attribution_scrape import ScrapeAttribution\n\nscraper = ScrapeAttribution(\n    property_id='123456789',\n    goal_id='90',\n    lookback_days=30,\n    sample_size=10000,\n    credentials_path='path/to/service-account-key.json'\n)\nresults = scraper.scrape()\nprint(results.head())","lang":"python","description":"Basic usage: initialize with property ID, goal ID, and credentials, then scrape."},"warnings":[{"fix":"Ensure you're using GA Goal IDs, not ecommerce conversion IDs.","message":"Works only on GA Goals, not ecommerce conversions. Does not aggregate goals; loops through each goal individually.","severity":"gotcha","affected_versions":"all"},{"fix":"Check that the service account has roles/bigquery.dataEditor on the dataset.","message":"Requires a valid Google Cloud service account key with BigQuery write permissions. The library will fail silently if permissions are missing.","severity":"gotcha","affected_versions":"all"},{"fix":"Keep browser drivers updated. Consider pinning browser version in Docker.","message":"The library relies on headless browser automation (likely Selenium) and may break with browser updates.","severity":"breaking","affected_versions":"<=0.2.1"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run `pip install ga-attribution-scrape` then import using underscores: `from ga_attribution_scrape import ScrapeAttribution`.","cause":"The package is installed under hyphenated name but import uses underscores.","error":"ModuleNotFoundError: No module named 'ga_attribution_scrape'"},{"fix":"Update to latest version: `pip install --upgrade ga-attribution-scrape`","cause":"Older versions (pre-0.2.0) did not accept sample_size parameter.","error":"TypeError: __init__() got an unexpected keyword argument 'sample_size'"},{"fix":"Pass valid `credentials_path` to ScrapeAttribution or set GOOGLE_APPLICATION_CREDENTIALS environment variable.","cause":"Credentials path not provided or invalid.","error":"google.auth.exceptions.DefaultCredentialsError: Could not automatically determine credentials."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}