<commit_before>[&#8249; AdMob Doc Home](./)

<h1>AdMob Integration Guide</h1>
<<[../../shared/-VERSION-/version.md]

##Integration
First, you must sign up for [AdMob](https://www.google.com/admob/).

Second, Open a terminal and use the following command to install the SDKBOX AdMob plugin.
```bash
$ sdkbox import admob
```

Third, please read the [iOS FAQ](https://developers.google.com/admob/ios/quick-start#faq) and [Android FAQ](https://developers.google.com/admob/android/quick-start#faq)

<<[../../shared/notice.md]

<!--## Configuration
<<[../../shared/sdkbox_cloud.md]
<<[../../shared/remote_application_config.md]-->

### JSON Configuration
SDKBOX Installer will automatically inject a sample configuration to your `sdkbox_config.json`, that you have to modify it before you can use it for your own app

type:

    - "banner"
    - "interstitial"

alignment:

    - "top"
    - "bottom"
    - "left"
    - "right"
    - "center"
    - "top_left" or "left_top"
    - "top_right" or "right_top"
    - "bottom_left" or "left_bottom"
    - "bottom_right" or "right_bottom"

width x height:

    - 320x50
    - 468x60
    - 320x100
    - 728x90
    - 300x250
    - 160x600
    - 0x0    # 0x0 means auto size, smart banner.

#### Smart banner

```
    "width":0,
    "height":0
```

#### Auto cache

The plugin will auto cache the first Ad of one Ad type. It also will cache the interstitial Ad after
it close.

Example:
```json

{
    "ios": {
        "AdMob":{
            "ads":{
                "home":{
                    "id":"ca-app-pub-3940256099942544/2934735716",
                    "type":"banner",
                    "alignment":"bottom",
                    "width":300,
                    "height":50
                },
                "gameover":{
                    "id":"ca-app-pub-1329374026572143/4185543717",
                    "type":"interstitial"
                }
            }
        }
    },
    "android": {
        "AdMob":{
            "ads":{
                "home":{
                    "id":"ca-app-pub-1329374026572143/2685130917",
                    "type":"banner",
                    "alignment":"bottom",
                    "width":300,
                    "height":100
                },
                "gameover":{
                    "id":"ca-app-pub-1329374026572143/1092476511",
                    "type":"interstitial"
                }
            }
        }
    }<commit_msg>add designed for families to admob<commit_after>[&#8249; AdMob Doc Home](./)

<h1>AdMob Integration Guide</h1>
<<[../../shared/-VERSION-/version.md]

##Integration
First, you must sign up for [AdMob](https://www.google.com/admob/).

Second, Open a terminal and use the following command to install the SDKBOX AdMob plugin.
```bash
$ sdkbox import admob
```

Third, please read the [iOS FAQ](https://developers.google.com/admob/ios/quick-start#faq) and [Android FAQ](https://developers.google.com/admob/android/quick-start#faq)

<<[../../shared/notice.md]

<!--## Configuration
<<[../../shared/sdkbox_cloud.md]
<<[../../shared/remote_application_config.md]-->

### JSON Configuration
SDKBOX Installer will automatically inject a sample configuration to your `sdkbox_config.json`, that you have to modify it before you can use it for your own app

type:

    - "banner"
    - "interstitial"

alignment:

    - "top"
    - "bottom"
    - "left"
    - "right"
    - "center"
    - "top_left"
    - "top_right"
    - "bottom_left"
    - "bottom_right"

width x height:

    - 320x50
    - 468x60
    - 320x100
    - 728x90
    - 300x250
    - 160x600
    - 0x0    # 0x0 means auto size, smart banner.

#### Smart banner

```
    "width":0,
    "height":0
```

#### Apps targeted for Children
Apps that target for children can specify `"is_designed_for_families": true`

#### Auto cache

The plugin will auto cache the first Ad of one Ad type. It also will cache the interstitial Ad after
it close.

#### Example:
```json

{
    "ios": {
        "AdMob":{
            "ads":{
                "home":{
                    "id":"ca-app-pub-3940256099942544/2934735716",
                    "type":"banner",
                    "alignment":"bottom",
                    "width":300,
                    "height":50,
                    "is_designed_for_families": false
                },
                "gameover":{
                    "id":"ca-app-pub-1329374026572143/4185543717",
                    "type":"interstitial",
                    "is_designed_for_families": true
                }
            }
        }
    },
    "android": {
        "AdMob":{
            "ads":{
                "home":{
                    "id":"ca-app-pub-1329374026572143/2685130917",
                    "type":"banner",
                    "alignment":"bottom",
                    "width":300,
                    "height":100,
                    "is_designed_for_families": false
                },
                "gameover":{
                    "id":"ca-app-pub-1329374026572143/1092476511",
                    "type":"interstitial",
                    "is_designed_for_families": true
                }
            }
        }
    }
{'fraction_non_alphanumeric': 0.14354901201084852, 'fraction_numerical': 0.06199147617202635, 'mean_word_length': 1.6695966907962771, 'pattern_counts': {'":': 57, '<': 25, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6772471', 'n_tokens_mistral': 1892, 'n_tokens_neox': 1556, 'n_words': 352}