5

Does the Google Analytics Embed API (https://developers.google.com/analytics/devguides/reporting/embed/v1) support the new GA4 properties that were just announced this month (https://www.blog.google/products/marketingplatform/analytics/new_google_analytics/)?

oguz ismail
  • 1
  • 16
  • 47
  • 69
Mete Kural
  • 51
  • 2

1 Answers1

2

NO

The Google analytics embedded API actually only supports the Google Analytics core reporting API last I checked. Which was the Google analytics API v3. Which limited it a bit as you couldn't use the Google analytics reporting API dimensions and metrics that were available in v4.

The new GA4 properties can only be used from the Analytics Data API.

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
  • Thank you so much for your response! I was hoping to use the Google Analytics Embed API to easily embed a few Google Analytics components in another web application, without having to build visualizations from scratch. I'm curious what you think about this: If you had to do this, would you rather use a Universal Analytics property along with the Google Analytics Embed API or would you use a GA4 property and develop against the Analytics Data API? – Mete Kural Oct 30 '20 at 17:09
  • Depending on if this is just for you or if you want to grant others access. I would develop it in both as you dont know what type of account the User will have. – Linda Lawton - DaImTo Nov 02 '20 at 07:04
  • This is for my web property only. My goal is to allow other stakeholders to have a sneak peek into it without having access to Google Analytics directly. This would be an embed in an existing web application. What would be your recommendation in that case? Would you rather use a Universal Analytics property along with the Google Analytics Embed API or would you use a GA4 property and develop against the Analytics Data API? – Mete Kural Nov 04 '20 at 20:54
  • Well if its only your web property and you have switched to GA4 then you should just redo it with the new api then. There is no reason to support both. Just remember the new api is in alpha there are more changes coming though. Probably with the dimensions and metrics if i had to guess. – Linda Lawton - DaImTo Nov 05 '20 at 07:52
  • Gotcha. Thanks for the advice! – Mete Kural Nov 06 '20 at 17:50
  • And what is the replacement for drawing graphs in JavaScript in a web page with the Analytic Data API? – matteo Feb 01 '22 at 18:15
  • 1
    @matteo make them yourself using the same [Google charts](https://developers.google.com/chart/interactive/docs/reference) its what embeded uses – Linda Lawton - DaImTo Feb 01 '22 at 19:05
  • 1
    @DaImTo LOL well ok. That's how Google services evolve: each new version does less work for you, and you are left to rewrite the code yourself to replace what the older version used to do out of the box. My bad for being lazy I guess. – matteo Feb 02 '22 at 14:18