Skip to main content

Lean GA4 BigQuery event + funnel querying

Project description

ga4bigquery

ga4bigquery is a lightweight helper for working with Google Analytics 4 (GA4) exports stored in BigQuery.

Installation

pip install ga4bigquery

Usage

from datetime import date, timedelta
from ga4bigquery import GA4BigQuery, FunnelStep

ga = GA4BigQuery(table_id="bigquery-public-data.ga4_obfuscated_sample_ecommerce.events_*")

page_views = ga.request_events(
    events=["page_view"],
    start=date(2020, 11, 1),
    end=date(2020, 11, 2),
    measure="totals",
    group_by="platform",
    interval="day",
)

purchase_funnel = ga.request_funnel(
    steps=[
        FunnelStep(event_name="view_item"),
        FunnelStep(event_name="add_to_cart"),
        FunnelStep(event_name="purchase"),
    ],
    start=date(2020, 11, 1),
    end=date(2020, 11, 2),
    group_by="platform",
    interval="day",
    conversion_window_lt=timedelta(hours=1),
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ga4bigquery-1.3.0.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ga4bigquery-1.3.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file ga4bigquery-1.3.0.tar.gz.

File metadata

  • Download URL: ga4bigquery-1.3.0.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ga4bigquery-1.3.0.tar.gz
Algorithm Hash digest
SHA256 7c7e96e269b39939727fe2c9ef166d3e056b71a0f6aae1aeefadeb20252cf7d9
MD5 59c1a2b410311a82194e07159162dc64
BLAKE2b-256 c3a44c8c4d4c80a3e520f025ac02c9733f3aa96f70498b6147d5ea989b228b24

See more details on using hashes here.

Provenance

The following attestation bundles were made for ga4bigquery-1.3.0.tar.gz:

Publisher: publish.yml on hortemo/ga4bigquery

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ga4bigquery-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: ga4bigquery-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ga4bigquery-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 31600733c694d8d8e1c9ddd1b6fc03281ee89c3607ee2e183fd4b443206bf00d
MD5 47988e3803c461f8754e77fad05e5099
BLAKE2b-256 318fb689112ce787c3ab554c2470b97814102f7541539288b9d230e3765ba171

See more details on using hashes here.

Provenance

The following attestation bundles were made for ga4bigquery-1.3.0-py3-none-any.whl:

Publisher: publish.yml on hortemo/ga4bigquery

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page