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

Google Analytics (gtag.js) Multi not rendered correctly in twig #8

Open
bellu opened this issue Jan 22, 2024 · 0 comments
Open

Google Analytics (gtag.js) Multi not rendered correctly in twig #8

bellu opened this issue Jan 22, 2024 · 0 comments

Comments

@bellu
Copy link

bellu commented Jan 22, 2024

In the admin area, if you want to declare more than one gtag.js these are the instructions Set your google analytics ID (in the format 'UA-XXXXXXXX-X', 'UA-XXXXXXXX-X', 'UA-XXXXXXXX-X') here, if you are using gtag.js with multiple UAs.

But in this way in your twig the codes are rendered like this:
['UA-XXXXXXXX-X','UA-XXXXXXXX-X'];

For make it works you need to override the twig and add the twig filter raw :
tarteaucitron.user.multiplegtagUa = [{{ configurationvalue | raw }}];

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

No branches or pull requests

1 participant