Skip to main content

iGaming preparations

iGaming preparations cover the standard set of tasks necessary to make your site ready for the Frosmo Platform.

To prepare your site:

  1. Add the Frosmo scripts to the site.

  2. Set up the events for game and visitor tracking.

  3. If the site uses a Content Security Policy (CSP), update the policy to allow Frosmo content and scripts.

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.

note

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

note

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.

tip

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.

iGaming events
EventDescriptionData 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.

dataLayer.push({
event: 'gameImpressions',
products: [{
gameId: 'Game ID',
category: 'Category/Subcategory',
image: 'https://vendor.gameimage.url',
launchUrl: 'https://vendor.gamelaunch.url'
name: 'Game Name',
vendor: 'Vendor',
}]
});

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.

dataLayer.push({
event: 'gamePlay',
products: [{
gameId: 'Game ID',
category: 'Category/Subcategory',
image: 'https://vendor.gameimage.url',
launchUrl: 'https://vendor.gamelaunch.url'
name: 'Game Name',
vendor: 'Vendor',
}]
});

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 amount set to an empty value. The event provides the platform with valuable information even without the amount.

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.

dataLayer.push({
event: 'deposit',
amount: '123.45',
option: 'Payment Method'
});

iGaming event data

The following tables describe the supported data for the iGaming events.

iGaming event data
PropertyDescriptionExample

event

Event type.

The possible values are:

  • Game impressions: gameImpressions

  • Game launch: gamePlay

  • Deposit: deposit

event: 'gamePlay'

amount

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 deposit events.

amount: '123.45'

option

Payment method the visitor used to make the deposit.

note

This property is only valid for deposit events.

option: 'Payment Method'

products

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 gameImpressions and gamePlay events.

products: [{
gameId: '123',
category: 'Slots/Themed',
image: '/images/products/agent-jane-blonde-returns.webp',
launchUrl: 'https://entnet.com/games/123/launch'
name: 'Agent Jane Blonde Returns',
vendor: 'EntNet',
}]

The following table describes the game data object. The object contains the details of a single game.

Game data object
PropertyDescriptionExample

gameId

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.

gameId: '123'

category

Game category.

Define a hierarchy of parent and child categories as a breadcrumb using / as the separator. For example: Jackpots/Slot Jackpots

info

Depending on the terminology used on your site, the category might be tracked as, for example, "theme" or "type".

category: 'Slots/Themed'

image

Game image URL.

image: '/images/products/agent-jane-blonde-returns.webp'

launchUrl

Game launch URL.

launchUrl: 'https://entnet.com/games/123/launch'

name

Game name.

note

This is a complimentary property.

name: 'Agent Jane Blonde Returns'

vendor

Brand or company that develops or provides the game.

note

This is a complimentary property.

vendor: 'EntNet'
note

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.

Frosmo content sources to allow in a CSP
RegionContent sources

Asia

asia.frosmo.com *.asia.frosmo.com dk0tzorg7uge9.cloudfront.net

EU

inpref.com *.inpref.com d2wzl9lnvjz3bh.cloudfront.net

EU2

eu2.frosmo.com *.eu2.frosmo.com d1225795gabrip.cloudfront.net

Finland

fi1.frosmo.com *.fi1.frosmo.com d2oarllo6tn86.cloudfront.net

US

us.frosmo.com *.us.frosmo.com d22j8luu453d90.cloudfront.net

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.

Example: CSP for EU site using HTTP response header
# 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;
Example: CSP for EU site using <meta> element
<!-- 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