Script TAG, how to add gtag in the script input.
I added this code but isn 't working . <script async src = "google url " > < /script > <script > window .dataLayer = window .dataLayer | | [ ] ; function gtag ( ) {dataLayer .push (arguments ) ; } gtag ( 'js ' , new Date ( ) ) ; gtag ( 'config ' , 'G -4534543543543 ' ) ; < /script > Considering the script tag should be a tag I have deleted the script tags from the code but nothing is changing and isn 't working . I have this tag in the menu component because I want to add it in all pages and not adding using Head Assets . Is this possible ? Hi Andreas , I changed the values because I want to keep the data "safe . " My question is : how can I use the <script > tag to add a Google Tag ? Currently , I have installed the Google Tag by adding it to the Head assets of each page , but it would be much easier to include it in a component and have it applied to all pages . I know that using the <script > tag will place it in the body rather than the head of the page , but I would be interested in trying it to see if it works . If not , having such a tag for the head as well would make things much easier . Currently , the head assets are functional but not practical . And if Tag Assistant doesn 't see it , it means that isn 't working . Are you seeing data in console ? For the script you posted , it 's a 2 part thing so you 'll need to configure each one The other one you need to set the src via an attribute Should just work If you look at the script tag , it 's inside the first bracket Meaning it is an attribute Not body Now make sense to me 🥰 Right ! Thank you Lucas ! 👍1This is why Toddle isn 't "No Code " but a developer 's tool 😅 , you don 't have to forget the rules .