The GamePix game SDK provides a series of utility methods needed for running your game in the GamePix ecosystem.
They enhance the user experience of your game and complete the integration with our ads network and revenues system.
Using GDevelop extension import:

This SDK provides a set of actions and conditions to display advertising on the GamePix publishing platform. You can use them without initialisation (initialisation is handled by the extension itself). If you run your build locally, you will get a warning that the GamePix player is not found, don't worry, it's OK, it means you are using the test SDK, which is ideal for debugging.
Let's declare function that handles key events and run Interstitial Ad.
Events sheet for the interstitial ad:
Events sheet for the reward ad:
IMPORTANT: As a rule on the GamePix platform, you must pause the game and sound effects before displaying an ad and resume them after the ad is closed. Unfortunately, GDevelop 5 does not handle this automatically. Therefore, you should utilize the built-in Time Scale and Pause the sound/music of channel actions. Simply set the time scale to 0 before the Show the interstitial ad action, and then set it back to 1 when the ad is closed. Same for sound/music.

The "Language" expression can be used to retrieve the preferred language on the GamePix platform. It will only be available after the SDK has been initialised.
The "GamePix SDK is being initialised" condition can be used to check the status of SDK initialisation. It is set to true immediately after successful initialisation.
Events sheet example of GamePix SDK integration:

GamePix SDK provides following javascript API:
gdjs._gamePixSdkExtension.lang() - gets the current preferred language by the playergdjs._gamePixSdkExtension().langSync() - same as lang(), but will return null if SDK is not yet initializedgdjs._gamePixSdkExtension.updateScore(score) - should be called immediately every time the current score is updatedgdjs._gamePixSdkExtension.updateLevel(level) - should be called to send the score after the player passed the levelgdjs._gamePixSdkExtension.happyMoment() - should be called when "Happy Moment" just happenedgdjs._gamePixSdkExtension.setItem(key, value) - persistently stores the value. The value must be a stringgdjs._gamePixSdkExtension.getItem(key) - read value from storagegdjs._gamePixSdkExtension.getItemSync(key) - same as getItem(), but will return null if SDK is not yet initialized