Direct linking provides a very simple method of linking your website to the offerwall. Wherever you want to show the offerwall, you can link to the following URL:
https://webofferwall.tapjoy.com/link/<SDK_KEY>/u/<USER_ID>
User privacy can be implemented by adding query parameters to the URL. Please see User Privacy page for more information about each flag.
https://webofferwall.tapjoy.com/link/<SDK_KEY>/u/<USER_ID>?gdpr=1&cgdpr=1&...
Option | Query Parameter Name | Default Value | Description |
---|---|---|---|
Is user subject to GDPR | gdpr |
0 |
Value should be 1 if user is subject to GDPR |
GDPR Consent | cgdpr |
0 |
0 means user does not consent, 1 means user consents |
Below Consent Age | below_consent_age |
0 |
1 and 0 values respectively represents whether the user is below consent age |
US Privacy (COPPA) | us_privacy |
1--- |
See User Privacy for value descriptions. |
To display the offerwall you need to create a placement and offerwall content card within the Tapjoy dashboard.
Its default value is #WebOfferwall
, so you don't need an additional parameter to specify placement name if you have one already.
You can pass placement name as below.
https://webofferwall.tapjoy.com/link/<SDK_KEY>/u/<USER_ID>?event_name=<PLACEMENT_NAME>
Web offerwall supports segment targeting with User Tags. You can pass multiple user tags by using user_tags[]=
.
https://webofferwall.tapjoy.com/link/<SDK_KEY>/u/<USER_ID>?user_tags[]=<TAG1>&user_tags[]=<TAG2>
When embedding the Web Offerwall in iframe, it is critical to ensure the size of the iframe does not exceed the device's screen viewport. Otherwise, it results in the Instruction CTA Button appearing outside of the visible viewport and users need to scroll all the way down to access the button.
By following these guidelines, developers can maximize the usability and user engagement of the Web Offerwall product, ensuring important UI elements are readily accessible.
Web Offerwall is also available in mobile apps by loading the link into the WebView.
Since Web Offerwall does not yet fully handle the Android back button, it is recommended that you override the Android back button and implement your own UI to close the WebView. This prevents users from unintentionally closing the WebView and allows them to use the navigation UI within the OW instead.
void showWebOfferwall() {
final WebView webView = new WebView(requireContext());
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setDomStorageEnabled(true);
webView.getSettings().setMediaPlaybackRequiresUserGesture(false);
webView.setBackgroundColor(Color.TRANSPARENT);
webView.loadUrl("https://webofferwall.tapjoy.com/link/sdk_key/u/user_id");
RelativeLayout.LayoutParams paramsWebView = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT);
Dialog dialog = new Dialog(requireContext(), android.R.style.Theme_Black_NoTitleBar_Fullscreen);
dialog.addContentView(webView, paramsWebView);
// Handle backbutton
dialog.setOnKeyListener(new DialogInterface.OnKeyListener() {
@Override
public boolean onKey(DialogInterface dialogInterface, int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_UP) {
if (webView.canGoBack()) {
webView.goBack();
}
}
// return true to prevent closing the WebView
return true;
}
});
dialog.show();
}
- (IBAction)showOfferwallAction:(id)sender {
WKWebViewConfiguration* configuration = [[WKWebViewConfiguration alloc] init];
configuration.allowsInlineMediaPlayback = YES;
configuration.allowsAirPlayForMediaPlayback = NO;
WKWebView* webview = [[WKWebView alloc] initWithFrame:self.view.frame configuration:configuration];
[webview setUIDelegate:self];
[webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://webofferwall.tapjoy.com/link/sdk_key/u/user_id"]]];
[self.view addSubview:webview];
}
// Open external browser for window.open() or target = _blank
- (WKWebView *)webView:(WKWebView *)webView
createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration
forNavigationAction:(WKNavigationAction *)navigationAction
windowFeatures:(WKWindowFeatures *)windowFeatures {
NSURL *url = navigationAction.request.URL;
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:^(BOOL success) {
if(!success) {
NSLog(@"Failed to open URL: %@", [url absoluteString]);
}
}];
return nil;
}