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
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",
)

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.2.0.tar.gz (16.7 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.2.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ga4bigquery-1.2.0.tar.gz
Algorithm Hash digest
SHA256 d5b1790bc136376e2c75f79e566c05e52ac29151f4b91981735f5b567938295e
MD5 25526f52e1786b8b1f6226a23cfe45f6
BLAKE2b-256 aad09d8b2a7f757da80cc2d62c7587634e491fecbb5c880ccc3ef5d51c956a82

See more details on using hashes here.

Provenance

The following attestation bundles were made for ga4bigquery-1.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: ga4bigquery-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.0 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6dacbd64f10404da0ae0f293e62d52a6be09b170c4351101a65d84df41b7728f
MD5 91df1b15b98c92040a077de9b736641c
BLAKE2b-256 a4c356af3ed8c0bc15707c40544041f76df2f29d73421894e45d221a6d97eb69

See more details on using hashes here.

Provenance

The following attestation bundles were made for ga4bigquery-1.2.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