Skip to content
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-carousel 0.2 triggers amp-carousel-prev analytics event on page load #24701

Closed
dzuendorf opened this issue Sep 24, 2019 · 0 comments · Fixed by #24717
Closed

amp-carousel 0.2 triggers amp-carousel-prev analytics event on page load #24701

dzuendorf opened this issue Sep 24, 2019 · 0 comments · Fixed by #24717

Comments

@dzuendorf
Copy link

dzuendorf commented Sep 24, 2019

amp-carousel 0.2 triggers amp-carousel-prev analytics event two times on page load, without any user interaction.

You can reproduce it here:
https://ampb.in/#oUkagY1kWqjsx6k9K3oI

Or in production:
https://www.chefkoch.de/amp/rezepte/745721177147257/Lasagne.html

<amp-analytics type="googleanalytics">
    <script type="application/json">
        {
            "vars": {
                "account": "XXXXX"
            },
            "triggers": {
                "swipeNext": {
                    "on": "amp-carousel-next",
                    "selector": ".carousel-tracking",
                    "request": "event",
                    "vars": {
                        "eventCategory": "slider",
                        "eventAction": "swipe-next"
                    }
                },
                "swipePrev": {
                    "on": "amp-carousel-prev",
                    "selector": ".carousel-tracking",
                    "request": "event",
                    "vars": {
                        "eventCategory": "slider",
                        "eventAction": "swipe-prev"
                    }
                }
            }
        }
    </script>
</amp-analytics>

<amp-carousel class="carousel-tracking" width="400" height="300" layout="responsive" type="slides">
    <amp-img src="/static/samples/img/image1.jpg" width="400" height="300" layout="responsive" alt="a sample image"></amp-img>
    <amp-img src="/static/samples/img/image2.jpg" width="400" height="300" layout="responsive" alt="another sample image"></amp-img>
    <amp-img src="/static/samples/img/image3.jpg" width="400" height="300" layout="responsive" alt="and another sample image"></amp-img>
</amp-carousel>

Testet in Chrome and Firefox.

Current AMP Version is 1909141409590

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant