SUMMARY
SDK and DIV definition
Setting up the SDK and DIV
Advanced SDK Settings
Setting up the SDK and DIV tag for a series of operations
How to create a series of operations ?
Integration tips
SDK and DIV definition
The SDK and DIV tag enable a game to be installed on a website.
2. Setting up the SDK and DIV
You'll need to go to the diffusion tab of your operation to retrieve the information:
The SDK must be installed only once, anywhere on your page. It is usually integrated with the other scripts, in the header or footer.
The DIV tag is like a box that displays your game. You need to paste the div code where you want to display your game on your page.
Each operation has a unique SDK ID. In other words, the div tag will be different from one operation to another. Each time you install an operation, you'll need to modify the div tag.
3. Advanced SDK Settings
You can add specific options to your SDK and DIV.
Pre-fill form fields with your customers' data:
If they are logged in to your site, you can retrieve their information to pre-fill the form:
1 - Activate the auto-pass settings for the form in your operation.
2 - Use the SDK for the relevant operation.
3 - Insert the following code just before </script>: kx(‘formAutoFill’,
4 - Insert all the field names you want to pre-fill, followed by the variables you use on your site (in place of the bolded names):
{
“email”:“email variable”,
‘lastname’:“last name variable”,
“firstname”:“first name variable”,
});
Example of SDK with advanced settings:
<head>
<!-- Start of Kimple SDK script -->
<script type="text/javascript">(function(){window.kx=window.kx || function(){(kx.q=kx.q||[]).push(arguments)};kx.l = +new Date;var k=document.createElement(‘script’);k.id=‘k-jssdk’; k.type=‘text/javascript’;k.async=true;k.src=‘https://kimple.co/sdk.js’;var s=document.getElementsByTagName(‘script’)[0];if(document.getElementById(k.id)){return;}s.parentNode.insertBefore(k,s);})();</script>
<!-- End of Kimple SDK script -->
<script>
kx(‘formAutoFill’, {
“email”:“client variable”,
“lastname”:“client variable”,
“firstname”: “client variable”
“extend_k6eWWHAQ”: “client variable”
});
</script>
</head>
You can find the list of fields supported by autocomplete ➡️ here
4. Setting up the SDK and DIV tag for a series of operations
To facilitate the integration of multiple operations, you can generate a unique ID on the "Operation series" page, allowing you to integrate the tag only once. Operations will be displayed according to publication dates.
The ID will be associated with the operations you select when creating this series of operations. Simply incorporate the ID into the integration tag.
5. How to create a series of operations ?
To generate a unique ID, follow these steps:
Go to the operations tab
Go to the "Operation series" section
Click on "Create an operation series"
Example :
Once the ID has been created, you can copy the sdk code and div tag provided in the integration section and paste it into the HTML page of the site on which the game is displayed.
Don't forget to add the series ID created in the integration tag
*Note that you can add operations in progress to previously created series of operations.
6. Integration tips
To ensure that your game is correctly integrated into a blank site, we recommend that you integrate it as follows :
------------------------------------------- START OF CODE -------------------------------
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- meta viewport, indispensable pour avoir un rendu correct sur mobile -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>
Le titre de votre site
</title>
<style type="text/css">
/* Centrer le jeu */
.k-contest { margin:auto; }
</style>
<!-- Intégration du SDK -->
<!-- Start of Kimple SDK script --><script type="text/javascript">(function(){window.kx=window.kx || function(){(kx.q=kx.q||[]).push(arguments)};kx.l = +new Date;var k=document.createElement('script');k.id='k-jssdk';k.type='text/javascript';k.async=true;k.src='https://kimple.co/sdk.js';var s=document.getElementsByTagName('script')[0];if(document.getElementById(k.id)){return;}s.parentNode.insertBefore(k,s);})();</script><!-- End of Kimple SDK script -->
</head>
<body>
<!-- Intégration de la div-->
<div class="k-contest" data-id="P0k1hQJ" data-layout="responsive"></div>
</body>
</html>
------------------------------------------- END OF CODE -------------------------------
