Advice on how to putting the Summary Card into Google Tag Manager



Hi Community,
I have put the the code between the script tags. I get a JavaScript Compiler Error
Error at line 3, character 2: Parse error. primary expression expected. I have search around the internet but cannot solve the issue. Your help would be much appreciated.

<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@jamesdearsley />
<meta name="twitter:title" content="The PropTech Site" />
<meta name="twitter:description" content="The site for all your PropTech news and stories whether it be about virtual reality, 3D Printing of the latest mobile apps; we have you covered." />
<meta name="twitter:image" content="" />


Hi Mark - you’ll want to put the meta tags inside the <head> block of your website, not inside <script> tags. Also, looks like you are missing a closing " on the twitter:site tag.


Hi Andy,

Thank you for your quick response.

Does that mean you cannot put twitter card code directly into the tag manager but it needs to be included only in the header section.



I have never used GTM but just had a look and it appears to say that you need to paste the code it supports into the <body> of your page. In that case, this won’t work as a container for Twitter Cards. You’re free to use both cards and the tag manager code, but you will need to add the two chunks of code independently.


Thanks Andy for your help and support.

closed #6