Filter post types tracking custom dimension with Google Analytics

Since SEOPress 2.6

function sp_gtag_cd_cpt_cf($html) {
return "'dimension4': 'cd_cpt',";
}
add_filter('seopress_gtag_cd_cpt_cf', 'sp_gtag_cd_cpt_cf');

function sp_gtag_cd_cpt_ev($html) { 
return "gtag('event', '".__('Post types','wp-seopress')."', {'cd_cpt': '".get_post_type()."'});"; 
}
add_filter('seopress_gtag_cd_cpt_ev', 'sp_gtag_cd_cpt_ev');