Esempio n. 1
0
function gtm4wp_the_gtm_tag()
{
    echo gtm4wp_get_the_gtm_tag();
}
Esempio n. 2
0
function gtm4wp_body_class($classes)
{
    global $gtm4wp_options;
    // solution is based on the code of Yaniv Friedensohn
    // http://www.affectivia.com/blog/placing-the-google-tag-manager-in-wordpress-after-the-body-tag/
    if (GTM4WP_PLACEMENT_BODYOPEN_AUTO == $gtm4wp_options[GTM4WP_OPTION_GTM_PLACEMENT]) {
        $classes[] = '">' . gtm4wp_get_the_gtm_tag() . '<br style="display:none;';
    }
    return $classes;
}