ampproject / amphtml

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

amp-analytics "on": "timer" trigger with immediate=false is being triggered immediately #37059

Open Cleri-Manu opened 2 years ago

Cleri-Manu commented 2 years ago

Description

When using timer trigger with immediate=false and interval=30 the timer should trigger after the specified interval, instead it is being triggered immediately: imagen imagen

Reproduction Steps

This behavior can be seen in the following link immediately after loading the config for amp-analytics https://andro4all.com/noticias/xiaomi/estos-x-moviles-xiaomi-ya-no-recibiran-mas-actualizaciones-de-miui/amp

It can be reproduced with the following code too:

<!DOCTYPE html>
<html ⚡>
  <head>
    <meta charset="utf-8" />
    <link rel="canonical" href="self.html" />
    <meta name="viewport" content="width=device-width" />
    <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
    <script async src="https://cdn.ampproject.org/v0.js"></script>
    <script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
  </head>
  <body>
    <amp-analytics config="https://tools.difoosion.net/tools/GetAmpAnalyticsConfig?domain=andro4all.com&amp;link=https%3A%2F%2Fandro4all.com%2Fnoticias%2Fxiaomi%2Fmiui-13-podria-llegar-a-tu-xiaomi-antes-de-final-de-ano-fecha-y-dispositivos&amp;title=MIUI%2013%20podr%C3%ADa%20llegar%20a%20tu%20Xiaomi%20antes%20de%20final%20de%20a%C3%B1o%3A%20fecha%20y%20dispositivos" data-credentials="include">
    </amp-analytics>
  </body>
</html>

Relevant Logs

No response

Browser(s) Affected

No response

OS(s) Affected

No response

Device(s) Affected

No response

AMP Version Affected

No response

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.