1313
1414public class AppsflyerModule
1515{
16- private bool isSandbox { get ; }
1716 private string devkey { get ; }
1817 private string appid { get ; }
18+ private bool isSandbox { get ; }
19+ private List < string > sharingFilter { get ; set ; }
1920 private int af_counter { get ; set ; }
2021 private string af_device_id { get ; }
2122 private string cuid { get ; set ; }
@@ -28,6 +29,7 @@ public AppsflyerModule(string devkey, string appid, MonoBehaviour mono, bool isS
2829 this . devkey = devkey ;
2930 this . appid = appid ;
3031 this . mono = mono ;
32+ this . sharingFilter = null ;
3133 this . isStopped = true ;
3234
3335 this . af_counter = PlayerPrefs . GetInt ( "af_counter" ) ;
@@ -63,7 +65,8 @@ private RequestData CreateRequestData()
6365 device_ids = deviceids ,
6466 request_id = GenerateGuid ( ) ,
6567 limit_ad_tracking = false ,
66- customer_user_id = cuid
68+ customer_user_id = cuid ,
69+ sharing_filter = this . sharingFilter
6770
6871 } ;
6972 return req ;
@@ -174,6 +177,16 @@ public void SetCustomerUserId(string cuid)
174177 this . cuid = cuid ;
175178 }
176179
180+ public void SetSharingFilterForPartners ( List < string > sharingFilter ) {
181+ this . sharingFilter = sharingFilter ;
182+ Debug . Log ( "Sharing filter for partners has been set" ) ;
183+ }
184+
185+ public void SetSharingFilter ( List < string > sharingFilter )
186+ {
187+ this . sharingFilter = sharingFilter ;
188+ }
189+
177190 // send post request with Unity HTTP Client
178191 private IEnumerator SendUnityPostReq ( RequestData req , AppsflyerRequestType REQ_TYPE )
179192 {
@@ -183,7 +196,7 @@ private IEnumerator SendUnityPostReq(RequestData req, AppsflyerRequestType REQ_T
183196 Newtonsoft . Json . Formatting . None ,
184197 new JsonSerializerSettings { NullValueHandling = NullValueHandling . Ignore }
185198 ) ;
186- // Debug.Log(json);
199+ Debug . Log ( json ) ;
187200
188201 // create auth token
189202 string auth = HmacSha256Digest ( json , devkey ) ;
@@ -329,6 +342,7 @@ class RequestData
329342 public string request_id ;
330343 public bool limit_ad_tracking ;
331344 public string customer_user_id ;
345+ public List < string > sharing_filter ;
332346 public string event_name ;
333347 public Dictionary < string , object > event_parameters ;
334348 public Dictionary < string , object > event_custom_parameters ;
0 commit comments