forked from duracelltomi/gtm4wp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin-tab-basicdata.php
More file actions
198 lines (197 loc) · 12.4 KB
/
admin-tab-basicdata.php
File metadata and controls
198 lines (197 loc) · 12.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<?php
/**
* GTM4WP options on the Basic data tab.
*
* @package GTM4WP
* @author Thomas Geiger
* @copyright 2013- Geiger Tamás e.v. (Thomas Geiger s.e.)
* @license GNU General Public License, version 3
*/
$GLOBALS['gtm4wp_includefieldtexts'] = array(
GTM4WP_OPTION_INCLUDE_POSTTYPE => array(
'label' => esc_html__( 'Posttype of current post/archive', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include the type of the current post or archive page (post, page or any custom post type).', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_CATEGORIES => array(
'label' => esc_html__( 'Category list of current post/archive', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include the category names of the current post or archive page', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_TAGS => array(
'label' => esc_html__( 'Tags of current post', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include the tags of the current post.', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_AUTHORID => array(
'label' => esc_html__( 'Post author ID', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include the ID of the author on the current post or author page.', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_AUTHOR => array(
'label' => esc_html__( 'Post author name', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include the name of the author on the current post or author page.', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_POSTDATE => array(
'label' => esc_html__( 'Post date', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include the date of the current post. This will include 4 dataLayer variables: full date, post year, post month, post date.', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_POSTTITLE => array(
'label' => esc_html__( 'Post title', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include the title of the current post.', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_POSTCOUNT => array(
'label' => esc_html__( 'Post count', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include the count of the posts currently shown on the page and the total number of posts in the category/tag/any taxonomy.', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_POSTID => array(
'label' => esc_html__( 'Post ID', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include the post id.', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_POSTFORMAT => array(
'label' => esc_html__( 'Post Format', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include the post format.', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_POSTTERMLIST => array(
'label' => esc_html__( 'Post Terms', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include taxonomy values associated with a given post.', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_SEARCHDATA => array(
'label' => esc_html__( 'Search data', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include the search term, referring page URL and number of results on the search page.', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_LOGGEDIN => array(
'label' => esc_html__( 'Logged in status', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include whether there is a logged in user on your website.', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_USERROLE => array(
'label' => esc_html__( 'Logged in user role', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include the role of the logged in user.', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_USERID => array(
'label' => esc_html__( 'Logged in user ID', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include the ID of the logged in user.', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_USERNAME => array(
'label' => esc_html__( 'Logged in user name', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include the username of the logged in user.', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_USEREMAIL => array(
'label' => esc_html__( 'Logged in user email', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include the email address of the logged in user.', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_USERREGDATE => array(
'label' => esc_html__( 'Logged in user creation date', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include the date of creation (registration) of the logged in user.', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_VISITOR_IP => array(
'label' => esc_html__( 'Visitor IP', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include the IP address of the visitor. You might use this to filter internal traffic inside your GTM container. Please be aware that per GDPR its not allowed to transmit this full IP address to Google Analytics or to any other measurement system without explicit consent from the visitor.', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_VISITOR_IP_HEADER => array(
'label' => esc_html__( 'Visitor IP - Read from custom header.', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'By default, the plugin will check the so called REMOTE_ADDR system variable for IP addresses. In some cases, this might not include the correct address. You may specify a custom header to read the IP address from.', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_BROWSERDATA => array(
'label' => esc_html__( 'Browser data *', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include the name, version and engine data of the browser the visitor uses.', 'duracelltomi-google-tag-manager' ),
),
GTM4WP_OPTION_INCLUDE_OSDATA => array(
'label' => esc_html__( 'OS data *', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include the name and version of the operating system the visitor uses.', 'duracelltomi-google-tag-manager' ),
),
GTM4WP_OPTION_INCLUDE_DEVICEDATA => array(
'label' => esc_html__( 'Device data *', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Check this option to include the type of device the user is currently using (desktop, tablet or mobile) including manufacturer and model data.', 'duracelltomi-google-tag-manager' ),
),
GTM4WP_OPTION_INCLUDE_MISCGEO => array(
'label' => esc_html__( 'Geo data', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Add geo data (latitude, longitude, country, city, etc) of the current visitor (provided by ipstack.com)', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_EXPERIMENTAL,
),
GTM4WP_OPTION_INCLUDE_MISCGEOAPI => array(
'label' => esc_html__( 'IPStack.com API key', 'duracelltomi-google-tag-manager' ),
'description' => sprintf(
// translators: 1: the anchor eleemnt pointing to ipstack.com to register for API keys. 2: closing anchor tag.
esc_html__(
'Enter your IPStack.com API key here. %1$sGet a free API key here%2$s.',
'duracelltomi-google-tag-manager'
),
'<a href="https://ipstack.com/product?utm_source=gtm4wp&utm_medium=link&utm_campaign=gtm4wp-google-tag-manager-for-wordpress" target="_blank" rel="noopener">',
'</a>'
),
'phase' => GTM4WP_PHASE_EXPERIMENTAL,
),
GTM4WP_OPTION_INCLUDE_MISCGEOCF => array(
'label' => esc_html__( 'Cloudflare country code', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Add the country code of the user provided by Cloudflare (if Cloudflare is used with your site)', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_EXPERIMENTAL,
),
GTM4WP_OPTION_INCLUDE_WEATHER => array(
'label' => esc_html__( 'Weather data', 'duracelltomi-google-tag-manager' ),
'description' => sprintf(
gtm4wp_safe_admin_html(
// translators: 1: opening anchor tag linking to ipstack.com product page. 2: closing anchor tag. 3: opening anchor tag linking to OpenWeatherMap pricing page. 4: closing anchor tag.
__(
'Check this option to include the current weather conditions around the current visitor.<br /><br />
<strong>Attention!</strong> This feature uses %1$sipstack.com%2$s and
%3$sopenweathermap.org%4$s to collect data.<br />
Depending on your website\'s traffic, additional fees may apply!<br />
This plugin caches weather data for 1 hour to lower the need to access those services.<br /><br />
If you activate weather data, <strong>you will need</strong> to add an IPStack.com API key regardless of whether you
activate the \'Geo data\' option!',
'duracelltomi-google-tag-manager'
)
),
'<a href="https://ipstack.com/product?utm_source=gtm4wp&utm_medium=link&utm_campaign=gtm4wp-google-tag-manager-for-wordpress" target="_blank" rel="noopener">',
'</a>',
'<a href="http://openweathermap.org/price?utm_source=gtm4wp&utm_medium=link&utm_campaign=gtm4wp-google-tag-manager-for-wordpress" target="_blank" rel="noopener">',
'</a>'
),
'phase' => GTM4WP_PHASE_EXPERIMENTAL,
),
GTM4WP_OPTION_INCLUDE_WEATHERUNITS => array(
'label' => esc_html__( 'Weather data units', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Select which temperature units you would like to use.', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_EXPERIMENTAL,
),
GTM4WP_OPTION_INCLUDE_WEATHEROWMAPI => array(
'label' => esc_html__( 'OpenWeatherMap API key', 'duracelltomi-google-tag-manager' ),
'description' => sprintf(
// translators: 1: opening anchor tag linking to Open Weather Map's pricing page. 2: closing anchor tag.
esc_html__(
'Enter your OpenWeatherMap API key here. %1$sGet a free API key here%2$s.',
'duracelltomi-google-tag-manager'
),
'<a href="http://openweathermap.org/price?utm_source=gtm4wp&utm_medium=link&utm_campaign=gtm4wp-google-tag-manager-for-wordpress" target="_blank" rel="noopener">',
'</a>'
),
'phase' => GTM4WP_PHASE_EXPERIMENTAL,
),
GTM4WP_OPTION_INCLUDE_SITEID => array(
'label' => esc_html__( 'Site ID', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'ID of the current site in a WordPress Multisite environment', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
GTM4WP_OPTION_INCLUDE_SITENAME => array(
'label' => esc_html__( 'Site name', 'duracelltomi-google-tag-manager' ),
'description' => esc_html__( 'Name of the current site in a WordPress Multisite environment', 'duracelltomi-google-tag-manager' ),
'phase' => GTM4WP_PHASE_STABLE,
),
);