Aller au contenu principal

Troubleshooting

Simultaneous Partner popup and Rokt placement

Background

When a Partner pop-up and a Rokt placement are both programmed to appear simultaneously, it leads to the Rokt placement failing to display as intended.

When this happens:

  1. A user completes a purchase.
  2. A modal appears requesting the user to submit feedback or other information either within the app or outside the app (Apple app store).
  3. Simultaneously, a request to Rokt’s ‘execute’ is made in an attempt to load a modal placement.
  4. The attempt to execute the Rokt modal fails.

The result is a reduction in placement impressions and potential revenue loss. As committed partners, our objective is to offer the necessary assistance for optimising impressions and partner revenue. We currently have two possible solutions to this issue.

remarque

Both solutions entail careful consideration of changes to the user journey and a dedicated effort to implement the proposed solution.

Solution 1: Show the Rokt placement before the feedback/rating modal.

The new flow will be:

  1. A user completes a purchase.
  2. A request to Rokt’s execute is made and the Rokt placement will show.
  3. A modal appears requesting the user to submit feedback either within the app or outside the app (Apple app store).

Action required by the partner:

Implement Rokt's onUnload function and call the feedback/rating modal inside it.

Rokt.execute(viewName: MY_ROKT_VIEWNAME, attributes: attributes, onLoad: {
// Optional callback for when the Rokt placement loads
}, onUnLoad: {
// DispatchQueue.main.async { CALL_THE_MODAL_HERE }
}, onShouldShowLoadingIndicator: {
// Optional callback to show a loading indicator
}, onShouldHideLoadingIndicator: {
// Optional callback to hide a loading indicator
})

Solution 2: Show the Rokt placement after the feedback/rating modal.

The new flow will be:

  1. A user completes a purchase.
  2. A modal appears requesting the user to submit feedback either within the app or outside the app (Apple app store).
  3. After the user finishes interaction with modal i.e. completes feedback in the app or returns to the app from the app store; the Rokt placement will appear.

Action required by the partner.

If the modal requires input from the user within the app, then a call to Rokt’s ‘execute’ is required after the user takes action i.e. Completes rating, selects yes or no.

If the modal requires input from the user outside the app, then the Rokt ‘execute’ call is required after the user returns to the partner app. Please use the following function to detect whether a user has returned to the app:

UIApplication.willEnterForegroundNotification

NotificationCenter.default.addObserver(
self,
selector: #selector(appWillEnterForeground),
name: UIApplication.willEnterForegroundNotification,
object: nil
)


@objc
private func appWillEnterForeground() {
let attributes = ["email": "j.smith@example.com",
"firstname": "Jenny",
"lastname": "Smith",
"mobile": "(555)867-5309",
"postcode": "90210",
"country": "US"]


Rokt.execute(viewName: "MY_ROKT_VIEWNAME", attributes: attributes, onLoad: {
// Optional callback for when the Rokt placement loads
}, onUnLoad: {
// Optional callback for when the Rokt placement unloads
}, onShouldShowLoadingIndicator: {
// Optional callback to show a loading indicator
}, onShouldHideLoadingIndicator: {
// Optional callback to hide a loading indicator
})
}
Cet article vous a-t-il été utile ?