Unity3D

Contents

  • 1 POKKT SDK v8.1.0 (GDPR Compliance) Unity3d

  • 2 Integration Guide v8.1.0

    • 2.1 Overview

    • 2.2 Implementation Steps

      • 2.2.1 SDK Configuration

      • 2.2.2 Ad Types

        • 2.2.2.1 FullScreen Ads

        • 2.2.2.2 Banner

        • 2.2.2.3 IGA (In Game Ad)

          • 2.2.2.3.1 Types of Ads:

          • 2.2.2.3.2 How to use InGame Ad Units:

          • 2.2.2.3.3 Note:

    • 2.3 Additional SDK Configuration

      • 2.3.1 GDPR

      • 2.3.2 ThirdPartyUser Id

      • 2.3.3 Pokkt ad player configuration

      • 2.3.4 User Details

      • 2.3.5 iOS Framework and build settings configuration

Last Update: 10th December, 2021

Download Latest Version Here.


Integration Guide v8.1.0

Overview

Thank you for choosing Pokkt SDKfor Unity. This document contains all the information required to set up the SDK with your project. We also support mediation for various third party networks. To know the supported third party networks and their integration process go to mediation section .

You can download our SDK from pokkt.com

We will be referencing PokktAds Demo( Sample App ) provided inside the SDK downloaded above during the course of explanation in this document. We suggest you go through the sample app for better understanding.


Implementation Steps

SDK Configuration

  1. Set Application Id and Security key in Pokkt SDK. You can get it from the Pokkt dashboard from your account. We generally assign unique application-id and security-key.

  2. When your application is under development and if you want to see Pokkt logs and other informatory messages, you can enable it by setting ShouldDebug to true . Make sure to disable debugging before release.

Ad Types

FullScreen Ads

  1. Full-screen ads can be rewarded or non-rewarded and video or interstitial. You can either cache the ad in advance or directly call show for it.

  2. We suggest you cache the ad in advance so as to give seamless play behaviour, In other case it will stream the video which may lead to unnecessary buffering delays depending on the network connection.

  3. ScreenId: ​This one parameter is accepted by almost all API’s of Pokkt SDK. This controls the placement of ads and can be created on Pokkt Dashboard. We will be referencing the ​PokktAds Demo ​app provided with SDK during the course of explanation in this document. We suggest you go through the sample app for better understanding.

  4. To cache Full-screen ad call:

  5. To Show Video Ad:

    You can check if an ad is available, before making a show request.

  6. Ad actions are optional, but we suggest to implement them as it will help you to keep track of the status of your ad request.

There are two ways to load banners:

  1. Load banner

    There are predefined positions for banner positioning inside BannerPosition( Com. Pokkt.Plugin.Common.BannerPosition ) .

    TOP_LEFT. TOP_CENTER. TOP_RIGHT. MIDDLE_LEFT. MIDDLE_CENTER. MIDDLE_RIGHT. BOTTOM_LEFT. BOTTOM_CENTER. BOTTOM_RIGHT.

  2. Load banner with rect

    Height : Custom height for banner. Width: Custom width for banner. x: Point x on screen to show banner. y: Point y on screen to show banner.

  3. You can remove Banner using:

IGA (In Game Ad)

Introducing a new way to monetize the game. Currently it works only for Android but soon will be available for iOS. Using Pokkt IGA (In-Game Ads) you can use your in-game objects to display ads. Pokkt IGA use a less intrusive way to achieve this. Refer our sample for a better understanding. Our existing SDK + Unity Plugin has this feature from version 6.0.

Types of Ads:

We support three different types of Ad:

  1. Banner Ads: These are image-based advertisements that can be placed anywhere in your game.

  2. Hoarding Ads: These are also image-based advertisements but larger in size as compared to the banners. These can also be placed anywhere in your game but we suggest you to place them in game objects like hoarding, as these are large and serves better purpose there.

  3. Floating Ads: This Ad Unit itself consists of two image sources unlike its counterparts.

    • Icon: It shows a small interactive image of the size of standard icons. On clicking on this icon it will open a full screen image

    • Full Screen Image: It shows a full screen image with close button on its top right corner. The content of this image will further describe what that icon was about. This image has a “click through” assigned to it which will take the user to browser for further action or interaction if user wish to.

How to use InGame Ad Units:

  1. Banner Ads:

    • Using Pokkt Menu: Select your game object on which you want to add banner as highlighted in below image. We suggest to use “Quad” as “GameObject” as placement for banner although it’s not mandatory.

      Error creating thumbnail: File missing

      As a result of above step “Pokkt IGA Container” script gets attached to your “GameObject” with “Banner” selected as AdType. You can assign “Player Camera” also if required but it’s optional.

      Error creating thumbnail: File missing

    • Programmatically:

  2. Hoarding Ads:

    • Using Pokkt Menu: Select your game object on which you want to add banner as highlighted in below image. We suggest to use “Quad” as “GameObject” as placement for hoarding although it’s not mandatory.

      Error creating thumbnail: File missing

      As a result of above step “Pokkt IGA Container” script gets attached to your “GameObject” with “Hoarding” selected as AdType. You can assign “Player Camera” also if required but it’s optional.

      Error creating thumbnail: File missing

    • Programmatically:

  3. Floating Ads:

    • Using Pokkt Menu: Select your game object on which you want to add Floating Unit as highlighted in below image. We highly recommend you to add “ Button” as '“GameObject” as placement for floating unit.

      Error creating thumbnail: File missing

      As a result of above step “Pokkt IGA Container” script gets attached to your “GameObject” with “Floating Unit” selected as AdType. You can assign “Player Camera” also if required but it’s optional.

      Error creating thumbnail: File missing

    • Programmatically:

IGA Collectibles and Boosts can only be assigned programmatically. Collectibles are in-game objects that a player collects during a gameplay, for example “Coins”, “Gems” etc. Boosts are collectibles with instant bonuses, powerups can be put in this category. Collectibles and Boosts are smaller textures compared to IGA Banners and hoardings.

Note:

You still need to set your App ID and Security Key before you can fetch IGA Assets. To fetch assets call:

Additional SDK Configuration

As of May 25th, the General Data Protection Regulation (GDPR) will be enforced in the European Union. Set GDPR consent in Pokkt SDK. This must be called before calling any ad related API. Developers/Publishers must get the consent of the user. For more information on GDPR please refer https://www.eugdpr.org/arrow-up-right and https://www.eugdpr.org/gdpr-faqs.htmlarrow-up-right. This API can again be used by publishers to revoke the consent. If this API is not called or invalid data provided then SDK will access the users personal data for ad targeting

ThirdPartyUser Id

If you are using server to server integration with Pokkt, you can also set Third Party UserId in PokktAds.

Pokkt ad player configuration

Pokkt Ad player works the way App is configured at Pokkt dashboard, but we provide a way to override those settings using PokktAdPlayerViewConfig.

Application should prefer configuration provided through code by developer or what’s configured for the app in dashboard, can be controlled any time through the dashboard itself. If you want to make changes to this configuration after your app distribution, you can contact Pokkt Teamto do the same for your app through admin console.

Various properties that can be managed through this are:

  1. Back button Defines if user is allowed to close the Advertisement by clicking on back button or not. Property Name: BackButtonDisabled Values: True = Back button is disabled and user cannot close the Ad. False = Back button is not disabled and user can close the Ad.

  2. Default skip time Defines the time after which user can skip the Ad. Property name:DefaultSkipTime Values: Any Integer value. Default value is 10 seconds.

  3. Should allow skip Defines if user is allowed to skip the Ad or not. Property name:ShouldAllowSkip Values: True = User can skip Ad. False = User can’t skip Ad.

  4. Should allow mute Defines if user is allowed to mute the Video Ad or not. Property name:ShouldAllowMute Values: True = User can mute video Ad. False = User can’t mute video Ad.

  5. Should confirm skip Defines if confirmation dialog is to be shown before skipping the Ad. Property name:ShouldConfirmSkip Values: True = Confirmation dialog will be shown before skipping the video. False = Confirmation dialog will not be shown before skipping the video.

  6. Skip confirmation message Defines what confirmation message to be shown in skip dialog. Property name:SkipConfirmMessage Values: Any String message. Default value is “Skipping this video will earn you NO rewards. Are you sure?”.

  7. Affirmative label for skip dialog Defines what should be the label for affirmative button in skip dialog. Property name:SkipConfirmYesLabel Values: Any String message. Default value is “Yes”.

  8. Negative label for skip dialog Defines what should be the label for affirmative button in skip dialog. Property name:SkipConfirmNoLabel Values: Any String message. Default value is “No”.

  9. Skip timer message Defines message to be shown before enabling skip button. Don’t forget to add placeholder “ ## ” in your custom message. This placeholder is replaced by property “Default skip time” assigned above. Property name:SkipTimerMessage Values: Any String message. Default value is “You can skip video in ## seconds”

  10. Incentive message Defines message to be shown during video progress, that after what time user will be incentivised. Property name:IncentiveMessage Values: Any String message Default value is “more seconds only for your reward !”

  11. Should collect feedback Defines message to be shown during video progress, that after what time user will be incentivised. Property name:setShouldCollectFeedback Values: True = If you want to collect feedback from the user for the Ad. False = If you don’t want to collect feedback from the user for the Ad.

  12. Audio Enabled Provides a medium to disable audio for video ad without user interaction. Property name:IsAudioEnabled Values: True = If you want to play audio for video ad. False = If you don’t want to play audio for video ad.

User Details

For better targeting of ads you can also provide user details to our SDK using.

iOS Framework and build settings configuration

The iOS frameworks required are shown below:

Error creating thumbnail: File missing

Also, please change your project settings to use the New Build System when creating iOS build. For other iOS build related configurations, please follow the iOS documentation for POKKT SDK.

Last updated