var data = {
  "@context": "http://schema.org",
  "@type": "BlogPosting",
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": {{Page URL}}
  "headline": {{SCHEMA - Article Headline}},
  "image": {
    "@type": "ImageObject",
    "url": {{SCHEMA - Article Image}},
    "height": 870,
    "width": 430
  "datePublished": {{SCHEMA - Article datePublished}},
  "author": {
    "@type": "Person",
    "name": {{SCHEMA - Author Name}}
   "publisher": {
    "@type": "Organization",
    "name": "example.com",
    "logo": {
      "@type": "ImageObject",
      "url": "http://www.example.com/ad/de.png",
      "width": 166,
      "height": 25
  "description": {{SCHEMA - Article Description}}

var dateModified = {{SCHEMA - Article dateModified}};

      data.dateModified = dateModified;
    } else {
      data.dateModified = {{SCHEMA - Article datePublished}};

var script = document.createElement(script);
script.type = "application/ld+json";
script.innerHTML = JSON.stringify(data);

Here is the code that i am using as custom HTML tag that i create for my Blogpost. But while debugging the page this Custom HTML Tag is not firing. And some DOM element variable showing 'null' value. Here is the screenshot of my problems....enter image description here

enter image description here

enter image description here

enter image description here

  • The last screenshot shows that your tag should be fired on specific pages. Did you try to run debug mode on that pages?
    – mrbubu
    Commented Jun 17, 2017 at 5:22
  • Yes I already Try...but in every section (window loaded, DOM ready, Page View) Custom HTML tag not firing and in window loaded and DOM Ready section( _event) filters also not working also Page URL....showing red cross. Should i delete this existing tag and triggers and create a new one...will it be a smart work...or it may occur any error in pages?
    – Mourin
    Commented Jun 17, 2017 at 7:58
  • If the page URL doesn't contain the srting you specified the tag would not fire. Check the string. Is it correct?
    – mrbubu
    Commented Jun 17, 2017 at 10:34
  • now the page url showing green signal. But the _event(equals gtm.js) filter showing red cross. May be For this Window loaded and DOM ready section showing tag not fired..is this a problem?
    – Mourin
    Commented Jun 19, 2017 at 7:24
  • If the trigger is Page View then yes
    – mrbubu
    Commented Jun 19, 2017 at 12:20


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.