GameMonetize.com Implementation Help

This discussion was created from comments split from: GamePix.com Integration Support Help.

Comments

  • pinkio75pinkio75 Member, PRO Posts: 1,217

    Hey anyone have published HTML games on GameMonetize.com

    here the docs about SDK integration:

    Someone can help me? Thanks in advance.

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,223

    Looking here at their HTML5 SDK:

    https://github.com/MonetizeGame/GameMonetize.com-SDK

    Support looks relatively easy. Inside sample-index.html

    Put the config script information just before </head> (filled in with your values, of course).

    Just after

    var playerDelegate = {
    

    and before

    onLoadingBegin: function() {
    

    add the following function:

    onShowBannerShow: function(position) {
      if (typeof sdk !== 'undefined' && sdk.showBanner !== 'undefined') {
        sdk.showBanner();
      }
    },
    


    Hope that helps!

  • pinkio75pinkio75 Member, PRO Posts: 1,217
    edited December 2021

    @uptimistik @adriangomez @adent42

    someone in the spare time could make this?

    I need just for Advertisement launch.

    Thanks in advance.

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,223

    @pinkio75

    I had some spare time waiting for a meeting this morning, so here's the completed index.html file, though I haven't tested it yet:

    https://gist.github.com/tant42/3a3986f7b913dbe170f770e21eb3c874

    I did have to make a change for something I missed in the docs. I added the pause and resume functions to the events required in the configuration and moved the configuration block to the bottom of the page.

    All you should need to do is set

    var GAMEMONETIZE_GAME_ID = "your_game_id_here";
    

    When you invoke the Banner Ad action, it will show an ad. If you'd like it to work with interstitials as well (or if it doesn't work), let us know!

  • pinkio75pinkio75 Member, PRO Posts: 1,217

    @adent42 Not working.

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,223
    edited December 2021

    I've updated the gist with a fix and an enhancement.

    First, in a copy/paste error, I repeated the pause function when the ad network wanted the game to unpause, meaning if the ads were shown, the game would be stuck on pause.

    Second, I added support for interstitial ads since, despite the API call being showBanner, the ads they show are really interstitials and that's what I think @pinkio75 is expecting in his game as well.

    Finally, a testing note. Be sure to disable ad block while testing. Adblock blocks their ads and that threw me off for a little bit during testing.

  • pinkio75pinkio75 Member, PRO Posts: 1,217
    edited December 2021

    Ok thank you @adent42 the game is in waiting for review now.

  • pinkio75pinkio75 Member, PRO Posts: 1,217

    Hy GS community, my games are live on Game Monetize with their SDK! thanks for this to @adent42

  • wonghammerwonghammer Member Posts: 1

    Wow, that's awesome! Seeing the community help each other get their games monetized is so cool. Big shoutout to @adent42 for being a lifesaver! Makes you wanna jump in and try my games:https://games-hub.top/.

Sign In or Register to comment.