# Game payments

The [AdSense code](https://support.google.com/adsense/answer/9955214) should be
placed in the same document as the game (the document with the code that renders
the game and the canvas element if one exists).

Whoever hosts the game, therefore controls this tag and is responsible for
configuring the publisher IDs and any other monetization settings passed to the
tag. They therefore "own" the monetization settings and payments, and are
responsible for any further revenue sharing with other parties.

Distribution arrangements for H5 games can get complicated. Right now we support
simple 1-way revshares (i.e. regular AdSense payments). This is an area of
ongoing development.

## Distribution examples

Here are some distribution examples:

1. Publisher embeds the game into their site directly. They host the game, and
   therefore own the monetization settings and payments.

   ![Diagram](https://developers.google.com/static/ad-placement/docs/images/distribution-1.png)
2. Publisher iFrame's their own game which they host at a different URL to their
   main site. Once again they host the game and control the monetization
   settings and payments.

   ![Diagram](https://developers.google.com/static/ad-placement/docs/images/distribution-iframe-1.png)
   ![Diagram](https://developers.google.com/static/ad-placement/docs/images/distribution-iframe-2.png)
3. Publisher (A) links to a game that is hosted by a distributor (B).
   In this case the distributor hosts the game so *they* control the tag,
   configure the monetization settings and how the revenue is shared:

   ![Diagram](https://developers.google.com/static/ad-placement/docs/images/distribution-link-1.png)
   ![Diagram](https://developers.google.com/static/ad-placement/docs/images/distribution-link-2.png)

### Remember

1. The tag should always be located within the same document as the game.
2. Whoever hosts the game controls the monetization of the game.