After I added Google Tag Manager to the project I see lots its log entries in the console. Is there a way to disable it? Console log is full of noise:
GoogleTagManager info: Processing logged event: _vs with parameters: {
"_o" = auto;
"_pc" = UIViewController;
"_pi" = "-3988739357756819671";
"_sc" = "Bubbie.MamboBamboViewController";
"_si" = "-3988739357756819670";
}
2017-07-27 12:01:09.744 BubbieHuff[77205:6894827] GoogleTagManager info: Processing logged event: show_view with parameters: {
"_sc" = "Bubbie.MamboBamboViewController";
"_si" = "-3988739357756819670";
name = Mambo;
}
Exit preview and debug mode To exit preview mode and stop debugging you can either: Click Disconnect in the floating window on your previewed site. Click the X in the upper left corner of the Tag Assistant debug interface. Click Stop debugging on the Tag Assistant activation page.
In the top-right corner click three dots and then go to More tools > Developer Tools. Then go to Application > Cookies > [Your domain]: And in the search field, enter _TAG_ASSISTANT. Once you find that cookie, click it and hit DELETE on your keyboard.
Google Tag Manager Blocker. Prevent yourself from triggering Google Tag Manager on your own website. This extension allows you to block internal traffic from triggering a connection to Google Tag Manager, hence allowing you to avoid corrupting the analytics and events data generated by your website.
Remove or disable Google Tag AssistantSelect Window > Extensions. Locate the Tag Assistant (by Google) extension. Uncheck the Enabled box to disable the extension. Click the trash icon to delete it.
I just had this problem in a project that combines Google Tag Manager and Firebase. Since no header about logging is exposed I couldn't find a way to turn it off.
This is a monkey patch I came up with that lets you control the info logs from GTM.
+ (void)patchGoogleTagManagerLogging {
Class class = NSClassFromString(@"TAGLogger");
SEL originalSelector = NSSelectorFromString(@"info:");
SEL detourSelector = @selector(detour_info:);
Method originalMethod = class_getClassMethod(class, originalSelector);
Method detourMethod = class_getClassMethod([self class], detourSelector);
class_addMethod(class,
detourSelector,
method_getImplementation(detourMethod),
method_getTypeEncoding(detourMethod));
method_exchangeImplementations(originalMethod, detourMethod);
}
+ (void)detour_info:(NSString*)message {
return; // Disable logging
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With