-
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
<amp-analytics> not possible to be added inside of <amp-list> #3857
Comments
Can you elaborate on the use case? I'm curious what kind of setup requires bringing in the cc @avimehta |
@rudygalfi Sorry, I was just using that as a sample script in amp-analytics. (which works outside An actual use case would be rendering a long list of items through |
It seems like this is more of an issue for vars, which would be addressed by upcoming analytics support for vars in custom data attributes. @djamro2's viewability example could be addressed by putting a blanket trigger on each element of a certain type, and then the data attributes could be used to provide item-specific data for the beacon as each item becomes viewable. |
I believe the custom data attributes will work exactly for this use case. On another point, I'm not sure if maybe the error logs or documentation should be updated about the case where And if not, feel free to close this issue, thanks. |
Hi. Are there still any open questions here? Thanks. |
I think this might still be blocked by #4449, but we've launched the ability to have element-level visibility and click-tracking, as well as Closing this for now, but please reopen if there's some additional aspect here that isn't covered by the above. |
Hi, @rudygalfi we just encountered the same issue when our business needs to analyze the product list data, while this kind of data in productList page is definitely async and rendered, thus we can't have this areas to be analized via For now, we've already tried with nesting And for sure, we've already tried Actually we hope we could do it like this way, as follows.
|
I've looked deeper into this issue. It is NOT that @rudygalfi We should consider allowing script of type @grahamle One workaround for you now is to use remote config instead of inline script config. |
Let us know if @zhouyx's suggestion works for the short-term. Overall, I think we're interested to fix this, but we need to investigate how to do so. |
Realized we talked about allowing json script in |
Closing in favor of #12023 |
Short description
Inside of the
<template>
tag of<amp-list>
, I have items which I need to track using some of the features of<amp-analytics>
(I'm adding this tag inside of the template). However, whenever added inside of this tag, the following errors occur and the template does not render at all.How do we reproduce the issue?
This can be reproduced by pasting a basic
<amp-analytics>
script inside of<amp-list>
Example:
Take the simple below
<amp-analytics>
script and paste inside of the given<amp-list>
example<amp-list>
examples (occurs in all) : https://ampbyexample.com/components/amp-list/This affects all browsers, using latest version
The text was updated successfully, but these errors were encountered: