title: Passing Dictionary to Analytics parameters: Urban Airship
body: <p>I am trying to implement Urban Airship Analytics in my app. I want to track each and every event in my app, for that I have made a different class and passed tracking data as a dictionary.</p>
  
  <p>Following <a href="https://docs.urbanairship.com/platform/ios/?swift#ios-screen-tracking" rel="nofollow noreferrer">https://docs.urbanairship.com/platform/ios/?swift#ios-screen-tracking</a> link for the same. </p>
  
  <p>I am passing parameters as:</p>
  
  <pre><code>    UAirship.shared().analytics.trackScreen("MainScreen")
      let event = UACustomEvent()
      event.properties = createParamDictionary(paramDict1,paramDict2)
      event.track() 
  </code></pre>
  
  <p>As event <em>properties</em> is readonly, I can not assign/add data to it.
  And the only option I can see is adding data one by one according to its defined type.
  ie.</p>
  
  <pre><code>event.setStringProperty("abcd", forKey: "abcd")
  event.setNumberProperty(123, forKey: "xyz")
  </code></pre>
  
  <p>Which is very tedious in my case.</p>
  
  <p>So My questions are:</p>
  
  <ol>
  <li>Am I doing it correctly?  </li>
  <li>If Yes, then is there any other variable or some way from which I can directly add parameters?</li>
  <li>I also want to add User_id for tracking particular user. Any provision for this?</li>
  </ol>
  
  <p>Thanks.</p>