Skip to content

Commit acde5a0

Browse files
committed
Merge pull request googleanalytics#101 from belm0/dryrun_optout_logging
Make logging of dry-run and opt-out on MP match Android SDK
2 parents 5105a84 + c694e9d commit acde5a0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

source/Plugins/GoogleAnalyticsV3/GoogleAnalyticsMPV3.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,17 @@ internal void StopSession() {
116116
}
117117

118118
private void SendGaHitWithMeasurementProtocol(string url) {
119+
if (optOut) {
120+
return;
121+
}
119122
if (String.IsNullOrEmpty(url)) {
120123
if (GoogleAnalyticsV3.belowThreshold(logLevel, GoogleAnalyticsV3.DebugMode.WARNING)) {
121124
Debug.Log("No tracking code set for 'Other' platforms - hit will not be sent.");
122125
}
123126
return;
124127
}
125-
if (dryRun || optOut) {
126-
if (GoogleAnalyticsV3.belowThreshold(logLevel, GoogleAnalyticsV3.DebugMode.WARNING)) {
128+
if (dryRun) {
129+
if (GoogleAnalyticsV3.belowThreshold(logLevel, GoogleAnalyticsV3.DebugMode.VERBOSE)) {
127130
Debug.Log("Dry run or opt out enabled - hits will not be sent.");
128131
}
129132
return;

0 commit comments

Comments
 (0)