Skip to content

Tag manager duplicate meta tags in next/head #17020

Answered by jaybytez
jaybytez asked this question in Help
Discussion options

You must be logged in to vote

@jamesmosier After some testing, it appears that issue is not our Tag Manager, it is just our Tag Manager exposes the issue. The Tag Manager runs sync in the Head and adds script (configured into the tool) to the Head, when it does this, it causes the React/Head to regenerate meta tags.

We replicated it by removing the Tag Manager and adding a local script to the Head that basically does this:

var a = document.createElement('meta');
a.setAttribute('name', 'jay');
a.setAttribute('content', 'jay');
console.log(document.head);
console.log("this script is firing");
document.head.append(a);

var a = document.createElement('meta');
a.setAttribute('name', 'jay');
a.setAttribute('content', 'jay')…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@jaybytez
Comment options

Comment options

You must be logged in to vote
3 replies
@jaybytez
Comment options

@jaybytez
Comment options

@stephent
Comment options

Answer selected by jaybytez
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants