Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Step Summary

  1. Enter Debug mode

  2. Use SingleTagConfigurator to append custom data that would otherwise not exist neither in the fake local data or in our prod api.

  3. Initialize normally the single tag implementation

1. Enter Debug Mode

For testing single tag implementation add this before initialization

Code Block
R89SDK.setDebug()

We also recommend adding

Code Block
R89SDK.setLogLevel(LogLevels.DEBUG)

Full Example

Code Block
R89SDK.setDebug()
R89SDK.setLogLevel(LogLevels.DEBUG)

/* <SingleTagConfiguratorCode> */
addCustomSingleTagData()

R89SDK.initialize(
	appContext = this,
	publisherId = "TestRefinery89ID",
	appId = "TestDemoApp",
	singleLine = true,
	initializationEvents = null
)

use SingleTagConfigBuilder to add your own single tag data

Code Block
breakoutModefull-width
fun addCustomSingleTagData()
{
    //Add a Screen that is an UIViewController, the screenName you can get it by logging this in you code ->
    // in viewDidLoad you can use self.name ->
    // on InitialScreenViewController -> InitialScreenViewController
    // on NewsPostDetailScreenViewController -> NewsPostDetailScreenViewController
    
    let screenBuilder = SingleTagConfigBuilder.shared
          .addAdScreenBuilder(isFragment:false,screenName: "InitialScreenViewController")
    
    // Add a banner format to the wrapper with the tag main_activity_bottom_ad_container
    screenBuilder.addBanner(wrapperTag: "banner_tag", 
        getAllWithTag: true, 
        wrapperRelativePositionInside: true, 
        wrapperRelativePositionAfter: false)
        
    /* trigger interstitial when we transition from "InitialScreenViewController" (ScreenBuilder.screenName) TO NewsPostDetailScreenViewController */
    screenbuilder.addInterstitial(eventsToTrackTo: "NewsPostDetailScreenViewController", eventsToTrackButton: nil)
    
    /* trigger an interstitial when a button with this tag is pressed in "InitialScreenViewControllerj" (ScreenBuilder.screenName) */
    screenbuilder.addInterstitial(eventsToTrackTo: nil, eventsToTrackButton: "button_tag")
    
}