I think I have found the culprit. The regex checking the custom domain in the frontend.php (line 1093) does not allow hyphens in the domain string (only dots). Since my domain features as hyphen in thebigc-agency.de the http://www.googletagmanager.com is not replaced for my domain.
$_gtm_domain_name = 'www.googletagmanager.com';
if (
( '' !== $gtm4wp_options[ GTM4WP_OPTION_GTMDOMAIN ] ) &&
( preg_match( '/^[a-z0-9\.:]+$/', strtolower( $gtm4wp_options[ GTM4WP_OPTION_GTMDOMAIN ] ) ) )
) {
$_gtm_domain_name = $gtm4wp_options[ GTM4WP_OPTION_GTMDOMAIN ];
}
I think the regex /^[a-z0-9\.:\-:]+$/ would fix the issue.
Has this been resolved yet? I am currently seeing the same issue. I configured the Plugin to load the GTM Container from a custom (sub) domain but it keeps loading from http://www.googletagmanager.com.
I can provide screenshots if it helps.