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

fix(GTM): Fixed error given by data layer server-side #321

Merged
merged 1 commit into from
Dec 5, 2018

Conversation

sebastiannm
Copy link
Contributor

The last change created an error while rendering an app using server-side rendering

ERROR ReferenceError: dataLayer is not defined
    at Angulartics2GoogleTagManager.pushLayer

This caused the error

if (typeof dataLayer === 'undefined' && !dataLayer) {
            return;
        }

On the server, data layer is undefined (first condition true) so the second gives an error

@scttcper scttcper merged commit bee8cf2 into angulartics:master Dec 5, 2018
@scttcper
Copy link
Collaborator

scttcper commented Dec 5, 2018

🎉 This PR is included in version 7.2.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

2 participants