Reputation: 390
I have added Tag Manager script on my page. So can I add more meta tags to my page.
I means can there will be Tag manager script and meta tags on page or from both of these I should use script or tags?
Thanks Dalvir
Upvotes: 6
Views: 35266
Reputation: 51
I use this little badboy when I need to populate meta-tags, seems to work like a wee charm.
<script>
var m = document.createElement('meta');
m.name = 'your-name';
m.content = 'your-content';
document.head.appendChild(m);
</script>
Upvotes: 5
Reputation: 32760
I assume you mean HTML meta tags like keywords, description etc.
You can add them via the tag manager by inserting a custom html/javascript tag that creates additional meta tags via js in the page header. However that will probably won't do you much good, as search engine spiders etc. will probably not pick up meta-tags that have been inserted via javascript and browsers are unlikely to respect tags that have been injected after the page started rendering.
So theoretically it'S possible, but I cannot conceive a use case where it would make sense.
Upvotes: 6