-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google Analytics 4 and AMP - "unknown ID" // documentation issue? #30903
Comments
Hi @jamescridland, the To test, you can check the network tab and see what is returned from the gtag config rewriter endpoint (https://www.googletagmanager.com/gtag/amp) when you use those different ids. |
Thanks for trying to help.
Nevertheless, it successfully calls this file in the network tab.
The
For the Google Analytics 4 ID... in the network tab,
(I'm requesting 100% for site speed samples, by the way). The response, in full, is:
The error in the console reads...
For the old Google Analytics ID... in the network tab,
The response, in full, is:
...it then makes two I'm confused that this page detailing AMP and Google Tag Manager looks so different from this page apparently detailing AMP and Google Analytics. |
Thanks for your response. I guess the answer to your original question is that it's a documentation issue. We should document that sometimes using Using the The solution here would be to either inline your own triggers/requests within the amp-analytics tag (which will send data to your gtag account), or figure out why the gtag server is not returning a config with your new gtag_id. I'm not a google analytics or gtag expert, but please let me know if you need me to clarify anything above. |
Thanks. So, when this page says: "When amp-analytics is configured with a Google Analytics property ID, page_view events are automatically logged by default" then this is entirely incorrect? ... it says it's a basic setup to measure pageviews, but it doesn't measure pageviews. How can get get this in front of Google Analytics or GTag experts? This documentation is plain incorrect. |
Awesome, thank you for reporting it to the GA team. I will close this issue for now, but if you need help setting up your analytics config, please feel free to reopen. |
This shouldn't be closed. Putting a link in a community forum isn't closing this issue. |
AMP-HTML's own documentation is incorrect. Please reopen this issue. |
I see your point. I can put a PR out to fix our docs :) |
Reading through the issue again, it seems like the problem problem with the documentation is this:
Using the /cc @CrystalOnScript Do you know who we can contact to try to get the documentation (#30903 (comment)), fixed/easier to understand? |
Hi @jamescridland, I've found out that as of now, Google Analytics 4 does not support AMP and I am not sure if they are planning to support AMP in the near future. This is why there is no explicit documentation for GA4 integrations with AMP. The documentation that you linked above applies to (and is still valid for) the previous version of Google Analytics and should continue to work with AMP. Does this answer your questions? |
OK, well, that's a shame. And somehow this needs to be clear in the documentation so that other developers don't waste their time as I've done. Can that be made clear? |
How to let Google know their information page at: https://developers.google.com/analytics/devguides/collection/amp-analytics Is not compatible with Google Analytics 4? The page has a Clicking the option I know there are some Googler's working in this repo! Please read my comment and pass it onto the team that deals with the information pages in Google Developers Analytics section. It just needs a blockquote at the top saying not compatible with Google Analytics 4. |
"The new Google Analytics is now the default experience for new properties and is where we’re investing in future improvements." Where's the AMP implementation? The docs? |
I am quite concerned that this is essentially communicating that Google has lost interest in AMP. Probably another Google Reader experience before too long. This is a real concern - how do we get some form of direction from the AMP team? |
Our users using AMP for Shopify want to know how to add GA4 to AMP pages. Please provide some information or an expected ETA on compatibility |
Hi all, thank you for your comments. We are in the process of syncing with the GA4 team to get an estimate for the work need for GA4 to be supported in AMP. I will update here with more information once we get it. |
Thank you! |
Closing this issue in favor of an existing duplicate issue #24621. |
Waiting |
@tranduchieu there is an open issue #24621 and we are all waiting but it won't help to poke at the developers as they are working on a solution. This is a GA4 issue so it won't be an easy or quick fix either. |
It's been the same conversation for about 2 years. Take care of this, please. |
Is this issue still not resolved because i am getting the same problem. |
Hi @yeshwantthota. GA4 is now supported by the official Although it seems work, I agree it still stuck. I have no idea when it will support Google Consent Mode V2 (#39867)
|
What's the issue?
amp-analytics returns
[AmpAnalytics <unknown id>]
error, and does not send information back to Google Analytics 4.How do we reproduce the issue?
I've successfully set up a new Google Analytics 4 property. Under "Web Stream details", it gives me a measurement ID of
G-BR6HXXXXXX
(here's an image of that).It's quite hard to find the Google Analytics 4 AMP setup code, which is not linked from the Google Analytics 4 documentation. I think this is the correct page which looks as though it should look like this:
However, this doesn't appear to collect any data, complaining, with an error message in the console:
log.js:258 [AmpAnalytics <unknown id>] No triggers were found in the config. No analytics data will be sent.
(Triggers aren't required here; this code should automatically measure page views; and adding triggers doesn't appear to fix this issue.)
I can switch the measurement ID to my old GA one -
UA-1002XXXXX-1
- and it works fine.I'm now confused as to what's up. I don't know if this is a bug, or just poor documentation.
The text was updated successfully, but these errors were encountered: