Skip to content

Commit 5d15f2a

Browse files
committed
Change sample rate to an int.
1 parent c6f07e4 commit 5d15f2a

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

source/Plugins/GoogleAnalyticsV3/GAIHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ public void _setDryRun(bool dryRun){
6161
}
6262

6363
[DllImport("__Internal")]
64-
private static extern void setSampleFrequency(float sampleFrequency);
65-
public void _setSampleFrequency(float sampleFrequency){
64+
private static extern void setSampleFrequency(int sampleFrequency);
65+
public void _setSampleFrequency(int sampleFrequency){
6666
setSampleFrequency(sampleFrequency);
6767
}
6868

source/Plugins/GoogleAnalyticsV3/GoogleAnalyticsAndroidV3.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class GoogleAnalyticsAndroidV3 : IDisposable {
3131
private string appName;
3232
private string bundleIdentifier;
3333
private int dispatchPeriod;
34-
private float sampleFrequency;
34+
private int sampleFrequency;
3535
private GoogleAnalyticsV3.DebugMode logLevel;
3636
private bool anonymizeIP;
3737
private bool dryRun;
@@ -89,7 +89,7 @@ internal void SetTrackerVal(Field fieldName, object value) {
8989
tracker.Call(GoogleAnalyticsV3.SET, args);
9090
}
9191

92-
public void SetSampleFrequency(float sampleFrequency) {
92+
public void SetSampleFrequency(int sampleFrequency) {
9393
this.sampleFrequency = sampleFrequency;
9494
}
9595

source/Plugins/GoogleAnalyticsV3/GoogleAnalyticsV3.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ public enum DebugMode {
6262
public int dispatchPeriod = 5;
6363

6464
[RangedTooltip("The sample rate to use. Only required for Android and" +
65-
" iOS.", 0F, 100F)]
66-
public float sampleFrequency = 100.0F;
65+
" iOS.", 0, 100)]
66+
public int sampleFrequency = 100;
6767

6868
[Tooltip("The log level. Default is WARNING.")]
6969
public DebugMode logLevel = DebugMode.WARNING;
@@ -120,7 +120,7 @@ void Awake() {
120120
if (UncaughtExceptionReporting) {
121121
Application.RegisterLogCallback(HandleException);
122122
if (GoogleAnalyticsV3.belowThreshold(logLevel, GoogleAnalyticsV3.DebugMode.VERBOSE)) {
123-
Debug.Log ("Enabling uncaught exception reporting.");
123+
Debug.Log("Enabling uncaught exception reporting.");
124124
}
125125
}
126126
}

source/Plugins/GoogleAnalyticsV3/GoogleAnalyticsiOSV3.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class GoogleAnalyticsiOSV3 {
3131
private string bundleIdentifier;
3232
private string appVersion;
3333
private int dispatchPeriod;
34-
private float sampleFrequency;
34+
private int sampleFrequency;
3535
private GoogleAnalyticsV3.DebugMode logLevel;
3636
private bool anonymizeIP;
3737
private bool dryRun;
@@ -145,7 +145,7 @@ public void SetDispatchPeriod(int dispatchPeriod) {
145145
this.dispatchPeriod = dispatchPeriod;
146146
}
147147

148-
public void SetSampleFrequency(float sampleFrequency) {
148+
public void SetSampleFrequency(int sampleFrequency) {
149149
this.sampleFrequency = sampleFrequency;
150150
}
151151

0 commit comments

Comments
 (0)