-
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
Issue using amp-analytics with Shadow DOM #20400
Comments
@jpettitt is this blocking anything at the moment? We can prioritize it in the next sprint (starting next week). |
Yes it's blocking a publisher launch so next sprint would be good. |
planned for next sprint. @zhouyx |
Hello @enzo-giancola, thank you for filing the issue. I looked at the given example page. What I found is that the |
That makes sense, it's not reasonable to expect a top level analytics config to know all the possible triggers a subsequent shadow doc might invoke so the |
Hi, let me explain better. We have the tag amp-experiment scoped to the same shadow root as the amp-analytics one Because of we was unable to resolve VARIANTS runtime variable within the PWA So, the original AMP content has amp-experiment and amp-analytics tags. Could you please check? Best Regards |
@enzo-giancola I am a bit confused, Could you please clarify what the issue is? Based on #20400 (comment), the analytics trigger is "subscriptions-access-denied", and that is a signal from the If I understand it right, you want to collect the |
@enzo-giancola I'm going to close the issue as the behavior is expected. Please feel free to reopen and let me know if there're more questions. Thank you. |
@zhouyx, as attached a screen related to the following URL: where as you can see Is this correct? Thank you |
@enzo-giancola Thank you for the screenshot. So I took a look at the page again. Interesting I found two amp-subscriptions in different shadow roots. And one of them is embedded in nested shadow root. The one @enzo-giancola referred to, note that it is in a nested shadow root @jpettitt @dvoytenko How do the two amp-subscriptions work together? |
Hi @zhouyx, we are using the amp-subscriptions in the first shadow root |
@jpettitt @dvoytenko I am not familiar with the amp-subscription usage. But analytics custom event trigger works well when I tested with this example where there're Do you see any thing from the screenshots? Thank you. |
I don't see anything obvious. If you load an AMP page with #log=3 all am subscriptions analytics events will be logged to the console (even if there is nothing listening for them) |
Hi all, is there any update on this? |
Hi @enzo-giancola, we recently worked with re.republica highlighting the problems around multiple shadow root in #21902. I believed it was changed may be to use a single shadow root. Does that effect this issue of yours or are you still using multiple shadow roots? |
I believe Repubblica is still using two Shadow Roots as they need to use it for the outer Login Subscription module within the page. They did try using v0 and amp-subscription to remove one ShadowRoot but unfortunately it seems like Bento AMP + Shadow AMP approach is not compatible. Do you know if this could be solved? |
Hi all, any Bento AMP approach that will be available for components such as amp-subscription? Rep Repubblica is measuring a really high TTI especially because of the late triggering of the amp-subscription module via shadow-amp. |
Hi,
we are facing errors related to amp-analytics
raising when AMP code is imported through a shadow dom
based mechanism (in Polymer).
The problem we noticed:
amp-analytics events are fired within AMP content;
when AMP code is imported through a shadow dom based mechanism (in Polymer) events aren't fired;
How to reproduce:
URL:
https://rep.repubblica.it/pwa/generale/2019/01/16/news/brexit_ora_i_leader_europei_aspettano_londra-216743076/
amp-analytics code is like this:
Same problem with amp-analytics code like this:
Could you please check?
Best Regards,
Enzo
The text was updated successfully, but these errors were encountered: