iGaming preparations
iGaming preparations cover the standard set of tasks necessary to make your site ready for the Frosmo Platform.
To prepare your site:
Adding the Frosmo scripts to your site
To integrate the Frosmo Platform with your site, add the two <script>
elements provided by Frosmo to every page of the site. The following code snippet shows an example where the <script>
elements have been added at the end of the <head>
element in the page source code.
<!-- Load the Frosmo Platform -->
<script type="text/javascript" charset="utf-8" src="//d2wzl9lnvjz3bh.cloudfront.net/frosmo.easy.js" async></script>
<script type="text/javascript" charset="utf-8" src="//d2wzl9lnvjz3bh.cloudfront.net/sites/company_com.js" async></script>
</head>
The first element loads the Frosmo Core library (frosmo.easy.js
). The second element loads the Frosmo custom script (<site_origin>.js
).
For instructions on how to add the elements to your site, see Adding the Frosmo scripts to your site.
If your site has content inside <iframe>
elements whose origin differs from that of the containing page, and if you want the Frosmo Platform to track and personalize that content, add the Frosmo scripts also inside the <iframe>
elements.
For more information about the Frosmo scripts, see Technical overview.
Setting up the events for game and visitor tracking
The iGaming setup uses specific events for collecting game and visitor data on a site. Check that your site sends the correct events from the appropriate pages. For example, on a page where visitors can launch a game, always send a gamePlay
event for the game when it's launched.
You set up the primary events as part of the iGaming preparations. You can set up additional events and metadata as an additional setup task. If you have questions about the events or their setup that this guide does not answer, contact Frosmo support.
For more information about data tracking in the Frosmo Platform, see Data tracking solutions.
iGaming events
If your site already has events set up that provide the same data as the Frosmo iGaming events, the Frosmo Platform can use the existing events. You do not need to create duplicate events. For example, if your site already sends the necessary data in GA4 events, the Frosmo Platform can capture those events.
The iGaming events are conceptually similar to Google's Universal Analytics (UA) Enhanced Ecommerce events and Google Analytics 4 ecommerce events.
The following table describes the primary iGaming events supported by the Frosmo Platform. The table also provides data layer push templates for sending the events. For more information about the event data, see iGaming event data.
Event | Description | Data layer push |
---|---|---|
Game impressions | The visitor saw one or more games but did not launch any. Example: The visitor opened a game category page, or the visitor searched for games and viewed the search results, which listed a number of games from different categories. This event tells the platform which games a visitor sees on a game category or search page. note The platform treats this event as an item list view. |
|
Game launch | The visitor launched a game. Example: The visitor selected a game from a category page or from search results, launching the game. This event allows the platform to track which games visitors play the most. This, in turn, allows the platform to recommend (a) the most popular games and (b) similar or otherwise related games, where visitors who played game A also played games B, C, and so on. This event also allows the platform to collect game data, which is a prerequisite for generating game recommendations. note The platform treats this event as an item view. |
|
Deposit | The visitor completed a deposit. Example: The visitor transferred money from their bank account to their digital wallet on your site. This event allows the platform to track when and how much money registered visitors reserve for gaming on the site. This, in turn, allows the platform to drive those visitors to spend that money accordingly. If you cannot or prefer not to provide the amount of money deposited, send the event with note If you cannot provide a deposit event but have another mechanism available for tracking deposits, the Frosmo Platform can use that mechanism. However, using a mechanism other than a deposit event must be separately agreed and planned with Frosmo. |
|
iGaming event data
The following tables describe the supported data for the iGaming events.
Property | Description | Example |
---|---|---|
| Event type. The possible values are:
|
|
| Amount of money deposited. If you cannot or prefer not to provide the amount, set this property to an empty value. note This property is only valid for |
|
| Payment method the visitor used to make the deposit. note This property is only valid for |
|
| List of games included in the event. The list is an array of game data objects. Each object contains the details of a single game. note This property is only valid for |
|
The following table describes the game data object. The object contains the details of a single game.
Property | Description | Example |
---|---|---|
| Game ID. note The ID of a given game must be consistent across the events. For example, the game impression and game launch events for the same game must use the same game ID. |
|
| Game category. Define a hierarchy of parent and child categories as a breadcrumb using info Depending on the terminology used on your site, the category might be tracked as, for example, "theme" or "type". |
|
| Game image URL. |
|
| Game launch URL. |
|
| Game name. note This is a complimentary property. |
|
| Brand or company that develops or provides the game. note This is a complimentary property. |
|
If you want to send more game data to the platform, use a game data feed. If you cannot use a feed, consult with Frosmo about a custom solution for sending the data directly from the site.
Updating a Content Security Policy to allow Frosmo content and scripts
The Frosmo Platform uses scripts to both inject content to your site and collect data from the site. If the site uses a Content Security Policy (CSP) to control where resources can be loaded, you must update the policy to allow Frosmo content sources. Otherwise, the platform will not function on your site.
Frosmo content sources
The exact content sources you need to allow depend on the Frosmo Platform region where your site is hosted. The following table lists the sources by region.
Region | Content sources |
---|---|
Asia |
|
EU |
|
EU2 |
|
Finland |
|
US |
|
To find out your region, see the FAQ.
Affected policy directives
You must update the following policy directives, if used on the site, to include the Frosmo content sources for your platform region:
-
connect-src
-
default-src
-
frame-src
-
img-src
-
script-src
-
style-src
The exact set of directives that you need to update depends on what's defined in the site's CSP configuration. For example, if the CSP only defines the default-src
directive, update only that directive to include the Frosmo content sources. Do not define additional directives just for Frosmo content. By comparison, if the CSP defines all six directives listed above, update all of them to include the Frosmo sources.
Example policy
You can define a CSP either with the Content-Security-Policy
HTTP response header, which you set in your web server configuration, or with the HTML <meta>
element, which you define directly on a web page. The HTTP response header is the recommended approach.
The following CSP configuration examples show you how to allow Frosmo content on a site hosted in the EU region. The examples include both the original configuration without Frosmo content sources and the updated configuration with Frosmo sources.
# Original CSP
Content-Security-Policy: default-src 'self';
script-src 'self' app.company.com;
# CSP updated for Frosmo content
Content-Security-Policy: default-src 'self' inpref.com *.inpref.com https://d2wzl9lnvjz3bh.cloudfront.net;
script-src 'self' app.company.com inpref.com *.inpref.com https://d2wzl9lnvjz3bh.cloudfront.net;
<!-- Original CSP -->
<meta
http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self' app.company.com;"
/>
<!-- CSP updated for Frosmo content -->
<meta
http-equiv="Content-Security-Policy"
content="default-src 'self' inpref.com *.inpref.com https://d2wzl9lnvjz3bh.cloudfront.net; script-src 'self' app.company.com inpref.com *.inpref.com https://d2wzl9lnvjz3bh.cloudfront.net;"
/>
Where to go next
-
Learn how to further integrate your iGaming site with the Frosmo Platform.
-
Learn about best practices for getting the most out of the integration between your site and the Frosmo Platform.
-
Learn how to get started with developing your site with the Frosmo Platform, starting with how to log in to the Frosmo Control Panel.
-
Learn about how to further set up the Frosmo Platform for your organization and site.
-
Explore the documentation to learn even more about the Frosmo Platform and what you can do with it.