Having an issue with the Google Analytics taps... ...
# troubleshooting
j
Having an issue with the Google Analytics taps... where the "test" method doesn't seem to work. Also posted to github (didn't realize how active this Slack is!). • https://github.com/MeltanoLabs/tap-google-analytics/issues/144 When I try to run
meltano config tap-ga4 test
, it throws an error: Plugin configuration is invalid 'utf-8' codec can't decode byte 0x92 in position 89: invalid start byte I've tried a lot of stuff: • Followed this: https://hub.meltano.com/extractors/tap-ga4 • Tried it on three machines - running Ubuntu (23.04/Python 3.11), Windows 11 (Python 3.10) and Ubuntu (22.04/Python 3.10). • Tried bringing the actual tap code local, and that works fine with my key file and report.json file. • Issue happens on both the GA3 and GA4 versions of the tap. • Cloned the Github repo and the tap works fine when I run it locally against the tap's venv (i set my settings as default values), so the environment isn't just totally jacked up (probably). • Tried completely remaking my virtual environment (using python venv) and reinstalling meltano • Tried reinstalling the taps -
meltano install --clean
• Tried adding debugging -
$env:MELTANO_CLI_LOG_LEVEL="debug"
and that didn't really help - except to show the error was coming from meltano and not the tap, I guess. •
meltano invoke tap-ga4
works fine. •
meltano run tap-ga4 target-jsonl
works as well. meltano.yml:
Copy code
version: 1
default_environment: dev
project_id: f6626c63-9c25-41af-b1c7-952e44455d33
environments:
- name: dev
- name: staging
- name: prod
plugins:
  extractors:
  - name: tap-github
    variant: meltanolabs
    pip_url: git+<https://github.com/MeltanoLabs/tap-github.git>
    config:
      start_date: '2022-01-01'
      repositories:
      - jeffsdata/py-inspirationals
    select:
    - commits.url
    - commits.sha
    - commits.commit_timestamp
  - name: tap-ga4
    variant: meltanolabs
    pip_url: git+<https://github.com/MeltanoLabs/tap-google-analytics.git>
    config:
      end_date: '2023-07-31'
      start_date: '2023-07-01'
      reports: 'reportga4.json'
  loaders:
  - name: target-jsonl
    variant: andyh1203
    pip_url: target-jsonl
reportga4.json
Copy code
[

    {
        "name": "daily_sessions",
        "dimensions": [
          "date"
        ],
        "metrics": [
          "sessions"
        ]
      }
]
.env
Copy code
TAP_GITHUB_AUTH_TOKEN='github_pat_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
TAP_GA4_PROPERTY_ID='########'
TAP_GA4_KEY_FILE_LOCATION='xxxxxxx-xxxxxxx-###-XXXXXXXXX.json'
p
meltano invoke tap-ga4
works fine.
meltano run tap-ga4 target-jsonl
works as well.
@jeff is the only issue at this point the
config tap-ga4 test
command? Just trying to understand where you're at now
j
Yep, that's right.
p
Interesting, I'm not sure what would be causing that still. You should be able to ignore it though if you can sync data then you clearly have a valid config 😅 . The config/test command under the hood is actually setting up a sync and waiting to see if any records flow through, once it sees a record it closes and considers it a success. If you dont have any streams selected it might fail because no data flows through during its test.