You are here

santianoEvent - SEO - Title

Container Reference: 
Tag Type: 
Custom HTML
Tag Description: 
Sends a santianoEvent for issues found about the Title Tag on each page
	<script>

// Title monitoring events are here 
var seoTitleIsTooLong = {{seoTitleIsTooLong}};
var seoTitleIsMissing = {{seoTitleIsMissing}};

// meta robots tests  
if (seoTestTitleIsTooLong) {
  dataLayer.push ({'event': 'santianoEvent',
                   'eventCommand': 'seoMonitoringTitle',
                   'eventCategory': 'SEO Monitoring by santiano.io',
                   'eventAction': 'Title tag is too long',
                   'eventLabel': '{{seoUrlCurrent}}'
                   // 'eventSegment': undefined
                   // 'eventPartition': undefined
                });
  
}  
 
if (seoTitleIsMissing) {
  dataLayer.push ({'event': 'santianoEvent',
                   'eventCommand': 'seoMonitoringTitle',
                   'eventCategory': 'SEO Monitoring by santiano.io',
                   'eventAction': 'Title tag is missing',
                   'eventLabel': '{{seoUrlCurrent}}'
                   // 'eventSegment': undefined,
                   // 'eventPartition': undefined
                });
  
}  
</script>