ampproject / amphtml

The AMP web component framework.
https://amp.dev
Apache License 2.0
14.9k stars 3.89k forks source link

Support App + Web properties on Google Analytics (gtag) #24621

Open jeffjose opened 4 years ago

jeffjose commented 4 years ago

App + Web properties is a new feature that Google Analytics that unifiies measurements on app and web properties.

Support this in gtag.js

cc/ @avimehta @zikas @zhouyx

aleballe commented 3 years ago

@kristoferbaxter could you give a timeline for when you will give the timeline?

ajohnclark commented 3 years ago

If you need any GA4 testers with an AMP-only website happy to offer assistance. Great work and thank you for this fantastic framework.

ibnujakaria commented 3 years ago

Finally my GA4 works as well as legacy UA after removing AMP version of my site.

nandafirdaus commented 2 years ago

Hi all,

Any timeline that we can refer for GA4 support?

lennonjesus commented 2 years ago

+1

elswork commented 2 years ago

SOON ?!?!? Will our children see the answer to the Ultimate Question?(the updated timeline)

Screenshoot

tripledm commented 2 years ago

considering the timelines this might be a sign that the end of AMP is near, that is the only explanation I can think off for not building in GA4 support considering it's a 2019 issue we still have towards the end of 2021.

Letme commented 2 years ago

It's November already and I really really wanted to use GA4. I guess this really means AMP is dead since even Google does not want to support it with its own tools, we can probably expect that they will start dropping support soon-ish.

RIP.

aleballe commented 2 years ago

Please can someone responsible just say SOMETHING? Anything regarding GA4 support? I have to go on with my life and make decisions and plan the future of my business. Please tell me if I should abandon AMP (for analytics purposes).

AEnRND commented 2 years ago

Currently we use a workaround with a GTM container inside AMP and Server Side Tagging (SST)(https://developers.google.com/tag-manager/serverside) to get AMP data into GA4. The way looks something like this: (AMP::Custom Tag) --> (SST::Custom Client::GA4 Tag) --> GA4 Property

kristoferbaxter commented 2 years ago

Apologies for slow responses, we didn't want to overcommit as the issues preventing GA4 compatibility are outside of the control of this project.

We have been working with the GA team on support, but do not yet have a firm commitment from their end of when work will complete.

I understand this is frustrating, and do really wish it was something we could more actively address.

There will be official support for GA4 with AMP before GA4 is released as a final product.

pschneider87 commented 2 years ago

for me the latest official google announcements sounded as GA4 is feature-ready and fully released already.

Letme commented 2 years ago

That was also my impression of reading the must switch to GA4 from 12th October this year:

Over the past year, we’ve continued to invest in the new, more intelligent Google Analytics 4 to help you get better ROI from your marketing now, and for the long term. We are excited to share that Google Analytics 4 is fully ready for you to use in place of your existing setup. We encourage you to set up and put Google Analytics 4 at the core of your measurement today. Get started with just a few clicks.

geek-suryansh commented 2 years ago

Hello AMP team, Yesterday, Google announced officially, the deprecation of Universal Analytics with the deadline of July 1, 2023. And announced a complete move to GA4. Here is the announcement: https://blog.google/products/marketingplatform/analytics/prepare-for-future-with-google-analytics-4/

I still don't see the support for AMP on GA4. Considering it's the official stance now to move to GA4 ASAP, by when do you think amp support will be available. Publishers like us can't fully move to GA4 and collect historical data until this happens.

rodrigocarlos commented 2 years ago

Google is discontinuing AMP. AMP sites are no longer a ranking factor by Google. Many large sites have already turned off AMP and simply made their sites simpler to load fast, no AMP required. Google wants the site to offer a good user experience, yes it is fast, but it doesn't need AMP for that. So I think you don't have to worry about AMP anymore.

stephengardner commented 2 years ago

@rodrigocarlos that's incorrect. Google is not discontinuing AMP. AMP is in fact being used in even more places, including Email, Web Stories, and the Bento project (to allow the fast components on both AMP and non-AMP pages). AMP was never an explicit ranking factor. Speed and mobile friendliness is, however, an explicit ranking factor. The only difference now is that the AMP symbol is removed and AMP is not a requirement to rank in top stories. AMP does, however, help rank in top stories, and does improve SEO in large part due to the speed and mobile friendliness factor. There are billions of pages created with AMP, and Google doesn't have any plans to discontinue it. The stats on the github repository for AMP can show you it's still in active development/improvement.

Across thousands of sites we have hosted that use AMP, almost all of them now pass mobile core web vitals, which they otherwise wouldn't have, and this significantly improves SEO, and obviously helps their landing pages load immediately, partially due to the preloading and precaching that Google provides to AMP pages. This isn't going away.

supernovae commented 2 years ago

Dropping AMP was the best thing I ever did and It was much easier to ace mobile/desktop core web vitals using normal web technologies than it ever was trying to do so with AMP... good riddance

rodrigocarlos commented 2 years ago

@stephengardner I think I was incisive in saying that Google is discontinuing AMP. What I wanted to say is that I believe he is already planning to do this, because if Google itself, which was the main supporter of AMP, removed the AMP citation in their search results for the sites that were configured in AMP, then I believe that Google is no longer giving as much importance to AMP as it used to.

Today many websites are already being developed in a simpler way and with fast loading, both on desktop and mobile, making the use of AMP unnecessary. And I believe that Google is seeing this too, what is the use of AMP if many sites are already able to create very light and fast pages.

There are still a lot of poorly built websites with slow loading. So, for the owners of these sites that cannot develop a super light site, I recommend using AMP, because its activation is fast, especially for those who use Wordpress. But, for those who can develop a totally new website, then I recommend you create a simple website, with a super light and fast page, and with that there is no need to use AMP.

Today, it is possible to create a website that loads, both on desktop and mobile, in less than 1 second. The problem is that many website owners start putting form, social buttons, popup, ads (lots of ads) and other elements in heavy scripts, and this makes the website very slow to load, and with that they find themselves needing to use AMP to create a super lightweight version on mobile. But if you already build a super lightweight website, you don't need AMP. And I think this is much better, because it avoids extra work having to configure AMP with different coding (if you are going to place an ad, the AMP code is different, if you are going to place a script, the AMP code is different, everything is different and more complicated in AMP). So, make a super lightweight website and that's it, you don't have to deal with AMP.

Beethoven commented 2 years ago

Apologies for slow responses, we didn't want to overcommit as the issues preventing GA4 compatibility are outside of the control of this project.

We have been working with the GA team on support, but do not yet have a firm commitment from their end of when work will complete.

I understand this is frustrating, and do really wish it was something we could more actively address.

There will be official support for GA4 with AMP before GA4 is released as a final product.

GA team knows that AMP exists? Remember them.

Letme commented 2 years ago

I cannot believe they are doing this. Almost 2 years ago I completely rewritten my websites to AMP, soon afterwards I saw GA4 is not supported. Today this rewrite seems like the worse decision I have ever made since Google simply does not care about AMP and it is just a matter of time when they stop caching it and when they stop hosting the files. This will mean you are left with totally crippled website.

This really really stinks Google -> please add GA4 or just declare AMP death.

Lovntola commented 2 years ago

Exist a Issue in GA? Can someone post a link to it?

Beethoven commented 2 years ago

Winning the customer: WebStories is an amazing platform sponsored by google, interactive, etc...

Client: How to install analytics?

Me: Go to Analytics Admin, click show advanced options With alert that you are doing something wrong: Universal Analytics properties will stop collecting data as of July 1, 2023. We recommend that you create a Google Analytics 4 property.

Customer: I can't create an analytics that will end and I can't migrate the data, you said that google supports WebStories, are you serious?

Me: Unfortunately WebStories don't support GA4

Losing the customer...

annanyc commented 2 years ago

Currently we use a workaround with a GTM container inside AMP and Server Side Tagging (SST)(https://developers.google.com/tag-manager/serverside) to get AMP data into GA4. The way looks something like this: (AMP::Custom Tag) --> (SST::Custom Client::GA4 Tag) --> GA4 Property

Hey @AEnRND do you mind sharing more details on this solution?

photocoder commented 2 years ago

This issue began to be a very important for now. I think everyone receive this notification from Google:

Universal Analytics will no longer process new data in standard properties beginning July 1, 2023. Prepare now by setting up and switching over to a Google Analytics 4 property.

Which direct to this article: https://support.google.com/analytics/answer/11583528

It has to be normal solution for connecting GA4 when use AMP.

ismetbalat commented 2 years ago

are you kidding? Analytics GA4 doesn't work with AMP :/

99coder99 commented 2 years ago

This SO answer sums it up all - https://stackoverflow.com/questions/39056800/can-amp-be-used-as-both-mobile-and-desktop-versions/61798066#61798066

PS: Do the Google folks realize how much effort goes in by the webmasters in building an AMP compatible site?

erdalonline commented 2 years ago

It's been the same conversation for about 2 years. Take care of this, please.

99coder99 commented 2 years ago

In the last 2 days, 3 emails have been received from analytics-noreply@google.com with the title "We will begin to sunset Universal Analytics in 2023" Alas - there is nothing mentioned yet about when the GA 4 is expected to be AMP-ready! Disappointing!

stephengardner commented 2 years ago

There will be official support for GA4 with AMP before GA4 is released as a final product.

@kristoferbaxter can you provide this thread an update, as with the recent automated emails from Google regarding GA4, we're getting a higher demand for GA4 support now across our large number of AMP websites.

Thanks

joshcp commented 2 years ago

Hello @kristoferbaxter, we now have many many clients receiving emails that say "Google Analytics 4 is replacing Universal Analytics" and yet there is currently no clear upgrade path to GA4 for AMP. I would love to respond with reassuring details beyond "there will be official support... someday." Can you share any additional details around timeline? Thank you!

DrLightman commented 2 years ago

Or at least let's hope AMP will get discontinued for good.

Stunkamator commented 2 years ago

I was also following this issues for quite some time and i made up the following descision. Perhaps it helps one or another:

So i came to the descision to do the following:

  1. Remove <html ⚡> or tag from my sites, however keep the rest of AMP components
  2. Remove the Amp-analytics tag and replace it with a default Tag Manager container.
  3. This tag Manager Container feeds both Universal analytics as well as google Analytics 4.
  4. At the time Universal Analytics will be discontinued, i will already have at least a year of data in my GA4 property.
  5. I now have the time to either slowly migrate to another framework and still be open for an AMP GA4 implementation to use, without risking to start from 0 in Google Analytics 4.
DrLightman commented 2 years ago

@Stunkamator

  • I am using AMP for my ecommerce store purely so exchanging it will be a process and serious UI refactoring is involved.

Hats off to you for having developed an ecommerce totally in AMP... without Javascript, that's quite crazy!

However I'm puzzled about what you did afterwards, by removing the <html ⚡> but yet manteining some AMP formatting mixed with standard HTML <script> tags? That's some acrobatic stuff you made.

Sorry for the off-topic.

Lovntola commented 2 years ago

However I'm puzzled about what you did afterwards, by removing the <html ⚡> but yet manteining some AMP formatting mixed with standard HTML <script> tags? That's some acrobatic stuff you made.

And I use AMP Optimizer it fixed the remove of HTML Head. Keep care of it to fix all optimizing steps before and removed it.

And you must use AMP Bento to use local scripts

issababble commented 2 years ago

@Lovntola do AMP Optimizer and Bento actually work without a) being an amphtml document, and b) no AMP runtime?

Also, 3 days since an update was requested and still nothing. It is discouraging as some have invested a lot into building great AMP experiences 😢

Lovntola commented 2 years ago

@issababble AMP optimizer add all missing scripts, tags etc and sort order of the template. But you can configure it. In my source code you can see how optimizer works (most are default settings from Amp otimizer) Bento is for selfhosting the script and use AMP for standalone use. If AMP not added GA4, it is my plan to use Bento and add GA4 vie Tag Manager self. I real like AMP, but I need GA.

DrLightman commented 2 years ago

I still don't get it why removing <html ⚡> is called a "fix". What is the issue of having <html ⚡>? As I know, it's required to identify an AMP page.

Letme commented 2 years ago

You will get invalid results in search console if you have an amp page with script for GA4. That means it will be removed from the search results. Point is, that with that change the scripts still work, except that the page is not identified as amp.

DrLightman commented 2 years ago

In that way the page will stop to be AMP, Google won't store it in its cache, et cetera, I don't see it as a fix, rather a total disruption with the sole benefit to allow a GA4 script?

joshcp commented 2 years ago

@jeffjose @micajuine-ho is there a way that I can help contribute to this? It is a high priority issue for us. Thank you!

99coder99 commented 2 years ago

Google Search Console continues to report errors because of GA4 code (screenshot attached). But no response yet on this issue. Obviously the site's ranking is going to take a hit. amp-err

Suggestion for a simple fix: Why can't Google Search Console, AMP Validator, and Google Search Engine, and all other Google functions simply ignore the GA4 custom code for the time being, and consider all GA4 code carrying pages as AMP compatible (like previous version of GA properties)? How long will Google keep mum on this hot issue open since long?

thyngster commented 2 years ago

I've been waiting for Google Analytics teams to add support for AMP on GA4 for 2 years now, I've tried to build the best support possible on this project: https://github.com/analytics-debugger/google-analytics-4-for-amp .

It's not the expected official support, but it may help someone that it's in a hurry for having some native integration whilst some official support is added.

zoolyka commented 2 years ago

So official GA4 support for AMP is not even planned? And the amp-analytics component will stop working after July 1, 2023? Thanks.

thyngster commented 2 years ago

I don't know if it's planned or not I don't work at Google. I mean that is not the "expected" official support that people were waiting for, but it's at least some support and a way to track these pages.

rolandfarkasCOM commented 2 years ago

@thyngster, thanks for that implementation 🙏 I've created a WordPress plugin from it so it can be hosted locally;

Thought this might be useful for others so here is a link to it;

https://wordpress.org/plugins/amp-google-analytics-4-support/

Lovntola commented 2 years ago

I found this answer about my Question on Stackoverflow and here Has anyone experience about it?

katsar0v commented 2 years ago

The issue about GA4 https://github.com/ampproject/amphtml/issues/30903 has been closed, any updates regarding AMP supporting GA4?

stephengardner commented 2 years ago

Team, please, stop ignoring this thread and provide us an update.

devdeeb commented 2 years ago

GA4 Team we need to start working on migration and this issue is very crucial

javdl commented 2 years ago

I've been following this thread for more then a year now, at least. I think it's safe to say all of us need to start thinking seriously about dropping AMP altogether. Google hasn't been using it as a ranking signal any longer, since late last year. Everything Google is doing looks like they will be deprecating AMP at some point. (as they have done with many products) And as a matter of fact, I don't blame them. AMP was a great tool, but is not really needed any longer. Frameworks have come a long way and can provide plenty performance, without the lock-in to the walled-garden Google created with AMP. You don't have to maintain 2 frontends simultaneously. Your developers won't be mad at you for needing to support 2 sites. Big publications like Vox Media (the Verge etc.) and Buzzfeed have already stopped or are planning to remove the AMP version of their sites. On top of that, the Brave browser now has a feature do de-AMP pages and Twitter stopped serving AMP to both iOS and Android. I think it's time for all of us to stop pouring time into AMP pages, and create a single site/frontend that is awesome on all devices, with all the great tools the web development toolkit has to offer nowadays.