Lnpopupcontroller: How to add google analytics to LNPopupController

Created on 1 Mar 2021  路  7Comments  路  Source: LeoNatan/LNPopupController

Hello,
I added google analytics code to my code, but it not working.
What needs to make the google analytics code work.

Thank you.

question

Most helpful comment

Example:

    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        Analytics.logEvent("viewDidAppear", parameters: [AnalyticsParameterScreenName: "PlayViewController", AnalyticsParameterScreenClass: classForCoder.description()])
    }

All 7 comments

I have no idea. Why ask me how to integrate analytics in your app?

because, I added google analytics code but it doesn't work on LNPopupController, other screens google analytics still works.

LNPopupController is not a view controller. What is not working?

I guess the problem is that the Google Analytics doesn't report the content controller as being open?

I have no idea how Google Analytics figures that out. If they only look at pushed and presented view controllers, then they won't catch controllers shown by this framework. Instead, you can manually notify the Analytics SDK when your screen is opened and closed.

Example:

    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        Analytics.logEvent("viewDidAppear", parameters: [AnalyticsParameterScreenName: "PlayViewController", AnalyticsParameterScreenClass: classForCoder.description()])
    }

@iDevelopper thank you very much.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

johnswifttt picture johnswifttt  路  8Comments

dancarasco picture dancarasco  路  6Comments

johnswifttt picture johnswifttt  路  6Comments

joaovbalmeida picture joaovbalmeida  路  9Comments

PrakashMaharjan picture PrakashMaharjan  路  6Comments