PluginProbe
WP Coder – Insert & Manage Code Snippets / trunk
WP Coder – Insert & Manage Code Snippets vtrunk
4.5.1 1.1 2.3.1 2.3.2 2.4.1 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1 3.1.1 3.2 3.2.1 3.3 3.4 3.5 3.5.1 All 39 releases
wp-coder / classes / Tools / pages / integrations.php

integrations.php in WP Coder – Insert & Manage Code Snippets trunk, at classes/Tools/pages/integrations.php

142 lines 5.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 use WPCoder\Dashboard\FieldHelper;
4
5 defined( 'ABSPATH' ) || exit;
6
7 ?>
8
9 <div class="wowp-snippets__header">
10 <h3 class="wowp-snippets__header-title">Integrations</h3>
11 <p class="wowp-snippets__header-description">Connect your site with external services and platforms for tracking, monetization, and analytics.</p>
12 </div>
13
14 <div class="wowp-snippet__list">
15
16 <div class="wowp-snippet__item">
17 <div class="wowp-snippet__item-header">
18 <label for="enable_tracking_tool">Tracking Code Manager</label>
19 <p class="wowp-snippet__item-description">Easily integrate your website with popular platforms like
20 Google, Facebook, and Pinterest by adding their
21 respective IDs, enabling seamless tracking and analytics.</p>
22 </div>
23 <div class="wowp-field has-checkbox">
24 <label class="switch">
25 <?php self::field( 'checkbox', 'enable_tracking_tool' ); ?>
26 <span class="slider"></span>
27 </label>
28 </div>
29 <div class="wowp-snippet__item-expand is-hidden">
30 <div class="wowp-fields__group">
31
32 <div class="wowp-field is-column">
33 <label><span class="label">Google Analytics</span>
34 <?php self::field( 'text', 'tracking_tool_google', '', 'set tracking ID' ); ?>
35 </label>
36 <a target="_blank" href="https://support.google.com/analytics/answer/9539598?hl=en" rel="noopener noreferrer nofollow">How to
37 find the tracking ID</a>
38 </div>
39 <div class="wowp-field is-column">
40 <label><span class="label">Facebook Pixel</span>
41 <?php self::field( 'text', 'tracking_tool_facebook', '', 'set Pixel ID' ); ?>
42 </label>
43 <a target="_blank"
44 href="https://en-gb.facebook.com/business/help/952192354843755?id=1205376682832142" rel="noopener noreferrer nofollow">How
45 to find the Facebook pixel ID</a>
46 </div>
47 <div class="wowp-field is-column">
48 <label><span class="label">Pintrest Pixel</span>
49 <?php self::field( 'text', 'tracking_tool_pintrest', '', 'set Pixel ID' ); ?>
50 </label>
51 <a target="_blank"
52 href="https://help.pinterest.com/en/business/article/install-the-pinterest-tag" rel="noopener noreferrer nofollow">How to
53 find the Pinterest pixel ID</a>
54 </div>
55
56 </div>
57 </div>
58 </div>
59
60 <div class="wowp-snippet__item">
61 <div class="wowp-snippet__item-header">
62 <label for="enable_gtm">Google Tag Manager</label>
63 <p class="wowp-snippet__item-description">Add Google Tag Manager to your site for advanced tag management and tracking.</p>
64 </div>
65 <div class="wowp-field has-checkbox">
66 <label class="switch">
67 <?php self::field( 'checkbox', 'enable_gtm' ); ?>
68 <span class="slider"></span>
69 </label>
70 </div>
71 <div class="wowp-snippet__item-expand is-hidden">
72 <div class="wowp-field is-column">
73 <label>
74 <span class="label">Container ID</span>
75 <?php self::field( 'text', 'gtm_container_id', '', 'e.g. GTM-XXXXXXX' ); ?>
76 </label>
77 <a target="_blank"
78 href="https://support.google.com/tagmanager/answer/6103696?hl=en" rel="noopener noreferrer nofollow">How to find your GTM Container ID</a>
79 </div>
80
81 <p><b>Disable Google Tag Manager for these user roles:</b></p>
82
83 <div class="wowp-fields__group">
84 <?php foreach ( FieldHelper::user_roles() as $key => $value ) :
85 if ( $key === 'all' ) {
86 continue;
87 }
88 ?>
89 <div class="wowp-field has-checkbox">
90 <span class="label"><?php echo esc_html( $value ); ?></span>
91 <label class="switch">
92 <?php self::field( 'checkbox', 'disable_gtm_user_' . $key ); ?>
93 <span class="slider"></span>
94 </label>
95 </div>
96 <?php endforeach; ?>
97 </div>
98 </div>
99 </div>
100
101 <div class="wowp-snippet__item">
102 <div class="wowp-snippet__item-header">
103 <label for="enable_google_adsense">Google AdSense</label>
104 <p class="wowp-snippet__item-description">Easily add Google AdSense to your WordPress site.</p>
105 </div>
106 <div class="wowp-field has-checkbox">
107 <label class="switch">
108 <?php self::field( 'checkbox', 'enable_google_adsense' ); ?>
109 <span class="slider"></span>
110 </label>
111 </div>
112 <div class="wowp-snippet__item-expand is-hidden">
113 <div class="wowp-field is-column">
114 <label>
115 <span class="label">Publisher ID</span>
116 <?php self::field( 'text', 'google_adsense_publisher', '', 'e.g pub-1234567890111213' ); ?>
117 </label>
118 <a target="_blank"
119 href="https://support.google.com/adsense/answer/105516?hl=en" rel="noopener noreferrer nofollow">Find your publisher ID</a>
120 </div>
121
122 <p><b>Disable Google AdSense Ads for these user roles:</b></p>
123
124 <div class="wowp-fields__group">
125 <?php foreach ( FieldHelper::user_roles() as $key => $value ) :
126 if ( $key === 'all' ) {
127 continue;
128 }
129 ?>
130 <div class="wowp-field has-checkbox">
131 <span class="label"><?php echo esc_html( $value ); ?></span>
132 <label class="switch">
133 <?php self::field( 'checkbox', 'disable_google_adsense_user_' . $key ); ?>
134 <span class="slider"></span>
135 </label>
136 </div>
137 <?php endforeach; ?>
138 </div>
139 </div>
140 </div>
141
142 </div>