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.0.0.tar.gz (14.8 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.0.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ga4bigquery-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4848be3b599a5e03b0fc6778a7080786936c06faa9ef595dadc0669ffc06da94
MD5 3b73565b9ec69c952834d56b20acc3a2
BLAKE2b-256 cf9baf709f79922c86e0251cbfda5174b14ba01ee7cdb268191145eadba4ef6e

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for ga4bigquery-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 093992df2ba9c098dd8fc1131547165324fb72ab91cb03425a82961322c532d4
MD5 684586a00b9860bc9b1df99ee5a33f80
BLAKE2b-256 136899168b5a3dc4c08e793c66c2e2b04f8f6bcfe25b03899e98ef080d157f8b

See more details on using hashes here.

Provenance

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