I am a web developer of an e-commerce website. I added google tag manager and I have to use it. But there is a problem about it.
When I add it to header, it creates lots of hyphens (usually in footer sometimes header - probably about loading time of js).
I tried this google tag manager in my localhost website and there are hyphens again. What should I do help me please :/
You have custom html tags that contain the hyphens.
While this is obvious without looking, it can be confirmed by looking at your gtm.js file.
Apparently, when you copied your tracking code, you copied some hyphens that were only there to separate the code from the surrounding text.
When you want to run Javascript via custom HTML tags, you need to make sure everything is wrapped in <script>
tags (and is valid javascript). Any character outside script tags will just become visible at the page bottom (GTM appends all custom HTML tags to the page bottom).
Go to the GTM interface, look through the custom HTML tags and delete the hyphens. Save, and publish.