Advertisement
snegir

microshema gtm

Nov 26th, 2016
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2.   (function(){
  3.     var data =  {
  4.   "@context": "http://schema.org",
  5.   "@type": "NewsArticle",
  6.   "headline": {{title}},
  7.   "alternativeHeadline": "",
  8.   "image": {{url}},
  9.   "datePublished": {{MicroDate}},
  10.   "description": {{MicroDesc}},
  11.   "articleBody": {{MicroBody}}
  12.     }
  13.    var script = document.createElement('script');
  14.    script.type = "application/ld+json";
  15.    script.innerHTML = JSON.stringify(data);
  16.    document.getElementsByTagName('head')[0].appendChild(script);
  17.   })(document);
  18.  
  19. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement