     TrackingManager.shared.currentAdBreak = adBreak
     guard
       let tag = adBreak["vmap:AdSource"]["vmap:AdTagURI"].element?.text?.trimmed,
-      let type: String = try? adBreak.value(ofAttribute: "breakType"),
-      let url = URL(string: tag.replacingOccurrences(of: "[timestamp]", with: "\(self.correlator)"))
+      let ssp: String = try? adBreak["vmap:AdSource"]["vmap:AdTagURI"].value(ofAttribute: "ssp"),
+      let type: String = try? adBreak.value(ofAttribute: "breakType")
     else {
       self.adDidFinishPlaying()
       return
     }
+    
+    var urlString = tag
+    
+    switch ssp {
+    case "quadas":
+      urlString = urlString.replacingOccurrences(of: "[IDFA]", with: IDFA.shared.identifier ?? "[IDFA]")
+      urlString = urlString.replacingOccurrences(of: "[APPID]", with: AdsManager.iTunesId ?? "[APPID]")
+    default:
+      urlString = urlString.replacingOccurrences(of: "[timestamp]", with: "\(self.correlator)")
+    }
+    
+    guard let url = URL(string: urlString) else {
+      self.adDidFinishPlaying()
+      return
+    }
+    
     url.fetch(closeAdWhenError: true) { [type] in
       let vast = SWXMLHash.parse($0)
       switch vast["VAST"]["Ad"] {

        self.linearAdCountDown.text = "Ad Starts in \(Int(countDown))s"
      }
    }

    return contentPlayer.addBoundaryTimeObserver(forTimes: times, queue: .main) {
      let interval = Int(CMTimeGetSeconds(self.contentPlayer.currentTime()))
      guard

        }
      }
    }
    
    if !isPreroll {
      self.adDidFinishPlaying()
    }
    
    contentPlayer.addPeriodicTimeObserver(forInterval: CMTime(value: 1, timescale: 1), queue: .main) { _ in
      self.linearAdCountDown.isHidden = true
      guard let nearestLinear = linearTimes.filter({ $0.timeValue > self.contentPlayer.currentTime()}).first else {
