| 1 |
<?php |
| 2 |
/** |
| 3 |
* @var string $cookie_categories_disabled |
| 4 |
* @var string $auto_disabled |
| 5 |
* @var bool $is_preferences |
| 6 |
* @var bool $is_statistics |
| 7 |
* @var bool $is_marketing |
| 8 |
*/ |
| 9 |
?> |
| 10 |
<div class="cb-settings__config__item"> |
| 11 |
<div class="cb-settings__config__content"> |
| 12 |
<h3 class="cb-settings__config__subtitle"><?php esc_html_e( 'Google Tag Manager:', 'cookiebot' ); ?></h3> |
| 13 |
<p class="cb-general__info__text"> |
| 14 |
<?php esc_html_e( 'For more details about Cookiebot CMP and Google Tag Manager.', 'cookiebot' ); ?> |
| 15 |
</p> |
| 16 |
<a href="https://support.cookiebot.com/hc/en-us/articles/360003784174#3" |
| 17 |
class="cb-btn cb-link-btn" target="_blank" rel="noopener"> |
| 18 |
<?php esc_html_e( 'Read more', 'cookiebot' ); ?> |
| 19 |
</a> |
| 20 |
</div> |
| 21 |
<div class="cb-settings__config__data"> |
| 22 |
<div class="cb-settings__config__data__inner"> |
| 23 |
<label class="switch-checkbox" for="cookiebot-gtm"> |
| 24 |
<input type="checkbox" name="cookiebot-gtm" id="cookiebot-gtm" value="1" |
| 25 |
<?php checked( 1, get_option( 'cookiebot-gtm' ) ); ?>> |
| 26 |
<div class="switcher"></div> |
| 27 |
<?php esc_html_e( 'Google Tag Manager', 'cookiebot' ); ?> |
| 28 |
</label> |
| 29 |
</div> |
| 30 |
</div> |
| 31 |
</div> |
| 32 |
|
| 33 |
<div class="cb-settings__config__item"> |
| 34 |
<div class="cb-settings__config__content"> |
| 35 |
<h3 class="cb-settings__config__subtitle"><?php esc_html_e( 'Google Tag Manager ID', 'cookiebot' ); ?></h3> |
| 36 |
<p class="cb-general__info__text"> |
| 37 |
<?php esc_html_e( 'Paste your Tag Manager ID into the field on the right.', 'cookiebot' ); ?> |
| 38 |
</p> |
| 39 |
<a href="https://support.cookiebot.com/hc/en-us/articles/360003784174#3" class="cb-btn cb-link-btn" |
| 40 |
target="_blank" rel="noopener"> |
| 41 |
<?php esc_html_e( 'How to find the GTM ID', 'cookiebot' ); ?> |
| 42 |
</a> |
| 43 |
</div> |
| 44 |
<div class="cb-settings__config__data"> |
| 45 |
<div class="cb-settings__config__data__inner"> |
| 46 |
<h3 class="cb-settings__data__subtitle"><?php esc_html_e( 'Google Tag Manager ID', 'cookiebot' ); ?></h3> |
| 47 |
<input type="text" name="cookiebot-gtm-id" id="cookiebot-gtm-id" |
| 48 |
placeholder="<?php esc_html_e( 'Enter GTM ID', 'cookiebot' ); ?>" |
| 49 |
value="<?php echo esc_html( get_option( 'cookiebot-gtm-id' ) ); ?>"> |
| 50 |
</div> |
| 51 |
</div> |
| 52 |
</div> |
| 53 |
|
| 54 |
<div class="cb-settings__config__item"> |
| 55 |
<div class="cb-settings__config__content"> |
| 56 |
<h3 class="cb-settings__config__subtitle"><?php esc_html_e( 'Data Layer Name (optional)', 'cookiebot' ); ?></h3> |
| 57 |
<p class="cb-general__info__text"> |
| 58 |
<?php esc_html_e( 'You can also paste your Data Layer Name here. This is optional information.', 'cookiebot' ); ?> |
| 59 |
</p> |
| 60 |
<a href="https://support.cookiebot.com/hc/en-us/articles/360003784174#3" class="cb-btn cb-link-btn" |
| 61 |
target="_blank" rel="noopener"> |
| 62 |
<?php esc_html_e( 'How to find the Data Layer Name', 'cookiebot' ); ?> |
| 63 |
</a> |
| 64 |
</div> |
| 65 |
<div class="cb-settings__config__data"> |
| 66 |
<div class="cb-settings__config__data__inner"> |
| 67 |
<h3 class="cb-settings__data__subtitle"><?php esc_html_e( 'Name of your Data Layer', 'cookiebot' ); ?></h3> |
| 68 |
<input type="text" name="cookiebot-data-layer" id="data_layer" placeholder="dataLayer" |
| 69 |
value="<?php echo esc_html( get_option( 'cookiebot-data-layer' ) ); ?>"> |
| 70 |
</div> |
| 71 |
</div> |
| 72 |
</div> |
| 73 |
|
| 74 |
<div id="gtm-cookie-categories" class="cb-settings__config__item<?php echo esc_attr( $auto_disabled ); ?>"> |
| 75 |
<div class="cb-settings__config__content"> |
| 76 |
<h3 class="cb-settings__config__subtitle"><?php esc_html_e( 'Google Tag Manager cookies', 'cookiebot' ); ?></h3> |
| 77 |
<p class="cb-general__info__text"> |
| 78 |
<?php esc_html_e( 'Select the cookie types that need to be consented for the Google Tag Manager script', 'cookiebot' ); ?> |
| 79 |
</p> |
| 80 |
<p class="cb-general__info__note"><?php esc_html_e( 'This feature is only available when using Manual Blocking', 'cookiebot' ); ?></p> |
| 81 |
<p class="cb-general__info__note"> |
| 82 |
<?php esc_html_e( 'This option may affect the behaviour of your GTM Tags, as the script will run on the selected cookies consent.', 'cookiebot' ); ?> |
| 83 |
<br> |
| 84 |
<?php esc_html_e( 'Please make sure your Tags in Google Tag Manager are triggered correctly.', 'cookiebot' ); ?> |
| 85 |
</p> |
| 86 |
</div> |
| 87 |
<div class="cb-settings__config__data"> |
| 88 |
<div class="cb-settings__config__data__inner"> |
| 89 |
<h3 class="cb-settings__data__subtitle"><?php esc_html_e( 'Check one or multiple cookie types:', 'cookiebot' ); ?></h3> |
| 90 |
<ul id="cb-settings__gtm__cookie-types"> |
| 91 |
<li> |
| 92 |
<input |
| 93 |
type="checkbox" |
| 94 |
value="preferences" |
| 95 |
<?php checked( true, $is_preferences ); ?> |
| 96 |
name="cookiebot-gtm-cookies[]"<?php echo esc_attr( $cookie_categories_disabled ); ?>> |
| 97 |
<label class="cb-settings__cookie-types"><?php esc_html_e( 'preferences', 'cookiebot' ); ?></label> |
| 98 |
</li> |
| 99 |
<li> |
| 100 |
<input |
| 101 |
type="checkbox" |
| 102 |
value="statistics" |
| 103 |
<?php checked( true, $is_statistics ); ?> |
| 104 |
name="cookiebot-gtm-cookies[]"<?php echo esc_attr( $cookie_categories_disabled ); ?>> |
| 105 |
<label class="cb-settings__cookie-types"><?php esc_html_e( 'statistics', 'cookiebot' ); ?></label> |
| 106 |
</li> |
| 107 |
<li> |
| 108 |
<input |
| 109 |
type="checkbox" |
| 110 |
value="marketing" |
| 111 |
<?php checked( true, $is_marketing ); ?> |
| 112 |
name="cookiebot-gtm-cookies[]"<?php echo esc_attr( $cookie_categories_disabled ); ?>> |
| 113 |
<label class="cb-settings__cookie-types"><?php esc_html_e( 'marketing', 'cookiebot' ); ?></label> |
| 114 |
</li> |
| 115 |
</ul> |
| 116 |
</div> |
| 117 |
</div> |
| 118 |
</div> |
| 119 |
|