Automatic funnel generation using data from the GA4 API

I’m working on a solution that will be able to generate one funnel and its steps automatically based on certain criteria. This would be done through the GA4 API on GCP and have the data returned to be rendered on a custom frontend web application.

Some context before going into specifics;

  1. We’ll be querying various GA4 properties that we don’t own

  2. We have a service account that can query client properties using their id

  3. It’s safe to assume there will be algorithms to accomplish things that I don’t go into detail for

  4. We’re currently using the BetaAnalyticsDataClient from @google-analytics/data on GCP

  5. The starting and ending steps of this funnel can be provided

  6. Analytics reports from the web UI will be used for illustrative purposes only

  7. Limiting factor: amount of manual setup clients would have to go through

  8. Limiting factor: overkill on permissions requirements (ex. using the GA4 admin API)

  9. As a last resort, Google Tag Manager, BigQuery, and other technology are not out of the question

The following picture describes the general logic using the publicly accessible Google Merch Store data:

GA4 Path exploration with highlighted successful paths

Highlighted in green are two candidates for a “successful path” that would be compared.
The path with the most users would be used as the steps to generate the funnel report.

The idea we currently have is to use the data from the GA4 API to build journeys from for example, Home to an add_to_cart event. Afterwards, these journeys would be grouped by similar steps taken and then the group with the most traffic would be selected for a funnel report.

Implementation plans that were looked into and their associated roadblocks:

  1. Path exploration; build the path by navigating through nodes, and then generate a single funnel report

    1. Has no equivalent in the API at the time of posting
  2. Simulating path exploration by manually building paths via custom reporting:

    1. Custom runReport with segments to filter users that went the path of A>B>C and picking the best path

      1. No programmatic way to create segments using the API at the time of posting
    2. Custom runReport to build A>B>C manually to do the above

      1. Couldn’t find metrics/dimensions that allow us to identify + build an individual journey
      2. Requirements would be something to differentiate sessions and a timestamp to order the results
      3. Timestamps are only down to the minute, which aren’t precise enough to build an ordered user journey
  3. Export to BigQuery

    1. BigQuery has access to session id and timestamps, which would let us do the above

    2. Since we’re working with multiple clients where we do not own their GA4 properties, this seems cumbersome.

Thanks for taking the time to read through all of this!

New contributor

KCnpnd is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật