Skip to content

Instantly share code, notes, and snippets.

@ekazaev
Created September 3, 2018 12:10
Show Gist options
  • Save ekazaev/5a4c77b3a86c7bb181fdabcd4d556337 to your computer and use it in GitHub Desktop.
Save ekazaev/5a4c77b3a86c7bb181fdabcd4d556337 to your computer and use it in GitHub Desktop.
class ProductViewControllerPostTask: PostRoutingTask {

    let analyticsManager: AnalyticsManager

    init(analyticsManager: AnalyticsManager) {
        self.analyticsManager = analyticsManager
    }

    func execute(on productViewController: ProductViewController, for destination: AppDestination, routingStack: [UIViewController]) {
        analyticsManager.trackProductView(productID: productViewController.productID)
    }

}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment