Version Description
- Fix: better PHP8 compatibility
- Fix: PHP notice on admin page
Download this release
Release Info
Developer | duracelltomi |
Plugin | DuracellTomi's Google Tag Manager for WordPress |
Version | 1.13.1 |
Comparing to | |
See all releases |
Code changes from version 1.13 to 1.13.1
- admin/admin.php +1 -1
- common/readoptions.php +465 -465
- duracelltomi-google-tag-manager-for-wordpress.php +2 -2
- readme.txt +11 -2
admin/admin.php
CHANGED
@@ -1375,7 +1375,7 @@ function gtm4wp_show_warning() {
|
|
1375 |
global $gtm4wp_options, $gtp4wp_plugin_url, $gtm4wp_integratefieldtexts, $current_user,
|
1376 |
$gtm4wp_def_user_notices_dismisses;
|
1377 |
|
1378 |
-
$woo_plugin_active = is_plugin_active( $gtm4wp_integratefieldtexts[
|
1379 |
if ( $woo_plugin_active && function_exists( 'WC' ) ) {
|
1380 |
$woo = WC();
|
1381 |
} else {
|
1375 |
global $gtm4wp_options, $gtp4wp_plugin_url, $gtm4wp_integratefieldtexts, $current_user,
|
1376 |
$gtm4wp_def_user_notices_dismisses;
|
1377 |
|
1378 |
+
$woo_plugin_active = is_plugin_active( $gtm4wp_integratefieldtexts[ GTM4WP_OPTION_INTEGRATE_WCTRACKENHANCEDEC ]['plugintocheck'] );
|
1379 |
if ( $woo_plugin_active && function_exists( 'WC' ) ) {
|
1380 |
$woo = WC();
|
1381 |
} else {
|
common/readoptions.php
CHANGED
@@ -1,465 +1,465 @@
|
|
1 |
-
<?php
|
2 |
-
define( 'GTM4WP_OPTIONS', 'gtm4wp-options' );
|
3 |
-
define( 'GTM4WP_OPTION_GTM_CODE', 'gtm-code' );
|
4 |
-
define( 'GTM4WP_OPTION_GTM_PLACEMENT', 'gtm-code-placement' );
|
5 |
-
define( 'GTM4WP_OPTION_DATALAYER_NAME', 'gtm-datalayer-variable-name' );
|
6 |
-
define( 'GTM4WP_OPTION_ENV_GTM_AUTH', 'gtm-env-gtm-auth' );
|
7 |
-
define( 'GTM4WP_OPTION_ENV_GTM_PREVIEW', 'gtm-env-gtm-preview' );
|
8 |
-
define( 'GTM4WP_OPTION_DONOTTRACK', 'gtm-browser-do-not-track' );
|
9 |
-
define( 'GTM4WP_OPTION_LOADEARLY', 'gtm-load-gtm-early' );
|
10 |
-
define( 'GTM4WP_OPTION_GTMDOMAIN', 'gtm-domain-name' );
|
11 |
-
|
12 |
-
define( 'GTM4WP_OPTION_INCLUDE_REMARKETING', 'include-remarketing' );
|
13 |
-
define( 'GTM4WP_OPTION_INCLUDE_LOGGEDIN', 'include-loggedin' );
|
14 |
-
define( 'GTM4WP_OPTION_INCLUDE_USERROLE', 'include-userrole' );
|
15 |
-
define( 'GTM4WP_OPTION_INCLUDE_USERID', 'include-userid' );
|
16 |
-
define( 'GTM4WP_OPTION_INCLUDE_USEREMAIL', 'include-useremail' );
|
17 |
-
define( 'GTM4WP_OPTION_INCLUDE_USERREGDATE', 'include-userregdate' );
|
18 |
-
define( 'GTM4WP_OPTION_INCLUDE_USERNAME', 'include-username' );
|
19 |
-
define( 'GTM4WP_OPTION_INCLUDE_VISITOR_IP', 'include-visitor-ip' );
|
20 |
-
define( 'GTM4WP_OPTION_INCLUDE_POSTTYPE', 'include-posttype' );
|
21 |
-
define( 'GTM4WP_OPTION_INCLUDE_CATEGORIES', 'include-categories' );
|
22 |
-
define( 'GTM4WP_OPTION_INCLUDE_TAGS', 'include-tags' );
|
23 |
-
define( 'GTM4WP_OPTION_INCLUDE_AUTHORID', 'include-authorid' );
|
24 |
-
define( 'GTM4WP_OPTION_INCLUDE_AUTHOR', 'include-author' );
|
25 |
-
define( 'GTM4WP_OPTION_INCLUDE_POSTDATE', 'include-postdate' );
|
26 |
-
define( 'GTM4WP_OPTION_INCLUDE_POSTTITLE', 'include-posttitle' );
|
27 |
-
define( 'GTM4WP_OPTION_INCLUDE_POSTCOUNT', 'include-postcount' );
|
28 |
-
define( 'GTM4WP_OPTION_INCLUDE_POSTID', 'include-postid' );
|
29 |
-
define( 'GTM4WP_OPTION_INCLUDE_POSTFORMAT', 'include-postformat' );
|
30 |
-
define( 'GTM4WP_OPTION_INCLUDE_POSTTERMLIST', 'include-postterms' );
|
31 |
-
define( 'GTM4WP_OPTION_INCLUDE_SEARCHDATA', 'include-searchdata' );
|
32 |
-
define( 'GTM4WP_OPTION_INCLUDE_BROWSERDATA', 'include-browserdata' );
|
33 |
-
define( 'GTM4WP_OPTION_INCLUDE_OSDATA', 'include-osdata' );
|
34 |
-
define( 'GTM4WP_OPTION_INCLUDE_DEVICEDATA', 'include-devicedata' );
|
35 |
-
define( 'GTM4WP_OPTION_INCLUDE_MISCGEO', 'include-miscgeo' );
|
36 |
-
define( 'GTM4WP_OPTION_INCLUDE_MISCGEOAPI', 'geo-apikey' );
|
37 |
-
define( 'GTM4WP_OPTION_INCLUDE_MISCGEOCF', 'include-miscgeo-cloudflare' );
|
38 |
-
define( 'GTM4WP_OPTION_INCLUDE_WEATHER', 'include-weather' );
|
39 |
-
define( 'GTM4WP_OPTION_INCLUDE_WEATHERUNITS', 'weather-weatherunits' );
|
40 |
-
define( 'GTM4WP_OPTION_INCLUDE_WEATHEROWMAPI', 'weather-openweathermap-apikey' );
|
41 |
-
define( 'GTM4WP_OPTION_INCLUDE_SITEID', 'include-siteid' );
|
42 |
-
define( 'GTM4WP_OPTION_INCLUDE_SITENAME', 'include-sitename' );
|
43 |
-
|
44 |
-
define( 'GTM4WP_OPTION_EVENTS_FORMMOVE', 'event-form-move' );
|
45 |
-
define( 'GTM4WP_OPTION_EVENTS_NEWUSERREG', 'event-new-user-registration' );
|
46 |
-
define( 'GTM4WP_OPTION_EVENTS_USERLOGIN', 'event-user-logged-in' );
|
47 |
-
|
48 |
-
define( 'GTM4WP_OPTION_EVENTS_YOUTUBE', 'event-youtube' );
|
49 |
-
define( 'GTM4WP_OPTION_EVENTS_VIMEO', 'event-vimeo' );
|
50 |
-
define( 'GTM4WP_OPTION_EVENTS_SOUNDCLOUD', 'event-soundcloud' );
|
51 |
-
|
52 |
-
define( 'GTM4WP_OPTION_SCROLLER_ENABLED', 'scroller-enabled' );
|
53 |
-
define( 'GTM4WP_OPTION_SCROLLER_DEBUGMODE', 'scroller-debug-mode' );
|
54 |
-
define( 'GTM4WP_OPTION_SCROLLER_CALLBACKTIME', 'scroller-callback-time' );
|
55 |
-
define( 'GTM4WP_OPTION_SCROLLER_DISTANCE', 'scroller-distance' );
|
56 |
-
define( 'GTM4WP_OPTION_SCROLLER_CONTENTID', 'scroller-contentid' );
|
57 |
-
define( 'GTM4WP_OPTION_SCROLLER_READERTIME', 'scroller-readertime' );
|
58 |
-
|
59 |
-
define( 'GTM4WP_OPTION_BLACKLIST_ENABLE', 'blacklist-enable' );
|
60 |
-
define( 'GTM4WP_OPTION_BLACKLIST_SANDBOXED', 'blacklist-sandboxed' );
|
61 |
-
define( 'GTM4WP_OPTION_BLACKLIST_STATUS', 'blacklist-status' );
|
62 |
-
|
63 |
-
// deprecated options BEGIN
|
64 |
-
define( 'GTM4WP_OPTION_BLACKLIST_ADADVISOR', 'blacklist-adadvisor' );
|
65 |
-
define( 'GTM4WP_OPTION_BLACKLIST_ADROLL', 'blacklist-adroll' );
|
66 |
-
define( 'GTM4WP_OPTION_BLACKLIST_AWCONV', 'blacklist-adwords-conversion' );
|
67 |
-
define( 'GTM4WP_OPTION_BLACKLIST_AWREMARKET', 'blacklist-adwords-remarketing' );
|
68 |
-
define( 'GTM4WP_OPTION_BLACKLIST_BIZO', 'blacklist-bizo' );
|
69 |
-
define( 'GTM4WP_OPTION_BLACKLIST_CLICKTALE', 'blacklist-clicktale' );
|
70 |
-
define( 'GTM4WP_OPTION_BLACKLIST_COMSCORE', 'blacklist-comscore' );
|
71 |
-
define( 'GTM4WP_OPTION_BLACKLIST_CUSTOMHTML', 'blacklist-custom-html' );
|
72 |
-
define( 'GTM4WP_OPTION_BLACKLIST_CUSTOMIMG', 'blacklist-custom-img-tag' );
|
73 |
-
define( 'GTM4WP_OPTION_BLACKLIST_DBLCLKCOUNT', 'blacklist-doubleclick-counter' );
|
74 |
-
define( 'GTM4WP_OPTION_BLACKLIST_DBLCLKSALES', 'blacklist-doubleclick-sales' );
|
75 |
-
define( 'GTM4WP_OPTION_BLACKLIST_GACLASSIC', 'blacklist-google-analytics' );
|
76 |
-
define( 'GTM4WP_OPTION_BLACKLIST_MARIN', 'blacklist-marin' );
|
77 |
-
define( 'GTM4WP_OPTION_BLACKLIST_MPLEXIFRAME', 'blacklist-mediaplex-iframe' );
|
78 |
-
define( 'GTM4WP_OPTION_BLACKLIST_MPLEXROI', 'blacklist-mediaplex-roi' );
|
79 |
-
define( 'GTM4WP_OPTION_BLACKLIST_MEDIA6DEG', 'blacklist-media6degrees' );
|
80 |
-
define( 'GTM4WP_OPTION_BLACKLIST_TURNCONV', 'blacklist-turn-conversion' );
|
81 |
-
define( 'GTM4WP_OPTION_BLACKLIST_TURNDATA', 'blacklist-turn-data' );
|
82 |
-
define( 'GTM4WP_OPTION_BLACKLIST_UA', 'blacklist-universal-analytics' );
|
83 |
-
|
84 |
-
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_DOMELEMENT', 'blacklist-macro-dom-element' );
|
85 |
-
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_CUSTOMJS', 'blacklist-macro-custom-js' );
|
86 |
-
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_CONSTANT', 'blacklist-macro-constant-string' );
|
87 |
-
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_1STCOOKIE', 'blacklist-macro-1st-party-cookie' );
|
88 |
-
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_EVENTNAME', 'blacklist-macro-event-name' );
|
89 |
-
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_JSVAR', 'blacklist-macro-javascript-variable' );
|
90 |
-
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_DLAYERVAR', 'blacklist-macro-datalayer-variable' );
|
91 |
-
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_RANDOMNUM', 'blacklist-macro-random-number' );
|
92 |
-
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_REFERRER', 'blacklist-macro-referrer' );
|
93 |
-
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_URL', 'blacklist-macro-url' );
|
94 |
-
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_AUTOEVENT', 'blacklist-macro-autoevent-variable' );
|
95 |
-
// deprecated options END
|
96 |
-
|
97 |
-
define( 'GTM4WP_OPTION_INTEGRATE_WPCF7', 'integrate-wpcf7' );
|
98 |
-
|
99 |
-
define( 'GTM4WP_OPTION_INTEGRATE_WCTRACKCLASSICEC', 'integrate-woocommerce-track-classic-ecommerce' );
|
100 |
-
define( 'GTM4WP_OPTION_INTEGRATE_WCTRACKENHANCEDEC', 'integrate-woocommerce-track-enhanced-ecommerce' );
|
101 |
-
define( 'GTM4WP_OPTION_INTEGRATE_WCPRODPERIMPRESSION', 'integrate-woocommerce-product-per-impression' );
|
102 |
-
define( 'GTM4WP_OPTION_INTEGRATE_WCEECCARTASFIRSTSTEP', 'integrate-woocommerce-cart-as-first-step' );
|
103 |
-
define( 'GTM4WP_OPTION_INTEGRATE_WCEINCLUDECARTINDL', 'integrate-woocommerce-cart-content-in-datalayer' );
|
104 |
-
define( 'GTM4WP_OPTION_INTEGRATE_WCEECBRANDTAXONOMY', 'integrate-woocommerce-brand-taxonomy' );
|
105 |
-
define( 'GTM4WP_OPTION_INTEGRATE_WCREMARKETING', 'integrate-woocommerce-remarketing' );
|
106 |
-
define( 'GTM4WP_OPTION_INTEGRATE_WCBUSINESSVERTICAL', 'integrate-woocommerce-business-vertical' );
|
107 |
-
define( 'GTM4WP_OPTION_INTEGRATE_WCUSESKU', 'integrate-woocommerce-remarketing-usesku' );
|
108 |
-
define( 'GTM4WP_OPTION_INTEGRATE_WCUSEFULLCATEGORYPATH', 'integrate-woocommerce-use-full-category-path' );
|
109 |
-
define( 'GTM4WP_OPTION_INTEGRATE_WCREMPRODIDPREFIX', 'integrate-woocommerce-remarketing-productidprefix' );
|
110 |
-
define( 'GTM4WP_OPTION_INTEGRATE_WCCUSTOMERDATA', 'integrate-woocommerce-customer-data' );
|
111 |
-
define( 'GTM4WP_OPTION_INTEGRATE_WCORDERDATA', 'integrate-woocommerce-order-data' );
|
112 |
-
define( 'GTM4WP_OPTION_INTEGRATE_WCORDERMAXAGE', 'integrate-woocommerce-order-max-age' );
|
113 |
-
define( 'GTM4WP_OPTION_INTEGRATE_WCEXCLUDETAX', 'integrate-woocommerce-exclude-tax' );
|
114 |
-
define( 'GTM4WP_OPTION_INTEGRATE_WCEXCLUDESHIPPING', 'integrate-woocommerce-exclude-shipping' );
|
115 |
-
define( 'GTM4WP_OPTION_INTEGRATE_WCNOORDERTRACKEDFLAG', 'integrate-woocommerce-do-not-use-order-tracked-flag' );
|
116 |
-
|
117 |
-
define( 'GTM4WP_OPTION_INTEGRATE_GOOGLEOPTIMIZEIDS', 'integrate-google-optimize-idlist' );
|
118 |
-
define( 'GTM4WP_OPTION_INTEGRATE_GOOGLEOPTIMIZETIMEOUT', 'integrate-google-optimize-timeout' );
|
119 |
-
|
120 |
-
define( 'GTM4WP_OPTION_INTEGRATE_WPECOMMERCE', 'integrate-wp-e-commerce' );
|
121 |
-
|
122 |
-
define( 'GTM4WP_OPTION_INTEGRATE_AMPID', 'integrate-amp-id' );
|
123 |
-
|
124 |
-
define( 'GTM4WP_OPTION_INTEGRATE_COOKIEBOT', 'integrate-cookiebot' );
|
125 |
-
|
126 |
-
define( 'GTM4WP_PLACEMENT_FOOTER', 0 );
|
127 |
-
define( 'GTM4WP_PLACEMENT_BODYOPEN', 1 );
|
128 |
-
define( 'GTM4WP_PLACEMENT_BODYOPEN_AUTO', 2 );
|
129 |
-
define( 'GTM4WP_PLACEMENT_OFF', 3 );
|
130 |
-
|
131 |
-
global $gtm4wp_options, $gtm4wp_defaultoptions, $gtm4wp_entity_ids;
|
132 |
-
|
133 |
-
$gtm4wp_options = array();
|
134 |
-
|
135 |
-
$gtm4wp_defaultoptions = array(
|
136 |
-
GTM4WP_OPTION_GTM_CODE => '',
|
137 |
-
GTM4WP_OPTION_DATALAYER_NAME => '',
|
138 |
-
GTM4WP_OPTION_GTM_PLACEMENT => GTM4WP_PLACEMENT_FOOTER,
|
139 |
-
GTM4WP_OPTION_ENV_GTM_AUTH => '',
|
140 |
-
GTM4WP_OPTION_ENV_GTM_PREVIEW => '',
|
141 |
-
GTM4WP_OPTION_DONOTTRACK => false,
|
142 |
-
GTM4WP_OPTION_LOADEARLY => false,
|
143 |
-
GTM4WP_OPTION_GTMDOMAIN => '',
|
144 |
-
|
145 |
-
GTM4WP_OPTION_INCLUDE_REMARKETING => false,
|
146 |
-
GTM4WP_OPTION_INCLUDE_LOGGEDIN => false,
|
147 |
-
GTM4WP_OPTION_INCLUDE_USERROLE => false,
|
148 |
-
GTM4WP_OPTION_INCLUDE_USERID => false,
|
149 |
-
GTM4WP_OPTION_INCLUDE_USEREMAIL => false,
|
150 |
-
GTM4WP_OPTION_INCLUDE_USERREGDATE => false,
|
151 |
-
GTM4WP_OPTION_INCLUDE_USERNAME => false,
|
152 |
-
GTM4WP_OPTION_INCLUDE_VISITOR_IP => false,
|
153 |
-
GTM4WP_OPTION_INCLUDE_POSTTYPE => true,
|
154 |
-
GTM4WP_OPTION_INCLUDE_CATEGORIES => true,
|
155 |
-
GTM4WP_OPTION_INCLUDE_TAGS => true,
|
156 |
-
GTM4WP_OPTION_INCLUDE_AUTHOR => true,
|
157 |
-
GTM4WP_OPTION_INCLUDE_AUTHORID => false,
|
158 |
-
GTM4WP_OPTION_INCLUDE_POSTDATE => false,
|
159 |
-
GTM4WP_OPTION_INCLUDE_POSTTITLE => false,
|
160 |
-
GTM4WP_OPTION_INCLUDE_POSTCOUNT => false,
|
161 |
-
GTM4WP_OPTION_INCLUDE_POSTID => false,
|
162 |
-
GTM4WP_OPTION_INCLUDE_POSTFORMAT => false,
|
163 |
-
GTM4WP_OPTION_INCLUDE_POSTTERMLIST => false,
|
164 |
-
GTM4WP_OPTION_INCLUDE_SEARCHDATA => false,
|
165 |
-
GTM4WP_OPTION_INCLUDE_BROWSERDATA => false,
|
166 |
-
GTM4WP_OPTION_INCLUDE_OSDATA => false,
|
167 |
-
GTM4WP_OPTION_INCLUDE_DEVICEDATA => false,
|
168 |
-
GTM4WP_OPTION_INCLUDE_MISCGEO => false,
|
169 |
-
GTM4WP_OPTION_INCLUDE_MISCGEOAPI => '',
|
170 |
-
GTM4WP_OPTION_INCLUDE_MISCGEOCF => false,
|
171 |
-
GTM4WP_OPTION_INCLUDE_WEATHER => false,
|
172 |
-
GTM4WP_OPTION_INCLUDE_WEATHERUNITS => 0,
|
173 |
-
GTM4WP_OPTION_INCLUDE_WEATHEROWMAPI => '',
|
174 |
-
GTM4WP_OPTION_INCLUDE_SITEID => false,
|
175 |
-
GTM4WP_OPTION_INCLUDE_SITENAME => false,
|
176 |
-
|
177 |
-
GTM4WP_OPTION_EVENTS_FORMMOVE => false,
|
178 |
-
GTM4WP_OPTION_EVENTS_NEWUSERREG => false,
|
179 |
-
GTM4WP_OPTION_EVENTS_USERLOGIN => false,
|
180 |
-
|
181 |
-
GTM4WP_OPTION_EVENTS_YOUTUBE => false,
|
182 |
-
GTM4WP_OPTION_EVENTS_VIMEO => false,
|
183 |
-
GTM4WP_OPTION_EVENTS_SOUNDCLOUD => false,
|
184 |
-
|
185 |
-
GTM4WP_OPTION_SCROLLER_ENABLED => false,
|
186 |
-
GTM4WP_OPTION_SCROLLER_DEBUGMODE => false,
|
187 |
-
GTM4WP_OPTION_SCROLLER_CALLBACKTIME => 100,
|
188 |
-
GTM4WP_OPTION_SCROLLER_DISTANCE => 150,
|
189 |
-
GTM4WP_OPTION_SCROLLER_CONTENTID => 'content',
|
190 |
-
GTM4WP_OPTION_SCROLLER_READERTIME => 60,
|
191 |
-
|
192 |
-
GTM4WP_OPTION_BLACKLIST_ENABLE => 0,
|
193 |
-
GTM4WP_OPTION_BLACKLIST_SANDBOXED => false,
|
194 |
-
GTM4WP_OPTION_BLACKLIST_STATUS => '',
|
195 |
-
|
196 |
-
GTM4WP_OPTION_INTEGRATE_WPCF7 => false,
|
197 |
-
|
198 |
-
GTM4WP_OPTION_INTEGRATE_WCTRACKCLASSICEC => false,
|
199 |
-
GTM4WP_OPTION_INTEGRATE_WCTRACKENHANCEDEC => false,
|
200 |
-
GTM4WP_OPTION_INTEGRATE_WCPRODPERIMPRESSION => 0,
|
201 |
-
GTM4WP_OPTION_INTEGRATE_WCEECCARTASFIRSTSTEP => false,
|
202 |
-
GTM4WP_OPTION_INTEGRATE_WCEINCLUDECARTINDL => false,
|
203 |
-
GTM4WP_OPTION_INTEGRATE_WCEECBRANDTAXONOMY => '',
|
204 |
-
GTM4WP_OPTION_INTEGRATE_WCREMARKETING => false,
|
205 |
-
GTM4WP_OPTION_INTEGRATE_WCBUSINESSVERTICAL => 'retail',
|
206 |
-
GTM4WP_OPTION_INTEGRATE_WCUSESKU => false,
|
207 |
-
GTM4WP_OPTION_INTEGRATE_WCUSEFULLCATEGORYPATH => false,
|
208 |
-
GTM4WP_OPTION_INTEGRATE_WCREMPRODIDPREFIX => '',
|
209 |
-
GTM4WP_OPTION_INTEGRATE_WCCUSTOMERDATA => false,
|
210 |
-
GTM4WP_OPTION_INTEGRATE_WCORDERDATA => false,
|
211 |
-
GTM4WP_OPTION_INTEGRATE_WCORDERMAXAGE => 30,
|
212 |
-
GTM4WP_OPTION_INTEGRATE_WCEXCLUDETAX => false,
|
213 |
-
GTM4WP_OPTION_INTEGRATE_WCEXCLUDESHIPPING => false,
|
214 |
-
GTM4WP_OPTION_INTEGRATE_WCNOORDERTRACKEDFLAG => false,
|
215 |
-
|
216 |
-
GTM4WP_OPTION_INTEGRATE_GOOGLEOPTIMIZEIDS => '',
|
217 |
-
GTM4WP_OPTION_INTEGRATE_GOOGLEOPTIMIZETIMEOUT => 4000,
|
218 |
-
|
219 |
-
GTM4WP_OPTION_INTEGRATE_WPECOMMERCE => false,
|
220 |
-
|
221 |
-
GTM4WP_OPTION_INTEGRATE_AMPID => '',
|
222 |
-
|
223 |
-
GTM4WP_OPTION_INTEGRATE_COOKIEBOT => false
|
224 |
-
);
|
225 |
-
|
226 |
-
$gtm4wp_business_verticals = array(
|
227 |
-
'retail' => 'Retail',
|
228 |
-
'education' => 'Education',
|
229 |
-
'flights' => 'Flights',
|
230 |
-
'hotel_rental' => 'Hotel rental',
|
231 |
-
'jobs' => 'Jobs',
|
232 |
-
'local' => 'Local deals',
|
233 |
-
'real_estate' => 'Real estate',
|
234 |
-
'travel' => 'Travel',
|
235 |
-
'custom' => 'Custom'
|
236 |
-
);
|
237 |
-
|
238 |
-
$gtm4wp_business_verticals_ids = array(
|
239 |
-
'flights' => 'destination',
|
240 |
-
'travel' => 'destination'
|
241 |
-
);
|
242 |
-
|
243 |
-
$gtm4wp_entity_ids = array(
|
244 |
-
'tags' => array(
|
245 |
-
'abtGeneric' => 'AB TASTY Generic Tag',
|
246 |
-
'ta' => 'AdAdvisor Tag',
|
247 |
-
'adm' => 'Adometry Tag',
|
248 |
-
'asp' => 'AdRoll Smart Pixel Tag',
|
249 |
-
'awct' => 'Google Ads Conversion Tracking Tag',
|
250 |
-
'sp' => 'Google Ads Remarketing Tag',
|
251 |
-
'awc' => 'Affiliate Window Conversion Tag',
|
252 |
-
'awj' => 'Affiliate Window Journey Tag',
|
253 |
-
'baut' => 'Bing Ads Universal Event Tracking',
|
254 |
-
'bb' => 'Bizrate Insights Buyer Survey Solution',
|
255 |
-
'bsa' => 'Bizrate Insights Site Abandonment Survey Solution',
|
256 |
-
'cts' => 'ClickTale Standard Tracking Tag',
|
257 |
-
'csm' => 'comScore Unified Digital Measurement Tag',
|
258 |
-
'mpm' => 'Conversant Mediaplex - IFRAME MCT Tag',
|
259 |
-
'mpr' => 'Conversant Mediaplex - Standard IMG ROI Tag',
|
260 |
-
'gclidw' => 'Conversion Linker',
|
261 |
-
'cegg' => 'Crazy Egg Tag',
|
262 |
-
'crto' => 'Criteo OneTag',
|
263 |
-
'html' => 'Custom HTML Tag',
|
264 |
-
'img' => 'Custom Image Tag',
|
265 |
-
'dstag' => 'DistroScale Tag',
|
266 |
-
'flc' => 'Floodlight Counter Tag',
|
267 |
-
'fls' => 'Floodlight Sales Tag',
|
268 |
-
'm6d' => 'Dstillery Universal Pixel Tag',
|
269 |
-
'ela' => 'Eulerian Analytics Tag',
|
270 |
-
'ga' => 'Google Analytics Tag (classic, legacy)',
|
271 |
-
'ua' => 'Google Analytics Tag (universal, latest)',
|
272 |
-
'gcs' => 'Google Consumer Surveys Website Satisfaction',
|
273 |
-
'opt' => 'Google Optimize',
|
274 |
-
'ts' => 'Google Trusted Stores Tag',
|
275 |
-
'hjtc' => 'Hotjar Tracking Code',
|
276 |
-
'infinity' => 'Infinity Call Tracking Tag',
|
277 |
-
'sca' => 'Intent Media - Search Compare Ads',
|
278 |
-
'k50Init' => 'K50 tracking tag',
|
279 |
-
'll' => 'LeadLab',
|
280 |
-
'bzi' => 'LinkedIn Tag',
|
281 |
-
'ljs' => 'Lytics JS Tag',
|
282 |
-
'ms' => 'Marin Software Tag',
|
283 |
-
'mpm' => 'Mediaplex - IFRAME MCT Tag',
|
284 |
-
'mpr' => 'Mediaplex - Standard IMG ROI Tag',
|
285 |
-
'messagemate' => 'Message Mate',
|
286 |
-
'mf' => 'Mouseflow Tag',
|
287 |
-
'ta' => 'Neustar Pixel',
|
288 |
-
'ndcr' => 'Nielsen DCR Static Lite Tag',
|
289 |
-
'nudge' => 'Nudge Content Analytics Tag',
|
290 |
-
'okt' => 'Oktopost Tracking Code',
|
291 |
-
'omc' => 'Optimise Conversion Tag',
|
292 |
-
'messagemate' => 'OwnerListens Message Mate',
|
293 |
-
'pa' => 'Perfect Audience Pixel',
|
294 |
-
'pc' => 'Personali Canvas',
|
295 |
-
'pntr' => 'Pinterest',
|
296 |
-
'placedPixel' => 'Placed',
|
297 |
-
'pijs' => 'Pulse Insights Voice of Customer Platform',
|
298 |
-
'qcm' => 'Quantcast Audience Measurement',
|
299 |
-
'qpx' => 'Quora Pixel',
|
300 |
-
'fxm' => 'Rawsoft FoxMetrics',
|
301 |
-
'scjs' => 'SaleCycle JavaScript Tag',
|
302 |
-
'scp' => 'SaleCycle Pixel Tag',
|
303 |
-
'sfc' => 'SearchForce JavaScript Tracking for Conversion Page',
|
304 |
-
'sfl' => 'SearchForce JavaScript Tracking for Landing Page',
|
305 |
-
'sfr' => 'SearchForce Redirection Tracking Tag',
|
306 |
-
'shareaholic' => 'Shareaholic',
|
307 |
-
'svw' => 'Survicate Widget',
|
308 |
-
'tdlc' => 'Tradedoubler Lead Conversion Tag',
|
309 |
-
'tdsc' => 'Tradedoubler Sale Conversion Tag',
|
310 |
-
'tc' => 'Turn Conversion Tracking Tag',
|
311 |
-
'tdc' => 'Turn Data Collection Tag',
|
312 |
-
'twitter_website_tag' => 'Twitter Universal Website Tag',
|
313 |
-
'uslt' => 'Upsellit Global Footer Tag',
|
314 |
-
'uspt' => 'Upsellit Confirmation Tag',
|
315 |
-
'vei' => 'Ve Interactive JavaScript Tag',
|
316 |
-
'veip' => 'Ve Interactive Pixel',
|
317 |
-
'vdc' => 'VisualDNA Conversion Tag',
|
318 |
-
'xpsh' => 'Xtremepush',
|
319 |
-
'yieldify' => 'Yieldify',
|
320 |
-
'zone' => 'Zones'
|
321 |
-
),
|
322 |
-
'triggers' => array(
|
323 |
-
'evl' => 'Element Visibility Listener/Trigger',
|
324 |
-
'cl' => 'Click Listener/Trigger',
|
325 |
-
'fsl' => 'Form Submit Listener/Trigger',
|
326 |
-
'hl' => 'History Listener/Trigger',
|
327 |
-
'jel' => 'JavaScript Error Listener/Trigger',
|
328 |
-
'lcl' => 'Link Click Listener/Trigger',
|
329 |
-
'sdl' => 'Scroll Depth Listener/Trigger',
|
330 |
-
'tl' => 'Timer Listener/Trigger',
|
331 |
-
'ytl' => 'YouTube Video Listener/Trigger'
|
332 |
-
),
|
333 |
-
'variables' => array(
|
334 |
-
'k' => '1st Party Cookie',
|
335 |
-
'c' => 'Constant',
|
336 |
-
'ctv' => 'Container Version Number',
|
337 |
-
'e' => 'Custom Event',
|
338 |
-
'jsm' => 'Custom JavaScript Variable',
|
339 |
-
'v' => 'Data Layer Variable',
|
340 |
-
'dbg' => 'Debug Mode',
|
341 |
-
'd' => 'DOM Element',
|
342 |
-
'vis' => 'Element Visibility',
|
343 |
-
'f' => 'HTTP Referrer',
|
344 |
-
'j' => 'JavaScript Variable',
|
345 |
-
'smm' => 'Lookup Table',
|
346 |
-
'r' => 'Random Number',
|
347 |
-
'remm' => 'RegEx Table',
|
348 |
-
'u' => 'URL'
|
349 |
-
)
|
350 |
-
);
|
351 |
-
|
352 |
-
function gtm4wp_migrate_blacklist_whitelist( $current_options ) {
|
353 |
-
if ( ( array_key_exists( GTM4WP_OPTION_BLACKLIST_ENABLE, $current_options ) )
|
354 |
-
&& ( $current_options[ GTM4WP_OPTION_BLACKLIST_ENABLE ] > 0 )
|
355 |
-
) {
|
356 |
-
$_gtmrestrictlistitems = array();
|
357 |
-
|
358 |
-
// IDs from https://developers.google.com/tag-manager/devguide#security
|
359 |
-
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_ADADVISOR ] ) {
|
360 |
-
$_gtmrestrictlistitems[] = 'ta';
|
361 |
-
}
|
362 |
-
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_ADROLL ] ) {
|
363 |
-
$_gtmrestrictlistitems[] = 'asp';
|
364 |
-
}
|
365 |
-
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_AWCONV ] ) {
|
366 |
-
$_gtmrestrictlistitems[] = 'awct';
|
367 |
-
}
|
368 |
-
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_AWREMARKET ] ) {
|
369 |
-
$_gtmrestrictlistitems[] = 'sp';
|
370 |
-
}
|
371 |
-
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_BIZO ] ) {
|
372 |
-
$_gtmrestrictlistitems[] = 'bzi';
|
373 |
-
}
|
374 |
-
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_CLICKTALE ] ) {
|
375 |
-
$_gtmrestrictlistitems[] = 'cts';
|
376 |
-
}
|
377 |
-
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_COMSCORE ] ) {
|
378 |
-
$_gtmrestrictlistitems[] = 'csm';
|
379 |
-
}
|
380 |
-
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_CUSTOMHTML ] ) {
|
381 |
-
$_gtmrestrictlistitems[] = 'html';
|
382 |
-
}
|
383 |
-
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_CUSTOMIMG ] ) {
|
384 |
-
$_gtmrestrictlistitems[] = 'img';
|
385 |
-
}
|
386 |
-
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_DBLCLKCOUNT ] ) {
|
387 |
-
$_gtmrestrictlistitems[] = 'flc';
|
388 |
-
}
|
389 |
-
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_DBLCLKSALES ] ) {
|
390 |
-
$_gtmrestrictlistitems[] = 'fls';
|
391 |
-
}
|
392 |
-
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_GACLASSIC ] ) {
|
393 |
-
$_gtmrestrictlistitems[] = 'ga';
|
394 |
-
}
|
395 |
-
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_MARIN ] ) {
|
396 |
-
$_gtmrestrictlistitems[] = 'ms';
|
397 |
-
}
|
398 |
-
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_MPLEXIFRAME ] ) {
|
399 |
-
$_gtmrestrictlistitems[] = 'mpm';
|
400 |
-
}
|
401 |
-
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_MPLEXROI ] ) {
|
402 |
-
$_gtmrestrictlistitems[] = 'mpr';
|
403 |
-
}
|
404 |
-
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_MEDIA6DEG ] ) {
|
405 |
-
$_gtmrestrictlistitems[] = 'm6d';
|
406 |
-
}
|
407 |
-
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_TURNCONV ] ) {
|
408 |
-
$_gtmrestrictlistitems[] = 'tc';
|
409 |
-
}
|
410 |
-
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_TURNDATA ] ) {
|
411 |
-
$_gtmrestrictlistitems[] = 'tdc';
|
412 |
-
}
|
413 |
-
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_UA ] ) {
|
414 |
-
$_gtmrestrictlistitems[] = 'ua';
|
415 |
-
}
|
416 |
-
|
417 |
-
$current_options[ GTM4WP_OPTION_BLACKLIST_STATUS ] = implode( ',', $_gtmrestrictlistitems );
|
418 |
-
}
|
419 |
-
|
420 |
-
return $current_options;
|
421 |
-
}
|
422 |
-
|
423 |
-
function gtm4wp_reload_options() {
|
424 |
-
global $gtm4wp_defaultoptions, $gtm4wp_business_verticals;
|
425 |
-
|
426 |
-
$storedoptions = (array) get_option( GTM4WP_OPTIONS );
|
427 |
-
if ( ! is_array( $gtm4wp_defaultoptions ) ) {
|
428 |
-
$gtm4wp_defaultoptions = array();
|
429 |
-
}
|
430 |
-
|
431 |
-
if ( !isset( $storedoptions[ GTM4WP_OPTION_BLACKLIST_STATUS ] ) ) {
|
432 |
-
$storedoptions = gtm4wp_migrate_blacklist_whitelist( $storedoptions );
|
433 |
-
}
|
434 |
-
|
435 |
-
$return_options = array_merge( $gtm4wp_defaultoptions, $storedoptions );
|
436 |
-
$return_options[ GTM4WP_OPTION_BLACKLIST_STATUS ] = explode( ',', $return_options[ GTM4WP_OPTION_BLACKLIST_STATUS ] );
|
437 |
-
|
438 |
-
if ( defined( 'GTM4WP_HARDCODED_GTM_ID' ) ) {
|
439 |
-
$return_options[ GTM4WP_OPTION_GTM_CODE ] = GTM4WP_HARDCODED_GTM_ID;
|
440 |
-
}
|
441 |
-
|
442 |
-
if ( defined( 'GTM4WP_HARDCODED_GTM_ENV_AUTH' ) ) {
|
443 |
-
$return_options[ GTM4WP_OPTION_ENV_GTM_AUTH ] = GTM4WP_HARDCODED_GTM_ENV_AUTH;
|
444 |
-
}
|
445 |
-
|
446 |
-
if ( defined( 'GTM4WP_HARDCODED_GTM_ENV_PREVIEW' ) ) {
|
447 |
-
$return_options[ GTM4WP_OPTION_ENV_GTM_PREVIEW ] = GTM4WP_HARDCODED_GTM_ENV_PREVIEW;
|
448 |
-
}
|
449 |
-
|
450 |
-
if ( !array_key_exists( $return_options[ GTM4WP_OPTION_INTEGRATE_WCBUSINESSVERTICAL ], $gtm4wp_business_verticals ) ) {
|
451 |
-
$return_options[ GTM4WP_OPTION_INTEGRATE_WCBUSINESSVERTICAL ] = $gtm4wp_defaultoptions[ GTM4WP_OPTION_INTEGRATE_WCBUSINESSVERTICAL ];
|
452 |
-
}
|
453 |
-
|
454 |
-
return $return_options;
|
455 |
-
}
|
456 |
-
|
457 |
-
function gtp4wp_debug_file( $debug_data ) {
|
458 |
-
$fp = fopen( dirname( __FILE__ ) . '/' . date( 'Y-m-d-H-i-s-u' ) . '.txt', 'w' );
|
459 |
-
if ( $fp ) {
|
460 |
-
fwrite( $fp, $debug_data );
|
461 |
-
fclose( $fp );
|
462 |
-
}
|
463 |
-
}
|
464 |
-
|
465 |
-
$gtm4wp_options = gtm4wp_reload_options();
|
1 |
+
<?php
|
2 |
+
define( 'GTM4WP_OPTIONS', 'gtm4wp-options' );
|
3 |
+
define( 'GTM4WP_OPTION_GTM_CODE', 'gtm-code' );
|
4 |
+
define( 'GTM4WP_OPTION_GTM_PLACEMENT', 'gtm-code-placement' );
|
5 |
+
define( 'GTM4WP_OPTION_DATALAYER_NAME', 'gtm-datalayer-variable-name' );
|
6 |
+
define( 'GTM4WP_OPTION_ENV_GTM_AUTH', 'gtm-env-gtm-auth' );
|
7 |
+
define( 'GTM4WP_OPTION_ENV_GTM_PREVIEW', 'gtm-env-gtm-preview' );
|
8 |
+
define( 'GTM4WP_OPTION_DONOTTRACK', 'gtm-browser-do-not-track' );
|
9 |
+
define( 'GTM4WP_OPTION_LOADEARLY', 'gtm-load-gtm-early' );
|
10 |
+
define( 'GTM4WP_OPTION_GTMDOMAIN', 'gtm-domain-name' );
|
11 |
+
|
12 |
+
define( 'GTM4WP_OPTION_INCLUDE_REMARKETING', 'include-remarketing' );
|
13 |
+
define( 'GTM4WP_OPTION_INCLUDE_LOGGEDIN', 'include-loggedin' );
|
14 |
+
define( 'GTM4WP_OPTION_INCLUDE_USERROLE', 'include-userrole' );
|
15 |
+
define( 'GTM4WP_OPTION_INCLUDE_USERID', 'include-userid' );
|
16 |
+
define( 'GTM4WP_OPTION_INCLUDE_USEREMAIL', 'include-useremail' );
|
17 |
+
define( 'GTM4WP_OPTION_INCLUDE_USERREGDATE', 'include-userregdate' );
|
18 |
+
define( 'GTM4WP_OPTION_INCLUDE_USERNAME', 'include-username' );
|
19 |
+
define( 'GTM4WP_OPTION_INCLUDE_VISITOR_IP', 'include-visitor-ip' );
|
20 |
+
define( 'GTM4WP_OPTION_INCLUDE_POSTTYPE', 'include-posttype' );
|
21 |
+
define( 'GTM4WP_OPTION_INCLUDE_CATEGORIES', 'include-categories' );
|
22 |
+
define( 'GTM4WP_OPTION_INCLUDE_TAGS', 'include-tags' );
|
23 |
+
define( 'GTM4WP_OPTION_INCLUDE_AUTHORID', 'include-authorid' );
|
24 |
+
define( 'GTM4WP_OPTION_INCLUDE_AUTHOR', 'include-author' );
|
25 |
+
define( 'GTM4WP_OPTION_INCLUDE_POSTDATE', 'include-postdate' );
|
26 |
+
define( 'GTM4WP_OPTION_INCLUDE_POSTTITLE', 'include-posttitle' );
|
27 |
+
define( 'GTM4WP_OPTION_INCLUDE_POSTCOUNT', 'include-postcount' );
|
28 |
+
define( 'GTM4WP_OPTION_INCLUDE_POSTID', 'include-postid' );
|
29 |
+
define( 'GTM4WP_OPTION_INCLUDE_POSTFORMAT', 'include-postformat' );
|
30 |
+
define( 'GTM4WP_OPTION_INCLUDE_POSTTERMLIST', 'include-postterms' );
|
31 |
+
define( 'GTM4WP_OPTION_INCLUDE_SEARCHDATA', 'include-searchdata' );
|
32 |
+
define( 'GTM4WP_OPTION_INCLUDE_BROWSERDATA', 'include-browserdata' );
|
33 |
+
define( 'GTM4WP_OPTION_INCLUDE_OSDATA', 'include-osdata' );
|
34 |
+
define( 'GTM4WP_OPTION_INCLUDE_DEVICEDATA', 'include-devicedata' );
|
35 |
+
define( 'GTM4WP_OPTION_INCLUDE_MISCGEO', 'include-miscgeo' );
|
36 |
+
define( 'GTM4WP_OPTION_INCLUDE_MISCGEOAPI', 'geo-apikey' );
|
37 |
+
define( 'GTM4WP_OPTION_INCLUDE_MISCGEOCF', 'include-miscgeo-cloudflare' );
|
38 |
+
define( 'GTM4WP_OPTION_INCLUDE_WEATHER', 'include-weather' );
|
39 |
+
define( 'GTM4WP_OPTION_INCLUDE_WEATHERUNITS', 'weather-weatherunits' );
|
40 |
+
define( 'GTM4WP_OPTION_INCLUDE_WEATHEROWMAPI', 'weather-openweathermap-apikey' );
|
41 |
+
define( 'GTM4WP_OPTION_INCLUDE_SITEID', 'include-siteid' );
|
42 |
+
define( 'GTM4WP_OPTION_INCLUDE_SITENAME', 'include-sitename' );
|
43 |
+
|
44 |
+
define( 'GTM4WP_OPTION_EVENTS_FORMMOVE', 'event-form-move' );
|
45 |
+
define( 'GTM4WP_OPTION_EVENTS_NEWUSERREG', 'event-new-user-registration' );
|
46 |
+
define( 'GTM4WP_OPTION_EVENTS_USERLOGIN', 'event-user-logged-in' );
|
47 |
+
|
48 |
+
define( 'GTM4WP_OPTION_EVENTS_YOUTUBE', 'event-youtube' );
|
49 |
+
define( 'GTM4WP_OPTION_EVENTS_VIMEO', 'event-vimeo' );
|
50 |
+
define( 'GTM4WP_OPTION_EVENTS_SOUNDCLOUD', 'event-soundcloud' );
|
51 |
+
|
52 |
+
define( 'GTM4WP_OPTION_SCROLLER_ENABLED', 'scroller-enabled' );
|
53 |
+
define( 'GTM4WP_OPTION_SCROLLER_DEBUGMODE', 'scroller-debug-mode' );
|
54 |
+
define( 'GTM4WP_OPTION_SCROLLER_CALLBACKTIME', 'scroller-callback-time' );
|
55 |
+
define( 'GTM4WP_OPTION_SCROLLER_DISTANCE', 'scroller-distance' );
|
56 |
+
define( 'GTM4WP_OPTION_SCROLLER_CONTENTID', 'scroller-contentid' );
|
57 |
+
define( 'GTM4WP_OPTION_SCROLLER_READERTIME', 'scroller-readertime' );
|
58 |
+
|
59 |
+
define( 'GTM4WP_OPTION_BLACKLIST_ENABLE', 'blacklist-enable' );
|
60 |
+
define( 'GTM4WP_OPTION_BLACKLIST_SANDBOXED', 'blacklist-sandboxed' );
|
61 |
+
define( 'GTM4WP_OPTION_BLACKLIST_STATUS', 'blacklist-status' );
|
62 |
+
|
63 |
+
// deprecated options BEGIN
|
64 |
+
define( 'GTM4WP_OPTION_BLACKLIST_ADADVISOR', 'blacklist-adadvisor' );
|
65 |
+
define( 'GTM4WP_OPTION_BLACKLIST_ADROLL', 'blacklist-adroll' );
|
66 |
+
define( 'GTM4WP_OPTION_BLACKLIST_AWCONV', 'blacklist-adwords-conversion' );
|
67 |
+
define( 'GTM4WP_OPTION_BLACKLIST_AWREMARKET', 'blacklist-adwords-remarketing' );
|
68 |
+
define( 'GTM4WP_OPTION_BLACKLIST_BIZO', 'blacklist-bizo' );
|
69 |
+
define( 'GTM4WP_OPTION_BLACKLIST_CLICKTALE', 'blacklist-clicktale' );
|
70 |
+
define( 'GTM4WP_OPTION_BLACKLIST_COMSCORE', 'blacklist-comscore' );
|
71 |
+
define( 'GTM4WP_OPTION_BLACKLIST_CUSTOMHTML', 'blacklist-custom-html' );
|
72 |
+
define( 'GTM4WP_OPTION_BLACKLIST_CUSTOMIMG', 'blacklist-custom-img-tag' );
|
73 |
+
define( 'GTM4WP_OPTION_BLACKLIST_DBLCLKCOUNT', 'blacklist-doubleclick-counter' );
|
74 |
+
define( 'GTM4WP_OPTION_BLACKLIST_DBLCLKSALES', 'blacklist-doubleclick-sales' );
|
75 |
+
define( 'GTM4WP_OPTION_BLACKLIST_GACLASSIC', 'blacklist-google-analytics' );
|
76 |
+
define( 'GTM4WP_OPTION_BLACKLIST_MARIN', 'blacklist-marin' );
|
77 |
+
define( 'GTM4WP_OPTION_BLACKLIST_MPLEXIFRAME', 'blacklist-mediaplex-iframe' );
|
78 |
+
define( 'GTM4WP_OPTION_BLACKLIST_MPLEXROI', 'blacklist-mediaplex-roi' );
|
79 |
+
define( 'GTM4WP_OPTION_BLACKLIST_MEDIA6DEG', 'blacklist-media6degrees' );
|
80 |
+
define( 'GTM4WP_OPTION_BLACKLIST_TURNCONV', 'blacklist-turn-conversion' );
|
81 |
+
define( 'GTM4WP_OPTION_BLACKLIST_TURNDATA', 'blacklist-turn-data' );
|
82 |
+
define( 'GTM4WP_OPTION_BLACKLIST_UA', 'blacklist-universal-analytics' );
|
83 |
+
|
84 |
+
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_DOMELEMENT', 'blacklist-macro-dom-element' );
|
85 |
+
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_CUSTOMJS', 'blacklist-macro-custom-js' );
|
86 |
+
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_CONSTANT', 'blacklist-macro-constant-string' );
|
87 |
+
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_1STCOOKIE', 'blacklist-macro-1st-party-cookie' );
|
88 |
+
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_EVENTNAME', 'blacklist-macro-event-name' );
|
89 |
+
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_JSVAR', 'blacklist-macro-javascript-variable' );
|
90 |
+
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_DLAYERVAR', 'blacklist-macro-datalayer-variable' );
|
91 |
+
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_RANDOMNUM', 'blacklist-macro-random-number' );
|
92 |
+
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_REFERRER', 'blacklist-macro-referrer' );
|
93 |
+
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_URL', 'blacklist-macro-url' );
|
94 |
+
define( 'GTM4WP_OPTION_BLACKLIST_MACRO_AUTOEVENT', 'blacklist-macro-autoevent-variable' );
|
95 |
+
// deprecated options END
|
96 |
+
|
97 |
+
define( 'GTM4WP_OPTION_INTEGRATE_WPCF7', 'integrate-wpcf7' );
|
98 |
+
|
99 |
+
define( 'GTM4WP_OPTION_INTEGRATE_WCTRACKCLASSICEC', 'integrate-woocommerce-track-classic-ecommerce' );
|
100 |
+
define( 'GTM4WP_OPTION_INTEGRATE_WCTRACKENHANCEDEC', 'integrate-woocommerce-track-enhanced-ecommerce' );
|
101 |
+
define( 'GTM4WP_OPTION_INTEGRATE_WCPRODPERIMPRESSION', 'integrate-woocommerce-product-per-impression' );
|
102 |
+
define( 'GTM4WP_OPTION_INTEGRATE_WCEECCARTASFIRSTSTEP', 'integrate-woocommerce-cart-as-first-step' );
|
103 |
+
define( 'GTM4WP_OPTION_INTEGRATE_WCEINCLUDECARTINDL', 'integrate-woocommerce-cart-content-in-datalayer' );
|
104 |
+
define( 'GTM4WP_OPTION_INTEGRATE_WCEECBRANDTAXONOMY', 'integrate-woocommerce-brand-taxonomy' );
|
105 |
+
define( 'GTM4WP_OPTION_INTEGRATE_WCREMARKETING', 'integrate-woocommerce-remarketing' );
|
106 |
+
define( 'GTM4WP_OPTION_INTEGRATE_WCBUSINESSVERTICAL', 'integrate-woocommerce-business-vertical' );
|
107 |
+
define( 'GTM4WP_OPTION_INTEGRATE_WCUSESKU', 'integrate-woocommerce-remarketing-usesku' );
|
108 |
+
define( 'GTM4WP_OPTION_INTEGRATE_WCUSEFULLCATEGORYPATH', 'integrate-woocommerce-use-full-category-path' );
|
109 |
+
define( 'GTM4WP_OPTION_INTEGRATE_WCREMPRODIDPREFIX', 'integrate-woocommerce-remarketing-productidprefix' );
|
110 |
+
define( 'GTM4WP_OPTION_INTEGRATE_WCCUSTOMERDATA', 'integrate-woocommerce-customer-data' );
|
111 |
+
define( 'GTM4WP_OPTION_INTEGRATE_WCORDERDATA', 'integrate-woocommerce-order-data' );
|
112 |
+
define( 'GTM4WP_OPTION_INTEGRATE_WCORDERMAXAGE', 'integrate-woocommerce-order-max-age' );
|
113 |
+
define( 'GTM4WP_OPTION_INTEGRATE_WCEXCLUDETAX', 'integrate-woocommerce-exclude-tax' );
|
114 |
+
define( 'GTM4WP_OPTION_INTEGRATE_WCEXCLUDESHIPPING', 'integrate-woocommerce-exclude-shipping' );
|
115 |
+
define( 'GTM4WP_OPTION_INTEGRATE_WCNOORDERTRACKEDFLAG', 'integrate-woocommerce-do-not-use-order-tracked-flag' );
|
116 |
+
|
117 |
+
define( 'GTM4WP_OPTION_INTEGRATE_GOOGLEOPTIMIZEIDS', 'integrate-google-optimize-idlist' );
|
118 |
+
define( 'GTM4WP_OPTION_INTEGRATE_GOOGLEOPTIMIZETIMEOUT', 'integrate-google-optimize-timeout' );
|
119 |
+
|
120 |
+
define( 'GTM4WP_OPTION_INTEGRATE_WPECOMMERCE', 'integrate-wp-e-commerce' );
|
121 |
+
|
122 |
+
define( 'GTM4WP_OPTION_INTEGRATE_AMPID', 'integrate-amp-id' );
|
123 |
+
|
124 |
+
define( 'GTM4WP_OPTION_INTEGRATE_COOKIEBOT', 'integrate-cookiebot' );
|
125 |
+
|
126 |
+
define( 'GTM4WP_PLACEMENT_FOOTER', 0 );
|
127 |
+
define( 'GTM4WP_PLACEMENT_BODYOPEN', 1 );
|
128 |
+
define( 'GTM4WP_PLACEMENT_BODYOPEN_AUTO', 2 );
|
129 |
+
define( 'GTM4WP_PLACEMENT_OFF', 3 );
|
130 |
+
|
131 |
+
global $gtm4wp_options, $gtm4wp_defaultoptions, $gtm4wp_entity_ids, $gtm4wp_business_verticals, $gtm4wp_business_verticals_ids;
|
132 |
+
|
133 |
+
$gtm4wp_options = array();
|
134 |
+
|
135 |
+
$gtm4wp_defaultoptions = array(
|
136 |
+
GTM4WP_OPTION_GTM_CODE => '',
|
137 |
+
GTM4WP_OPTION_DATALAYER_NAME => '',
|
138 |
+
GTM4WP_OPTION_GTM_PLACEMENT => GTM4WP_PLACEMENT_FOOTER,
|
139 |
+
GTM4WP_OPTION_ENV_GTM_AUTH => '',
|
140 |
+
GTM4WP_OPTION_ENV_GTM_PREVIEW => '',
|
141 |
+
GTM4WP_OPTION_DONOTTRACK => false,
|
142 |
+
GTM4WP_OPTION_LOADEARLY => false,
|
143 |
+
GTM4WP_OPTION_GTMDOMAIN => '',
|
144 |
+
|
145 |
+
GTM4WP_OPTION_INCLUDE_REMARKETING => false,
|
146 |
+
GTM4WP_OPTION_INCLUDE_LOGGEDIN => false,
|
147 |
+
GTM4WP_OPTION_INCLUDE_USERROLE => false,
|
148 |
+
GTM4WP_OPTION_INCLUDE_USERID => false,
|
149 |
+
GTM4WP_OPTION_INCLUDE_USEREMAIL => false,
|
150 |
+
GTM4WP_OPTION_INCLUDE_USERREGDATE => false,
|
151 |
+
GTM4WP_OPTION_INCLUDE_USERNAME => false,
|
152 |
+
GTM4WP_OPTION_INCLUDE_VISITOR_IP => false,
|
153 |
+
GTM4WP_OPTION_INCLUDE_POSTTYPE => true,
|
154 |
+
GTM4WP_OPTION_INCLUDE_CATEGORIES => true,
|
155 |
+
GTM4WP_OPTION_INCLUDE_TAGS => true,
|
156 |
+
GTM4WP_OPTION_INCLUDE_AUTHOR => true,
|
157 |
+
GTM4WP_OPTION_INCLUDE_AUTHORID => false,
|
158 |
+
GTM4WP_OPTION_INCLUDE_POSTDATE => false,
|
159 |
+
GTM4WP_OPTION_INCLUDE_POSTTITLE => false,
|
160 |
+
GTM4WP_OPTION_INCLUDE_POSTCOUNT => false,
|
161 |
+
GTM4WP_OPTION_INCLUDE_POSTID => false,
|
162 |
+
GTM4WP_OPTION_INCLUDE_POSTFORMAT => false,
|
163 |
+
GTM4WP_OPTION_INCLUDE_POSTTERMLIST => false,
|
164 |
+
GTM4WP_OPTION_INCLUDE_SEARCHDATA => false,
|
165 |
+
GTM4WP_OPTION_INCLUDE_BROWSERDATA => false,
|
166 |
+
GTM4WP_OPTION_INCLUDE_OSDATA => false,
|
167 |
+
GTM4WP_OPTION_INCLUDE_DEVICEDATA => false,
|
168 |
+
GTM4WP_OPTION_INCLUDE_MISCGEO => false,
|
169 |
+
GTM4WP_OPTION_INCLUDE_MISCGEOAPI => '',
|
170 |
+
GTM4WP_OPTION_INCLUDE_MISCGEOCF => false,
|
171 |
+
GTM4WP_OPTION_INCLUDE_WEATHER => false,
|
172 |
+
GTM4WP_OPTION_INCLUDE_WEATHERUNITS => 0,
|
173 |
+
GTM4WP_OPTION_INCLUDE_WEATHEROWMAPI => '',
|
174 |
+
GTM4WP_OPTION_INCLUDE_SITEID => false,
|
175 |
+
GTM4WP_OPTION_INCLUDE_SITENAME => false,
|
176 |
+
|
177 |
+
GTM4WP_OPTION_EVENTS_FORMMOVE => false,
|
178 |
+
GTM4WP_OPTION_EVENTS_NEWUSERREG => false,
|
179 |
+
GTM4WP_OPTION_EVENTS_USERLOGIN => false,
|
180 |
+
|
181 |
+
GTM4WP_OPTION_EVENTS_YOUTUBE => false,
|
182 |
+
GTM4WP_OPTION_EVENTS_VIMEO => false,
|
183 |
+
GTM4WP_OPTION_EVENTS_SOUNDCLOUD => false,
|
184 |
+
|
185 |
+
GTM4WP_OPTION_SCROLLER_ENABLED => false,
|
186 |
+
GTM4WP_OPTION_SCROLLER_DEBUGMODE => false,
|
187 |
+
GTM4WP_OPTION_SCROLLER_CALLBACKTIME => 100,
|
188 |
+
GTM4WP_OPTION_SCROLLER_DISTANCE => 150,
|
189 |
+
GTM4WP_OPTION_SCROLLER_CONTENTID => 'content',
|
190 |
+
GTM4WP_OPTION_SCROLLER_READERTIME => 60,
|
191 |
+
|
192 |
+
GTM4WP_OPTION_BLACKLIST_ENABLE => 0,
|
193 |
+
GTM4WP_OPTION_BLACKLIST_SANDBOXED => false,
|
194 |
+
GTM4WP_OPTION_BLACKLIST_STATUS => '',
|
195 |
+
|
196 |
+
GTM4WP_OPTION_INTEGRATE_WPCF7 => false,
|
197 |
+
|
198 |
+
GTM4WP_OPTION_INTEGRATE_WCTRACKCLASSICEC => false,
|
199 |
+
GTM4WP_OPTION_INTEGRATE_WCTRACKENHANCEDEC => false,
|
200 |
+
GTM4WP_OPTION_INTEGRATE_WCPRODPERIMPRESSION => 0,
|
201 |
+
GTM4WP_OPTION_INTEGRATE_WCEECCARTASFIRSTSTEP => false,
|
202 |
+
GTM4WP_OPTION_INTEGRATE_WCEINCLUDECARTINDL => false,
|
203 |
+
GTM4WP_OPTION_INTEGRATE_WCEECBRANDTAXONOMY => '',
|
204 |
+
GTM4WP_OPTION_INTEGRATE_WCREMARKETING => false,
|
205 |
+
GTM4WP_OPTION_INTEGRATE_WCBUSINESSVERTICAL => 'retail',
|
206 |
+
GTM4WP_OPTION_INTEGRATE_WCUSESKU => false,
|
207 |
+
GTM4WP_OPTION_INTEGRATE_WCUSEFULLCATEGORYPATH => false,
|
208 |
+
GTM4WP_OPTION_INTEGRATE_WCREMPRODIDPREFIX => '',
|
209 |
+
GTM4WP_OPTION_INTEGRATE_WCCUSTOMERDATA => false,
|
210 |
+
GTM4WP_OPTION_INTEGRATE_WCORDERDATA => false,
|
211 |
+
GTM4WP_OPTION_INTEGRATE_WCORDERMAXAGE => 30,
|
212 |
+
GTM4WP_OPTION_INTEGRATE_WCEXCLUDETAX => false,
|
213 |
+
GTM4WP_OPTION_INTEGRATE_WCEXCLUDESHIPPING => false,
|
214 |
+
GTM4WP_OPTION_INTEGRATE_WCNOORDERTRACKEDFLAG => false,
|
215 |
+
|
216 |
+
GTM4WP_OPTION_INTEGRATE_GOOGLEOPTIMIZEIDS => '',
|
217 |
+
GTM4WP_OPTION_INTEGRATE_GOOGLEOPTIMIZETIMEOUT => 4000,
|
218 |
+
|
219 |
+
GTM4WP_OPTION_INTEGRATE_WPECOMMERCE => false,
|
220 |
+
|
221 |
+
GTM4WP_OPTION_INTEGRATE_AMPID => '',
|
222 |
+
|
223 |
+
GTM4WP_OPTION_INTEGRATE_COOKIEBOT => false
|
224 |
+
);
|
225 |
+
|
226 |
+
$gtm4wp_business_verticals = array(
|
227 |
+
'retail' => 'Retail',
|
228 |
+
'education' => 'Education',
|
229 |
+
'flights' => 'Flights',
|
230 |
+
'hotel_rental' => 'Hotel rental',
|
231 |
+
'jobs' => 'Jobs',
|
232 |
+
'local' => 'Local deals',
|
233 |
+
'real_estate' => 'Real estate',
|
234 |
+
'travel' => 'Travel',
|
235 |
+
'custom' => 'Custom'
|
236 |
+
);
|
237 |
+
|
238 |
+
$gtm4wp_business_verticals_ids = array(
|
239 |
+
'flights' => 'destination',
|
240 |
+
'travel' => 'destination'
|
241 |
+
);
|
242 |
+
|
243 |
+
$gtm4wp_entity_ids = array(
|
244 |
+
'tags' => array(
|
245 |
+
'abtGeneric' => 'AB TASTY Generic Tag',
|
246 |
+
'ta' => 'AdAdvisor Tag',
|
247 |
+
'adm' => 'Adometry Tag',
|
248 |
+
'asp' => 'AdRoll Smart Pixel Tag',
|
249 |
+
'awct' => 'Google Ads Conversion Tracking Tag',
|
250 |
+
'sp' => 'Google Ads Remarketing Tag',
|
251 |
+
'awc' => 'Affiliate Window Conversion Tag',
|
252 |
+
'awj' => 'Affiliate Window Journey Tag',
|
253 |
+
'baut' => 'Bing Ads Universal Event Tracking',
|
254 |
+
'bb' => 'Bizrate Insights Buyer Survey Solution',
|
255 |
+
'bsa' => 'Bizrate Insights Site Abandonment Survey Solution',
|
256 |
+
'cts' => 'ClickTale Standard Tracking Tag',
|
257 |
+
'csm' => 'comScore Unified Digital Measurement Tag',
|
258 |
+
'mpm' => 'Conversant Mediaplex - IFRAME MCT Tag',
|
259 |
+
'mpr' => 'Conversant Mediaplex - Standard IMG ROI Tag',
|
260 |
+
'gclidw' => 'Conversion Linker',
|
261 |
+
'cegg' => 'Crazy Egg Tag',
|
262 |
+
'crto' => 'Criteo OneTag',
|
263 |
+
'html' => 'Custom HTML Tag',
|
264 |
+
'img' => 'Custom Image Tag',
|
265 |
+
'dstag' => 'DistroScale Tag',
|
266 |
+
'flc' => 'Floodlight Counter Tag',
|
267 |
+
'fls' => 'Floodlight Sales Tag',
|
268 |
+
'm6d' => 'Dstillery Universal Pixel Tag',
|
269 |
+
'ela' => 'Eulerian Analytics Tag',
|
270 |
+
'ga' => 'Google Analytics Tag (classic, legacy)',
|
271 |
+
'ua' => 'Google Analytics Tag (universal, latest)',
|
272 |
+
'gcs' => 'Google Consumer Surveys Website Satisfaction',
|
273 |
+
'opt' => 'Google Optimize',
|
274 |
+
'ts' => 'Google Trusted Stores Tag',
|
275 |
+
'hjtc' => 'Hotjar Tracking Code',
|
276 |
+
'infinity' => 'Infinity Call Tracking Tag',
|
277 |
+
'sca' => 'Intent Media - Search Compare Ads',
|
278 |
+
'k50Init' => 'K50 tracking tag',
|
279 |
+
'll' => 'LeadLab',
|
280 |
+
'bzi' => 'LinkedIn Tag',
|
281 |
+
'ljs' => 'Lytics JS Tag',
|
282 |
+
'ms' => 'Marin Software Tag',
|
283 |
+
'mpm' => 'Mediaplex - IFRAME MCT Tag',
|
284 |
+
'mpr' => 'Mediaplex - Standard IMG ROI Tag',
|
285 |
+
'messagemate' => 'Message Mate',
|
286 |
+
'mf' => 'Mouseflow Tag',
|
287 |
+
'ta' => 'Neustar Pixel',
|
288 |
+
'ndcr' => 'Nielsen DCR Static Lite Tag',
|
289 |
+
'nudge' => 'Nudge Content Analytics Tag',
|
290 |
+
'okt' => 'Oktopost Tracking Code',
|
291 |
+
'omc' => 'Optimise Conversion Tag',
|
292 |
+
'messagemate' => 'OwnerListens Message Mate',
|
293 |
+
'pa' => 'Perfect Audience Pixel',
|
294 |
+
'pc' => 'Personali Canvas',
|
295 |
+
'pntr' => 'Pinterest',
|
296 |
+
'placedPixel' => 'Placed',
|
297 |
+
'pijs' => 'Pulse Insights Voice of Customer Platform',
|
298 |
+
'qcm' => 'Quantcast Audience Measurement',
|
299 |
+
'qpx' => 'Quora Pixel',
|
300 |
+
'fxm' => 'Rawsoft FoxMetrics',
|
301 |
+
'scjs' => 'SaleCycle JavaScript Tag',
|
302 |
+
'scp' => 'SaleCycle Pixel Tag',
|
303 |
+
'sfc' => 'SearchForce JavaScript Tracking for Conversion Page',
|
304 |
+
'sfl' => 'SearchForce JavaScript Tracking for Landing Page',
|
305 |
+
'sfr' => 'SearchForce Redirection Tracking Tag',
|
306 |
+
'shareaholic' => 'Shareaholic',
|
307 |
+
'svw' => 'Survicate Widget',
|
308 |
+
'tdlc' => 'Tradedoubler Lead Conversion Tag',
|
309 |
+
'tdsc' => 'Tradedoubler Sale Conversion Tag',
|
310 |
+
'tc' => 'Turn Conversion Tracking Tag',
|
311 |
+
'tdc' => 'Turn Data Collection Tag',
|
312 |
+
'twitter_website_tag' => 'Twitter Universal Website Tag',
|
313 |
+
'uslt' => 'Upsellit Global Footer Tag',
|
314 |
+
'uspt' => 'Upsellit Confirmation Tag',
|
315 |
+
'vei' => 'Ve Interactive JavaScript Tag',
|
316 |
+
'veip' => 'Ve Interactive Pixel',
|
317 |
+
'vdc' => 'VisualDNA Conversion Tag',
|
318 |
+
'xpsh' => 'Xtremepush',
|
319 |
+
'yieldify' => 'Yieldify',
|
320 |
+
'zone' => 'Zones'
|
321 |
+
),
|
322 |
+
'triggers' => array(
|
323 |
+
'evl' => 'Element Visibility Listener/Trigger',
|
324 |
+
'cl' => 'Click Listener/Trigger',
|
325 |
+
'fsl' => 'Form Submit Listener/Trigger',
|
326 |
+
'hl' => 'History Listener/Trigger',
|
327 |
+
'jel' => 'JavaScript Error Listener/Trigger',
|
328 |
+
'lcl' => 'Link Click Listener/Trigger',
|
329 |
+
'sdl' => 'Scroll Depth Listener/Trigger',
|
330 |
+
'tl' => 'Timer Listener/Trigger',
|
331 |
+
'ytl' => 'YouTube Video Listener/Trigger'
|
332 |
+
),
|
333 |
+
'variables' => array(
|
334 |
+
'k' => '1st Party Cookie',
|
335 |
+
'c' => 'Constant',
|
336 |
+
'ctv' => 'Container Version Number',
|
337 |
+
'e' => 'Custom Event',
|
338 |
+
'jsm' => 'Custom JavaScript Variable',
|
339 |
+
'v' => 'Data Layer Variable',
|
340 |
+
'dbg' => 'Debug Mode',
|
341 |
+
'd' => 'DOM Element',
|
342 |
+
'vis' => 'Element Visibility',
|
343 |
+
'f' => 'HTTP Referrer',
|
344 |
+
'j' => 'JavaScript Variable',
|
345 |
+
'smm' => 'Lookup Table',
|
346 |
+
'r' => 'Random Number',
|
347 |
+
'remm' => 'RegEx Table',
|
348 |
+
'u' => 'URL'
|
349 |
+
)
|
350 |
+
);
|
351 |
+
|
352 |
+
function gtm4wp_migrate_blacklist_whitelist( $current_options ) {
|
353 |
+
if ( ( array_key_exists( GTM4WP_OPTION_BLACKLIST_ENABLE, $current_options ) )
|
354 |
+
&& ( $current_options[ GTM4WP_OPTION_BLACKLIST_ENABLE ] > 0 )
|
355 |
+
) {
|
356 |
+
$_gtmrestrictlistitems = array();
|
357 |
+
|
358 |
+
// IDs from https://developers.google.com/tag-manager/devguide#security
|
359 |
+
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_ADADVISOR ] ) {
|
360 |
+
$_gtmrestrictlistitems[] = 'ta';
|
361 |
+
}
|
362 |
+
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_ADROLL ] ) {
|
363 |
+
$_gtmrestrictlistitems[] = 'asp';
|
364 |
+
}
|
365 |
+
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_AWCONV ] ) {
|
366 |
+
$_gtmrestrictlistitems[] = 'awct';
|
367 |
+
}
|
368 |
+
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_AWREMARKET ] ) {
|
369 |
+
$_gtmrestrictlistitems[] = 'sp';
|
370 |
+
}
|
371 |
+
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_BIZO ] ) {
|
372 |
+
$_gtmrestrictlistitems[] = 'bzi';
|
373 |
+
}
|
374 |
+
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_CLICKTALE ] ) {
|
375 |
+
$_gtmrestrictlistitems[] = 'cts';
|
376 |
+
}
|
377 |
+
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_COMSCORE ] ) {
|
378 |
+
$_gtmrestrictlistitems[] = 'csm';
|
379 |
+
}
|
380 |
+
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_CUSTOMHTML ] ) {
|
381 |
+
$_gtmrestrictlistitems[] = 'html';
|
382 |
+
}
|
383 |
+
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_CUSTOMIMG ] ) {
|
384 |
+
$_gtmrestrictlistitems[] = 'img';
|
385 |
+
}
|
386 |
+
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_DBLCLKCOUNT ] ) {
|
387 |
+
$_gtmrestrictlistitems[] = 'flc';
|
388 |
+
}
|
389 |
+
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_DBLCLKSALES ] ) {
|
390 |
+
$_gtmrestrictlistitems[] = 'fls';
|
391 |
+
}
|
392 |
+
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_GACLASSIC ] ) {
|
393 |
+
$_gtmrestrictlistitems[] = 'ga';
|
394 |
+
}
|
395 |
+
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_MARIN ] ) {
|
396 |
+
$_gtmrestrictlistitems[] = 'ms';
|
397 |
+
}
|
398 |
+
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_MPLEXIFRAME ] ) {
|
399 |
+
$_gtmrestrictlistitems[] = 'mpm';
|
400 |
+
}
|
401 |
+
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_MPLEXROI ] ) {
|
402 |
+
$_gtmrestrictlistitems[] = 'mpr';
|
403 |
+
}
|
404 |
+
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_MEDIA6DEG ] ) {
|
405 |
+
$_gtmrestrictlistitems[] = 'm6d';
|
406 |
+
}
|
407 |
+
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_TURNCONV ] ) {
|
408 |
+
$_gtmrestrictlistitems[] = 'tc';
|
409 |
+
}
|
410 |
+
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_TURNDATA ] ) {
|
411 |
+
$_gtmrestrictlistitems[] = 'tdc';
|
412 |
+
}
|
413 |
+
if ( $current_options[ GTM4WP_OPTION_BLACKLIST_UA ] ) {
|
414 |
+
$_gtmrestrictlistitems[] = 'ua';
|
415 |
+
}
|
416 |
+
|
417 |
+
$current_options[ GTM4WP_OPTION_BLACKLIST_STATUS ] = implode( ',', $_gtmrestrictlistitems );
|
418 |
+
}
|
419 |
+
|
420 |
+
return $current_options;
|
421 |
+
}
|
422 |
+
|
423 |
+
function gtm4wp_reload_options() {
|
424 |
+
global $gtm4wp_defaultoptions, $gtm4wp_business_verticals;
|
425 |
+
|
426 |
+
$storedoptions = (array) get_option( GTM4WP_OPTIONS );
|
427 |
+
if ( ! is_array( $gtm4wp_defaultoptions ) ) {
|
428 |
+
$gtm4wp_defaultoptions = array();
|
429 |
+
}
|
430 |
+
|
431 |
+
if ( !isset( $storedoptions[ GTM4WP_OPTION_BLACKLIST_STATUS ] ) ) {
|
432 |
+
$storedoptions = gtm4wp_migrate_blacklist_whitelist( $storedoptions );
|
433 |
+
}
|
434 |
+
|
435 |
+
$return_options = array_merge( $gtm4wp_defaultoptions, $storedoptions );
|
436 |
+
$return_options[ GTM4WP_OPTION_BLACKLIST_STATUS ] = explode( ',', $return_options[ GTM4WP_OPTION_BLACKLIST_STATUS ] );
|
437 |
+
|
438 |
+
if ( defined( 'GTM4WP_HARDCODED_GTM_ID' ) ) {
|
439 |
+
$return_options[ GTM4WP_OPTION_GTM_CODE ] = GTM4WP_HARDCODED_GTM_ID;
|
440 |
+
}
|
441 |
+
|
442 |
+
if ( defined( 'GTM4WP_HARDCODED_GTM_ENV_AUTH' ) ) {
|
443 |
+
$return_options[ GTM4WP_OPTION_ENV_GTM_AUTH ] = GTM4WP_HARDCODED_GTM_ENV_AUTH;
|
444 |
+
}
|
445 |
+
|
446 |
+
if ( defined( 'GTM4WP_HARDCODED_GTM_ENV_PREVIEW' ) ) {
|
447 |
+
$return_options[ GTM4WP_OPTION_ENV_GTM_PREVIEW ] = GTM4WP_HARDCODED_GTM_ENV_PREVIEW;
|
448 |
+
}
|
449 |
+
|
450 |
+
if ( !array_key_exists( $return_options[ GTM4WP_OPTION_INTEGRATE_WCBUSINESSVERTICAL ], $gtm4wp_business_verticals ) ) {
|
451 |
+
$return_options[ GTM4WP_OPTION_INTEGRATE_WCBUSINESSVERTICAL ] = $gtm4wp_defaultoptions[ GTM4WP_OPTION_INTEGRATE_WCBUSINESSVERTICAL ];
|
452 |
+
}
|
453 |
+
|
454 |
+
return $return_options;
|
455 |
+
}
|
456 |
+
|
457 |
+
function gtp4wp_debug_file( $debug_data ) {
|
458 |
+
$fp = fopen( dirname( __FILE__ ) . '/' . date( 'Y-m-d-H-i-s-u' ) . '.txt', 'w' );
|
459 |
+
if ( $fp ) {
|
460 |
+
fwrite( $fp, $debug_data );
|
461 |
+
fclose( $fp );
|
462 |
+
}
|
463 |
+
}
|
464 |
+
|
465 |
+
$gtm4wp_options = gtm4wp_reload_options();
|
duracelltomi-google-tag-manager-for-wordpress.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Google Tag Manager for Wordpress
|
4 |
-
Version: 1.13
|
5 |
Plugin URI: https://gtm4wp.com/
|
6 |
Description: The first Google Tag Manager plugin for WordPress with business goals in mind
|
7 |
Author: Thomas Geiger
|
@@ -13,7 +13,7 @@ WC requires at least: 3.2
|
|
13 |
WC tested up to: 5.3.0
|
14 |
*/
|
15 |
|
16 |
-
define( 'GTM4WP_VERSION', '1.13' );
|
17 |
define( 'GTM4WP_PATH', plugin_dir_path( __FILE__ ) );
|
18 |
|
19 |
global $gtp4wp_plugin_url, $gtp4wp_plugin_basename;
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Google Tag Manager for Wordpress
|
4 |
+
Version: 1.13.1
|
5 |
Plugin URI: https://gtm4wp.com/
|
6 |
Description: The first Google Tag Manager plugin for WordPress with business goals in mind
|
7 |
Author: Thomas Geiger
|
13 |
WC tested up to: 5.3.0
|
14 |
*/
|
15 |
|
16 |
+
define( 'GTM4WP_VERSION', '1.13.1' );
|
17 |
define( 'GTM4WP_PATH', plugin_dir_path( __FILE__ ) );
|
18 |
|
19 |
global $gtp4wp_plugin_url, $gtp4wp_plugin_basename;
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: google tag manager, tag manager, gtm, google, adwords, google adwords, goo
|
|
5 |
Requires at least: 3.4.0
|
6 |
Requires PHP: 5.6
|
7 |
Tested up to: 5.7.2
|
8 |
-
Stable tag: 1.13
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl.html
|
11 |
|
@@ -233,6 +233,11 @@ https://gtm4wp.com/how-to-articles/how-to-exclude-admin-users-from-being-tracked
|
|
233 |
|
234 |
== Changelog ==
|
235 |
|
|
|
|
|
|
|
|
|
|
|
236 |
= 1.13 =
|
237 |
|
238 |
WARNING!
|
@@ -711,7 +716,11 @@ Please report all bugs found in my plugin using the [contact form on my website]
|
|
711 |
|
712 |
== Upgrade Notice ==
|
713 |
|
714 |
-
= 1.
|
|
|
|
|
|
|
|
|
715 |
|
716 |
Updated support for Google Ads dynamic remarketing with WooCommerce, added support for server side containers and Cookiebot + fixes
|
717 |
|
5 |
Requires at least: 3.4.0
|
6 |
Requires PHP: 5.6
|
7 |
Tested up to: 5.7.2
|
8 |
+
Stable tag: 1.13.1
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl.html
|
11 |
|
233 |
|
234 |
== Changelog ==
|
235 |
|
236 |
+
= 1.13.1 =
|
237 |
+
|
238 |
+
* Fix: better PHP8 compatibility
|
239 |
+
* Fix: PHP notice on admin page
|
240 |
+
|
241 |
= 1.13 =
|
242 |
|
243 |
WARNING!
|
716 |
|
717 |
== Upgrade Notice ==
|
718 |
|
719 |
+
= 1.13.1 =
|
720 |
+
|
721 |
+
Bugfix release
|
722 |
+
|
723 |
+
= 1.13 =
|
724 |
|
725 |
Updated support for Google Ads dynamic remarketing with WooCommerce, added support for server side containers and Cookiebot + fixes
|
726 |
|