You are here

santianoEvent - SEO - MetaDescription

Container Reference: 
Tag Type: 
Custom HTML
Tag Description: 
Sends a santianoEvent for each metaDescription issue found
	<script>

// All the MetaDescription tests are here 
var seoMetaDescriptionIsTooLong = {{seoMetaDescriptionIsTooLong}};
var seoMetaDescriptionIsTooShort = {{seoMetaDescriptionIsTooShort}};
var seoMetaDescriptionIsMissing = {{seoMetaDescriptionIsMissing}};
  
// Individual Tests
if (seoMetaDescriptionIsMissing) {
  	dataLayer.push ({
      	'event': 'santianoEvent',
        'eventCommand': 'seoMonitoringTitleDescription',
        'eventCategory': 'SEO Monitoring by santiano.io',
        'eventAction': 'Meta Description is missing',
        'eventLabel': '{{seoUrlCurrent}}'
        // 'eventSegment': undefined
        // 'eventPartition': undefined
    });  
}  

if (seoMetaDescriptionIsTooShort) {
  	dataLayer.push ({
      	'event': 'santianoEvent',
        'eventCommand': 'seoMonitoringTitleDescription',
        'eventCategory': 'SEO Monitoring by santiano.io',
        'eventAction': 'Meta Description is too short',
        'eventLabel': '{{seoUrlCurrent}}'
        // 'eventSegment': undefined
        // 'eventPartition': undefined
    });  
}  

  
if (seoMetaDescriptionIsTooLong) {
  	dataLayer.push ({
      	'event': 'santianoEvent',
        'eventCommand': 'seoMonitoringTitleDescription',
        'eventCategory': 'SEO Monitoring by santiano.io',
        'eventAction': 'Meta Description is too long',
        'eventLabel': '{{seoUrlCurrent}}'
        // 'eventSegment': undefined
        // 'eventPartition': undefined
    });  
}    
</script>