Y8.com integration help.

adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 2,652
edited June 2021 in Help Wanted

@pinkio75 was looking for help integrating ads from the y8.com platform, specifically: https://www.y8.com/revshare


It's an HTML5 arcade with a few services, including in-game ads and your standard bevy of game services. I'd love to do a fuller implementation but I'm busy with another project at the moment.


I figure this might be a good chance to have the community help out with this for the benefit of all and to get @pinkio75 what he needs faster (as well as have a new target for others).


I created an untested first pass here:

https://gist.github.com/tant42/dbf38c49e30a63952570b68dd336c5be

Documentation is here:

https://docs.y8.com/

If anyone of you javascript heads want to help out by implementing more of the services, please fork the gist and let me know here so I can merge it when you're done!


Once I have more time, I'll probably implement more of the platform features and check it into a proper github project that will be a repository to support even more services.

«1

Comments

  • pinkio75pinkio75 Member, PRO Posts: 1,171
    edited June 2021

    Thank you @adent42for reply and support.

    i'm joined to Y8 rev share platform and i've a poor result with non in game ADV; so for me and for everyone here that wants earn with html5 games it could be good chance.

    Honestly i'd like if GS added this kind of services in an easier way anyway thanks to anyone could help.

  • adriangomezadriangomez Member, PRO Posts: 389

    Just what I need a fun and light project for the weekend.

  • adriangomezadriangomez Member, PRO Posts: 389

    Implemented:

    -- Show Achievements.

    -- Show Leaderboard.

    -- Update Achievements.

    -- Update Leaderboard.

    They all use the behaviors in GameSalad:

    --Service - Show Achievements

    --Service - Show Leaderboard

    --Service - Update Achievements

    --Service - Post Score

    There is a section of "let" constants that you can modify to adjust the behavior of the script.

    https://gist.github.com/agramonte/d29d3ebd0d73beaa0f720063e0ade8f2

  • pinkio75pinkio75 Member, PRO Posts: 1,171

    Thanks @adriangomez but i can add the ADV? i just need to implement the interstitial ADV inside the games.

    and what exactly i need to do for each games? i just insert my app id? and where is my app id?

    I'm sorry I'm just a beginner with this kind of thing ...

    a video tutorial just to add ads would be greatly appreciated; leaderboards etc don't interest me.

    Thanks in advance.

  • adriangomezadriangomez Member, PRO Posts: 389
    edited June 2021

    The ads implementation was already in.@adent42's version. If using @adent42's version just replace your appId where ever you see appId (I believe 2 places). If you are using my version just replace the appid at the top of the javascript where it says "APPID". In both versions on the switch of the scene inside the GameSalad creator make sure you select ads and interstitial. Nothing more to do.

    That being said don't expect it to work right away. I only have 1 app up there and I can see in the response that it says my app is not approved for ads. Sent them a note and have not heard back. Sorry I currently don't have a machine that I can do videos on.

  • adriangomezadriangomez Member, PRO Posts: 389

    Added the GameSalad behaviors:

    -- Load Attribute

    -- Save Attribute

    Using Y8:

    -- Online Save

  • pinkio75pinkio75 Member, PRO Posts: 1,171
    edited June 2021

    Thanks but both .html file not working... i've add just my app ID, i get it from y8, into the html files and i launch the game in my ftp but ADV not showing; i've the interstitials and banner selected in the Creator.

    With @adent42 html file the game not working, the game is stuck in a black page, with @adriangomez html file the game working fine but not showing ADV.

    Thanks again but these html file not working.

  • adriangomezadriangomez Member, PRO Posts: 389

    Unfortunately, @adent42 and I can only do so much to make it easy. That is the beauty of GameSalad that it hides so much of the complexity, but once you export it and try to integrate an external service all bets are off. I double-checked my script and I am fairly sure it is correct based on the documentation provided by Y8 and my testing.

    The first step you need to do is get yourself familiar with the debug tools on the browser. Load your game on the browser where you are hosting it. Then launch the development tools. On chrome, it is under the three dots (menu) on the right top side and then select "more tools". In other browsers and versions, it will vary. In the tabs called console and network (under response) you should see any errors and responses from Y8. There are some great youtube videos to get you started if this sounds cryptic to you.

    When I was testing I saw two particular errors from Y8. The first one would say that the app URL was misconfigured. Going to the admin portal and making sure that my url path matched exactly what was in the configuration portal fixed that issue. The second error I saw in the response from Y8 stated that my app was not approved for advertisement. I have a ticket open and have not heard back. Not saying these are the issues you have but it is the type of errors you will get back in the console.

    As far as Banner ads, I have not seen any documentation that they support banner ads. Just interstitials. Hope this helps and let me know if you have any other questions.

  • pinkio75pinkio75 Member, PRO Posts: 1,171
    edited June 2021

    @adriangomez thanks for your suggestion;

    however I just using the advertising outside the game which does not use of their sdk because I am not able to perform all these changes.

    patience in addition to not being able I do not even have the time; however it is a shame not to be able to integrate external services as easily as we do for our apps...

    I say unfortunately because people make money out there with html5 games.

    Thanks again.

  • adriangomezadriangomez Member, PRO Posts: 389

    @pinkio75 Is your game somewhere I can reach it with my version of the script? I can take a look on my browser and see if there is something obvious. If you are not using anything else from the SDK can you use other ad providers?

  • pinkio75pinkio75 Member, PRO Posts: 1,171

    @adriangomez i send you my id from one of my games you can test with it check message please.

  • adriangomezadriangomez Member, PRO Posts: 389
    edited June 2021

    @pinkio75 that doesn't look like the correct Id. It should be alpha numeric and can be found on this page:

    For example, mine starts with 60bbd and it is over 12 characters long.

    ----

    Edit: Just tried and it and as expected:


  • pinkio75pinkio75 Member, PRO Posts: 1,171
    edited June 2021

    ok i recontact Y8 and there are 2 id! one is numeric and the second is generated by dashboard... i send you the direct dev contact about y8.

  • adriangomezadriangomez Member, PRO Posts: 389

    I don't plan to release anything in the Y8 portal. I am just doing this for the community and because it is fun for me while I am not working on my own games and apps. You should speak to him about the error I posted above for your id.

  • BaguvixBaguvix Member Posts: 53

    Hi @pinkio75 , did you manage to get this working?

    I decided to give it it a try and got the same results as you had previously stated.

    With @adriangomez version, I got the following error on the console when trying to show ads with change scene behavior:

    Also, isn't APPID misspelled on line 193?

    Thanks!

  • adriangomezadriangomez Member, PRO Posts: 389

    No, that line appears correct at least for my script:

    ID.ads.init(AAPID);

    References this:

    let APPID = 'my appId';

    I have not tried it in a while but I was able to log in and show leaderboards. Maybe this weekend, I finish up the calls I have not implemented and put it up somewhere.

  • pinkio75pinkio75 Member, PRO Posts: 1,171
    edited July 2021

    Hi, Yes but there is a lot of thing to do to have interstitials ADV.

    I've speak with one Y8 Coder and he managed all files to implement advertisements.

    Unfortunately, we found that only GS's "Change Scene" behavior triggers interstitial advertising; indeed, to avoid a block of the game he had to put a delay of about 1 second...

    Having said that you have to create just one ID on the Y8 site; (is the same for all games) and you need another ID number for each game; (y8 will give you these other numbers you cannot generate them!)

    I mean for now I have given up on adding advertisements inside the games and I am using external advertisements.

    However, I notice that the earn are very poor; for example with about 60 published games I just make a 1$ per day.

    Anyway try contact directly Ankit of y8; he could add you in the revenue share partnership more details here: https://www.y8.com/revshare

  • BaguvixBaguvix Member Posts: 53

    @pinkio75 , thank you for all the information

    I believe the 2 ids you mentioned are App ID and Game ID, right? App id is generated on the applications page. So Game ID is the one Y8 generates for you? The only way to generate it is by contacting Y8?

    And what html version are you using? adent's, adrian's or a new one? Both versions have a space for app id, but I see a space for game id only on adent's file, so I wonder which version got it working

    I'll also contact Ankit for more information, thanks!

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 2,652

    @Baguvix I'd use @adriangomez 's version. Mine was just a starter and adrian picked it up and did all the real heavy lifting (also I didn't test mine, I just wrote it based off spec).

  • pinkio75pinkio75 Member, PRO Posts: 1,171
    edited July 2021

    Yes y8 have send me the second ids; so you need to contact Ankit and subscribe for revenue share partnership.

    After Ankit have send me a contact of y8 coder on skype and he have modified all the files, honestly i don't know what file he used...after add other files to use interstitials adv but the adv works only if we use "change scene" with interstitial.

    You need to contact them to enable Adv or you can use the external Adv like me without SDK!


  • BaguvixBaguvix Member Posts: 53

    @pinkio75 I've been talking to Ankit and the Y8 dev and we finally got it working. Here's what to do:

    1- Use the index file I'm attaching

    2- Place the attached y8Api.js file in your game "js" folder. Open it and put your app id and game id in the 2 appropriate places.

    3- Use "change scene" behavior with interstitial ads to trigger the in-game ad

    When you are testing the implementation, ads may not show for 2 reasons:

    1- There are none available at the moment

    2- You must give a minimum 3-minute interval between ads

    Just keep that in mind, so you don't think it isn't working

    @adriangomez feel free to expand it to use the other services or to debug why ads weren't showing in your version. Using each additional service (online saves, achievements, ...) gives a 5% revenue bonus to the developer, so it would be awesome to have a full implementation.

    Hope this helps :)

  • pinkio75pinkio75 Member, PRO Posts: 1,171

    Thank you @Baguvix for reply!

    So we need just to add the 2 id in the JS files and use the same smaple-index.html file for all games to have the Adv on y8?

    Great! yes but "change scene" is necessary to have interstitials.

    I will try for sure i put interstitials on my best games to increase earns.

  • BaguvixBaguvix Member Posts: 53

    @pinkio75 Yes, you can use the same files for all games, just replace your ids in the js file.

    Change scene is the only way to trigger the ad, so if your game doesn't use it you will have to conveniently add it wherever you want an ad to show

  • pinkio75pinkio75 Member, PRO Posts: 1,171

    Yes the "change scene" behavior is the only way to trigger On the interstitials ADV; so we need to switch "reset scene" or "reset game" in to "change scene".

  • pinkio75pinkio75 Member, PRO Posts: 1,171

    Hi @adent42 and @Baguvix

    toady i've try to update 2 games on y8 but the interstitial command is not triggering by "change scene" behavior as in the past.

    I spoke with y8 coder and he told me that the issue is probably in GS side...

    Anyone can help me?

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 2,652

    Can you post a link to the game so we can see if there are any errors in the console?

  • pinkio75pinkio75 Member, PRO Posts: 1,171
    edited November 2021

    Hi GS,

    M.Gani from y8 have fix the issue about Interstitials ADV so if if the old sample-index.html not working try this new one:

    It works really fine for me and ADV are present between scenes like interstitial adv.

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 2,652

    So this code will show an ad every scene transition after the first one.

Sign In or Register to comment.