Contextual Pages

Plot Projects offers the possibility to show location relevant content directly from your app. You can determine this content, which is specified by a string in the dashboard (could be an URL, Deeplink or any arbitrary string). You can define that string while setting up a Contextual Page campaign in the link field. You can retrieve this page at any time you find appropriate using a method provided in our SDK.

It's important to only use Contextual Pages in your app at logical times for the user. When the user opens the current screen via a deeplink, then changing the whole content of the current screen could lead to an unexpected user experience. A good example use case could be checking if there's a contextual page, at the user's location, every time the main page of your app is opened, in order to show a location relevant page, such as a nearby promotion or deal. Another possibility is to only update a part of the screen based on the user's location, for example to show the nearest store.

After deciding when to show a Contextual Page, you invoke the method requestContextualPage. After calling the method and when his location matches one of the contextual pages defined in the dashboard, then the method's handler parameter value will be set to the string defined for that page in the link field of the campaign. Otherwise, the parameter is set to nil.

You should detect yourself whether this is a suitable time to show a contextual page. For example, you can pass context in the segue that you use for changing the view controller.

An example employment of the method used to request the current contextual page is:

[Plot requestContextualPage:^(NSString *result) {
    if (result) {
        // Up to the developer to decide what to do with the result
        // It will be the same value defined in the dashboard in the link field of the campaign
    } else {
        // Up to the developer to decide what to do when there is no contextual page associated with the current location.
    }
}];