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

Support Astro <ViewTransitions /> #42

Open
tordans opened this issue Nov 22, 2024 · 1 comment
Open

Support Astro <ViewTransitions /> #42

tordans opened this issue Nov 22, 2024 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers

Comments

@tordans
Copy link

tordans commented Nov 22, 2024

With Astro <ViewTransitions /> enabled https://docs.astro.build/en/guides/view-transitions/, only the first page load (and event tracking) is tracked but no following page navigations.

Following the docs…

…I added this to my layout to get the page tracking working again

    <script>
        document.addEventListener('astro:page-load', () => {
          window._paq = window._paq || []
          window._paq.push(['setDocumentTitle', document.title])
          window._paq.push(['trackPageView'])
        })
    </script>

It would be nice, if the plugin detected that this is needed and added the code itself.
Or if there where a config to add them as part of the plugin.

At the very least a hint in the docs would be great to speed up the debugging for the next person :-).

@felix-berlin
Copy link
Owner

Hey @tordans thx for creating the detailed issue!

I plan to fix this within the next release.

@felix-berlin felix-berlin added documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers labels Nov 30, 2024
@felix-berlin felix-berlin self-assigned this Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants