Version Description
The plugin itself is now declared as stable. This means that it should work with most WordPress instances. From now on each version will include features labeled as:
- Beta: the feature has been proven to work for several users but it can still have some bugs
- Experimental: new feature that needs proper testing with more users
- Depecrated: this feature will be removed in a future version
If you see any issue with beta or experimental functions just disable the checkbox. Using this error messages should disappear. Please report all bugs found in my plugin using the contact form on my website.
- Fixed: wrong GTM container code when renaming default dataLayer variable name (thx Vassilis Papavassiliou)
- Fixed: Enhanced Ecommerce product click data was "undefined" in some cases (thx Sergio Alen)
- Fixed: wrong user role detection while addint visitorType to the dataLayer (thx Philippe Vachon-Rivard)
- Changed: only add visitorId to the dataLayer if there is a logged in user
- Added: feature labels so that you can see beta, experimental and depecrated features
- Depecrated: outbound click, email click and download click events. You should use GTM trigger events instead
Download this release
Release Info
Developer | duracelltomi |
Plugin | DuracellTomi's Google Tag Manager for WordPress |
Version | 1.0 |
Comparing to | |
See all releases |
Code changes from version 0.9.1 to 1.0
- admin/admin.php +145 -77
- css/admin-gtm4wp.css +28 -0
- duracelltomi-google-tag-manager-for-wordpress.php +4 -4
- integration/woocommerce.php +1 -1
- js/admin-tabcreator.js +2 -2
- public/frontend.php +6 -3
- readme.txt +49 -10
admin/admin.php
CHANGED
@@ -19,6 +19,11 @@ define( 'GTM4WP_ADMIN_GROUP_CREDITS', 'gtm4wp-admin-group-credits' );
|
|
19 |
|
20 |
define( 'GTM4WP_USER_NOTICES_KEY', 'gtm4wp_user_notices_dismisses' );
|
21 |
|
|
|
|
|
|
|
|
|
|
|
22 |
$GLOBALS["gtm4wp_def_user_notices_dismisses"] = array(
|
23 |
"enter-gtm-code" => false,
|
24 |
"wc-ga-plugin-warning" => false,
|
@@ -28,255 +33,315 @@ $GLOBALS["gtm4wp_def_user_notices_dismisses"] = array(
|
|
28 |
$GLOBALS["gtm4wp_includefieldtexts"] = array(
|
29 |
GTM4WP_OPTION_INCLUDE_POSTTYPE => array(
|
30 |
"label" => __( "Posttype of current post/archive", GTM4WP_TEXTDOMAIN ),
|
31 |
-
"description" => __( "Check this option to include the type of the current post or archive page (post, page or any custom post type).", GTM4WP_TEXTDOMAIN )
|
|
|
32 |
),
|
33 |
GTM4WP_OPTION_INCLUDE_CATEGORIES => array(
|
34 |
"label" => __( "Category list of current post/archive", GTM4WP_TEXTDOMAIN ),
|
35 |
-
"description" => __( "Check this option to include the category names of the current post or archive page", GTM4WP_TEXTDOMAIN )
|
|
|
36 |
),
|
37 |
GTM4WP_OPTION_INCLUDE_TAGS => array(
|
38 |
"label" => __( "Tags of current post", GTM4WP_TEXTDOMAIN ),
|
39 |
-
"description" => __( "Check this option to include the tags of the current post.", GTM4WP_TEXTDOMAIN )
|
|
|
40 |
),
|
41 |
GTM4WP_OPTION_INCLUDE_AUTHOR => array(
|
42 |
"label" => __( "Post author name", GTM4WP_TEXTDOMAIN ),
|
43 |
-
"description" => __( "Check this option to include the author's name of the current post or author page.", GTM4WP_TEXTDOMAIN )
|
|
|
44 |
),
|
45 |
GTM4WP_OPTION_INCLUDE_POSTDATE => array(
|
46 |
"label" => __( "Post date", GTM4WP_TEXTDOMAIN ),
|
47 |
-
"description" => __( "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.", GTM4WP_TEXTDOMAIN )
|
|
|
48 |
),
|
49 |
GTM4WP_OPTION_INCLUDE_POSTTITLE => array(
|
50 |
"label" => __( "Post title", GTM4WP_TEXTDOMAIN ),
|
51 |
-
"description" => __( "Check this option to include the title of the current post.", GTM4WP_TEXTDOMAIN )
|
|
|
52 |
),
|
53 |
GTM4WP_OPTION_INCLUDE_POSTCOUNT => array(
|
54 |
"label" => __( "Post count", GTM4WP_TEXTDOMAIN ),
|
55 |
-
"description" => __( "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.", GTM4WP_TEXTDOMAIN )
|
|
|
56 |
),
|
57 |
GTM4WP_OPTION_INCLUDE_SEARCHDATA => array(
|
58 |
"label" => __( "Search data", GTM4WP_TEXTDOMAIN ),
|
59 |
-
"description" => __( "Check this option to include the search term, referring page URL and number of results on the search page.", GTM4WP_TEXTDOMAIN )
|
|
|
60 |
),
|
61 |
GTM4WP_OPTION_INCLUDE_LOGGEDIN => array(
|
62 |
"label" => __( "Logged in status", GTM4WP_TEXTDOMAIN ),
|
63 |
-
"description" => __( "Check this option to include whether there is a logged in user on your website.", GTM4WP_TEXTDOMAIN )
|
|
|
64 |
),
|
65 |
GTM4WP_OPTION_INCLUDE_USERROLE => array(
|
66 |
"label" => __( "Logged in user role", GTM4WP_TEXTDOMAIN ),
|
67 |
-
"description" => __( "Check this option to include the role of the logged in user.", GTM4WP_TEXTDOMAIN )
|
|
|
68 |
),
|
69 |
GTM4WP_OPTION_INCLUDE_USERID => array(
|
70 |
"label" => __( "Logged in user ID", GTM4WP_TEXTDOMAIN ),
|
71 |
-
"description" => __( "Check this option to include the ID of the logged in user.", GTM4WP_TEXTDOMAIN )
|
|
|
72 |
),
|
73 |
GTM4WP_OPTION_INCLUDE_REMARKETING => array(
|
74 |
"label" => __( "Remarketing variable", GTM4WP_TEXTDOMAIN ),
|
75 |
-
"description" => __( "Check this option to include a dataLayer variable where all dataLayer values are stored to be included in your AdWords remarketing tag as a custom variable field", GTM4WP_TEXTDOMAIN )
|
|
|
76 |
),
|
77 |
GTM4WP_OPTION_INCLUDE_BROWSERDATA => array(
|
78 |
"label" => __( "Browser data *", GTM4WP_TEXTDOMAIN ),
|
79 |
-
"description" => __( "Check this option to include the name, version and engine data of the browser the visitor uses.", GTM4WP_TEXTDOMAIN )
|
|
|
80 |
),
|
81 |
GTM4WP_OPTION_INCLUDE_OSDATA => array(
|
82 |
"label" => __( "OS data *", GTM4WP_TEXTDOMAIN ),
|
83 |
-
"description" => __( "Check this option to include the name and version of the operating system the visitor uses.", GTM4WP_TEXTDOMAIN )
|
|
|
84 |
),
|
85 |
GTM4WP_OPTION_INCLUDE_DEVICEDATA => array(
|
86 |
"label" => __( "Device data *", GTM4WP_TEXTDOMAIN ),
|
87 |
-
"description" => __( "Check this option to include the type of device the user is currently using (desktop, tablet or mobile) including manufacturer and model data.", GTM4WP_TEXTDOMAIN )
|
|
|
88 |
),
|
89 |
GTM4WP_OPTION_INCLUDE_WEATHER => array(
|
90 |
"label" => __( "Weather data", GTM4WP_TEXTDOMAIN ),
|
91 |
-
"description" => sprintf( __( "Check this option to include the current weather conditions around the current visitor.<br /><strong>Attention!</strong> This feature uses <a href=\"%s\" target=\"_blank\">geoplugin.com</a> and <a href=\"%s\" target=\"_blank\">openweathermap.org</a> 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.", GTM4WP_TEXTDOMAIN ), "http://www.geoplugin.com/premium?utm_source=gtm4wp&utm_medium=link&utm_campaign=duracelltomi-google-tag-manager-for-wordpress", "http://openweathermap.org/price?utm_source=gtm4wp&utm_medium=link&utm_campaign=duracelltomi-google-tag-manager-for-wordpress" )
|
|
|
92 |
),
|
93 |
GTM4WP_OPTION_INCLUDE_WEATHERUNITS => array(
|
94 |
"label" => __( "Weather data units", GTM4WP_TEXTDOMAIN ),
|
95 |
-
"description" => __( "Select which temperature units you would like to use.", GTM4WP_TEXTDOMAIN )
|
|
|
96 |
)
|
97 |
);
|
98 |
|
99 |
$GLOBALS["gtm4wp_eventfieldtexts"] = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
GTM4WP_OPTION_EVENTS_OUTBOUND => array(
|
101 |
"label" => __( "Outbound link click events (gtm4wp.outboundClick)", GTM4WP_TEXTDOMAIN ),
|
102 |
-
"description" => __( "Check this option to include a Tag Manager event when a visitor clicks on a link directing the visitor out of your website.", GTM4WP_TEXTDOMAIN )
|
|
|
103 |
),
|
104 |
GTM4WP_OPTION_EVENTS_DOWNLOADS => array(
|
105 |
"label" => __( "Download click events (gtm4wp.downloadClick)", GTM4WP_TEXTDOMAIN ),
|
106 |
-
"description" => __( "Check this option to include a Tag Manager event when a visitors clicks on a link that leads to a downloadable file on your website.", GTM4WP_TEXTDOMAIN )
|
|
|
107 |
),
|
108 |
GTM4WP_OPTION_EVENTS_DWLEXT => array(
|
109 |
"label" => __( "Extensions to track", GTM4WP_TEXTDOMAIN ),
|
110 |
-
"description" => __( "Enter a comma separated list of extensions to track when 'Include download click events' option is set.", GTM4WP_TEXTDOMAIN )
|
|
|
111 |
),
|
112 |
GTM4WP_OPTION_EVENTS_EMAILCLICKS => array(
|
113 |
"label" => __( "Email click events (gtm4wp.emailClick)", GTM4WP_TEXTDOMAIN ),
|
114 |
-
"description" => __( "Check this option to include a Tag Manager event when a visitor clicks on an email link.", GTM4WP_TEXTDOMAIN )
|
115 |
-
|
116 |
-
GTM4WP_OPTION_EVENTS_FORMMOVE => array(
|
117 |
-
"label" => __( "Form fill events (gtm4wp.formElementEnter & gtm4wp.formElementLeave)", GTM4WP_TEXTDOMAIN ),
|
118 |
-
"description" => __( "Check this option to include a Tag Manager event when a visitor moves between elements of a form (comment, contact, etc).", GTM4WP_TEXTDOMAIN )
|
119 |
-
),
|
120 |
-
GTM4WP_OPTION_EVENTS_SOCIAL => array(
|
121 |
-
"label" => __( "Social actions (gtm4wp.socialAction)", GTM4WP_TEXTDOMAIN ),
|
122 |
-
"description" => __( "Check this option to include a Tag Manager event when a visitor uses a social button to share/like content on a social network.", GTM4WP_TEXTDOMAIN )
|
123 |
)
|
124 |
);
|
125 |
|
126 |
$GLOBALS["gtm4wp_scrollerfieldtexts"] = array(
|
127 |
GTM4WP_OPTION_SCROLLER_ENABLED => array(
|
128 |
"label" => __( "Enabled", GTM4WP_TEXTDOMAIN ),
|
129 |
-
"description" => __( "Enable scroll tracker script on your website.", GTM4WP_TEXTDOMAIN )
|
|
|
130 |
),
|
131 |
GTM4WP_OPTION_SCROLLER_DEBUGMODE => array(
|
132 |
"label" => __( "Debug mode", GTM4WP_TEXTDOMAIN ),
|
133 |
-
"description" => __( "Fire console.log() commands instead of dataLayer events.", GTM4WP_TEXTDOMAIN )
|
|
|
134 |
),
|
135 |
GTM4WP_OPTION_SCROLLER_CALLBACKTIME => array(
|
136 |
"label" => __( "Time delay before location check", GTM4WP_TEXTDOMAIN ),
|
137 |
-
"description" => __( "Enter the number of milliseconds after the script checks the current location. It prevents too many events being fired while scrolling.", GTM4WP_TEXTDOMAIN )
|
|
|
138 |
),
|
139 |
GTM4WP_OPTION_SCROLLER_DISTANCE => array(
|
140 |
"label" => __( "Minimum distance", GTM4WP_TEXTDOMAIN ),
|
141 |
-
"description" => __( "The minimum amount of pixels that a visitor has to scroll before we treat the move as scrolling.", GTM4WP_TEXTDOMAIN )
|
|
|
142 |
),
|
143 |
GTM4WP_OPTION_SCROLLER_CONTENTID => array(
|
144 |
"label" => __( "Content ID", GTM4WP_TEXTDOMAIN ),
|
145 |
-
"description" => __( "Enter the DOM ID of the content element in your template. Leave it empty for default(content). Do not include the # sign.", GTM4WP_TEXTDOMAIN )
|
|
|
146 |
),
|
147 |
GTM4WP_OPTION_SCROLLER_READERTIME => array(
|
148 |
"label" => __( "Scroller time", GTM4WP_TEXTDOMAIN ),
|
149 |
-
"description" => __( "Enter the number of seconds after the the scroller user is being treated as a reader, someone who really reads the content, not just scrolls through it.", GTM4WP_TEXTDOMAIN )
|
|
|
150 |
)
|
151 |
);
|
152 |
|
153 |
$GLOBALS["gtm4wp_blacklistfieldtexts"] = array(
|
154 |
GTM4WP_OPTION_BLACKLIST_ENABLE => array(
|
155 |
"label" => __( "Enable blacklist/whitelist", GTM4WP_TEXTDOMAIN ),
|
156 |
-
"description" => __( "Disable feature or select whether you want to whitelist or blacklist tags", GTM4WP_TEXTDOMAIN )
|
|
|
157 |
),
|
158 |
GTM4WP_OPTION_BLACKLIST_AWCONV => array(
|
159 |
"label" => __( "AdWords Conversion Tracking Tag", GTM4WP_TEXTDOMAIN ),
|
160 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
161 |
),
|
162 |
GTM4WP_OPTION_BLACKLIST_AWREMARKET => array(
|
163 |
"label" => __( "AdWords Remarketing Tag", GTM4WP_TEXTDOMAIN ),
|
164 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
165 |
),
|
166 |
GTM4WP_OPTION_BLACKLIST_GACLASSIC => array(
|
167 |
"label" => __( "Google Analytics Tag", GTM4WP_TEXTDOMAIN ),
|
168 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
169 |
),
|
170 |
GTM4WP_OPTION_BLACKLIST_UA => array(
|
171 |
"label" => __( "Universal Analytics Tag", GTM4WP_TEXTDOMAIN ),
|
172 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
173 |
),
|
174 |
GTM4WP_OPTION_BLACKLIST_ADADVISOR => array(
|
175 |
"label" => __( "AdAdvisor Tag", GTM4WP_TEXTDOMAIN ),
|
176 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
177 |
),
|
178 |
GTM4WP_OPTION_BLACKLIST_ADROLL => array(
|
179 |
"label" => __( "AdRoll Smart Pixel Tag", GTM4WP_TEXTDOMAIN ),
|
180 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
181 |
),
|
182 |
GTM4WP_OPTION_BLACKLIST_BIZO => array(
|
183 |
"label" => __( "Bizo Insight Tag", GTM4WP_TEXTDOMAIN ),
|
184 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
185 |
),
|
186 |
GTM4WP_OPTION_BLACKLIST_CLICKTALE => array(
|
187 |
"label" => __( "ClickTale Standard Tracking Tag", GTM4WP_TEXTDOMAIN ),
|
188 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
189 |
),
|
190 |
GTM4WP_OPTION_BLACKLIST_COMSCORE => array(
|
191 |
"label" => __( "comScore Unified Digital Measurement Tag", GTM4WP_TEXTDOMAIN ),
|
192 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
193 |
),
|
194 |
GTM4WP_OPTION_BLACKLIST_CUSTOMHTML => array(
|
195 |
"label" => __( "Custom HTML Tag", GTM4WP_TEXTDOMAIN ),
|
196 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
197 |
),
|
198 |
GTM4WP_OPTION_BLACKLIST_CUSTOMIMG => array(
|
199 |
"label" => __( "Custom Image Tag", GTM4WP_TEXTDOMAIN ),
|
200 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
201 |
),
|
202 |
GTM4WP_OPTION_BLACKLIST_DBLCLKCOUNT => array(
|
203 |
"label" => __( "DoubleClick Floodlight Counter Tag", GTM4WP_TEXTDOMAIN ),
|
204 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
205 |
),
|
206 |
GTM4WP_OPTION_BLACKLIST_DBLCLKSALES => array(
|
207 |
"label" => __( "DoubleClick Floodlight Sales Tag", GTM4WP_TEXTDOMAIN ),
|
208 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
209 |
),
|
210 |
GTM4WP_OPTION_BLACKLIST_MARIN => array(
|
211 |
"label" => __( "Marin Software Tag", GTM4WP_TEXTDOMAIN ),
|
212 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
213 |
),
|
214 |
GTM4WP_OPTION_BLACKLIST_MPLEXIFRAME => array(
|
215 |
"label" => __( "Mediaplex - IFRAME MCT Tag", GTM4WP_TEXTDOMAIN ),
|
216 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
217 |
),
|
218 |
GTM4WP_OPTION_BLACKLIST_MPLEXROI => array(
|
219 |
"label" => __( "Mediaplex - Standard IMG ROI Tag", GTM4WP_TEXTDOMAIN ),
|
220 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
221 |
),
|
222 |
GTM4WP_OPTION_BLACKLIST_MEDIA6DEG => array(
|
223 |
"label" => __( "Media6Degrees Universal Pixel Tag", GTM4WP_TEXTDOMAIN ),
|
224 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
225 |
),
|
226 |
GTM4WP_OPTION_BLACKLIST_TURNCONV => array(
|
227 |
"label" => __( "Turn Conversion Tracking Tag", GTM4WP_TEXTDOMAIN ),
|
228 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
229 |
),
|
230 |
GTM4WP_OPTION_BLACKLIST_TURNDATA => array(
|
231 |
"label" => __( "Turn Data Collection Tag", GTM4WP_TEXTDOMAIN ),
|
232 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
233 |
)
|
234 |
);
|
235 |
|
236 |
$GLOBALS["gtm4wp_blacklistmfieldtexts"] = array(
|
237 |
GTM4WP_OPTION_BLACKLIST_MACRO_DOMELEMENT => array(
|
238 |
"label" => __( "DOM element Macro", GTM4WP_TEXTDOMAIN ),
|
239 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
240 |
),
|
241 |
GTM4WP_OPTION_BLACKLIST_MACRO_CUSTOMJS => array(
|
242 |
"label" => __( "Custom JavaScript Macro", GTM4WP_TEXTDOMAIN ),
|
243 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
244 |
),
|
245 |
GTM4WP_OPTION_BLACKLIST_MACRO_CONSTANT => array(
|
246 |
"label" => __( "Constant Macro", GTM4WP_TEXTDOMAIN ),
|
247 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
248 |
),
|
249 |
GTM4WP_OPTION_BLACKLIST_MACRO_1STCOOKIE => array(
|
250 |
"label" => __( "First Party Cookie Macro", GTM4WP_TEXTDOMAIN ),
|
251 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
252 |
),
|
253 |
GTM4WP_OPTION_BLACKLIST_MACRO_EVENTNAME => array(
|
254 |
"label" => __( "Event Name Macro", GTM4WP_TEXTDOMAIN ),
|
255 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
256 |
),
|
257 |
GTM4WP_OPTION_BLACKLIST_MACRO_JSVAR => array(
|
258 |
"label" => __( "JavaScript Variable Macro", GTM4WP_TEXTDOMAIN ),
|
259 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
260 |
),
|
261 |
GTM4WP_OPTION_BLACKLIST_MACRO_DLAYERVAR => array(
|
262 |
"label" => __( "DataLayer Variable Macro", GTM4WP_TEXTDOMAIN ),
|
263 |
-
"description" => __( "It is not recommended to blacklist this type of macro since most features of this plugin depend on dataLayer macros.", GTM4WP_TEXTDOMAIN )
|
|
|
264 |
),
|
265 |
GTM4WP_OPTION_BLACKLIST_MACRO_RANDOMNUM => array(
|
266 |
"label" => __( "Random Number Macro", GTM4WP_TEXTDOMAIN ),
|
267 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
268 |
),
|
269 |
GTM4WP_OPTION_BLACKLIST_MACRO_REFERRER => array(
|
270 |
"label" => __( "Referrer Macro", GTM4WP_TEXTDOMAIN ),
|
271 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
272 |
),
|
273 |
GTM4WP_OPTION_BLACKLIST_MACRO_URL => array(
|
274 |
"label" => __( "URL Macro", GTM4WP_TEXTDOMAIN ),
|
275 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
276 |
),
|
277 |
GTM4WP_OPTION_BLACKLIST_MACRO_AUTOEVENT => array(
|
278 |
"label" => __( "Auto-Event Variable Macro", GTM4WP_TEXTDOMAIN ),
|
279 |
-
"description" => __( "", GTM4WP_TEXTDOMAIN )
|
|
|
280 |
)
|
281 |
);
|
282 |
|
@@ -284,6 +349,7 @@ $GLOBALS["gtm4wp_integratefieldtexts"] = array(
|
|
284 |
GTM4WP_OPTION_INTEGRATE_WPCF7 => array(
|
285 |
"label" => __( "Contact Form 7", GTM4WP_TEXTDOMAIN ),
|
286 |
"description" => __( "Check this to include a dataLayer event after a successfull form submission.", GTM4WP_TEXTDOMAIN ),
|
|
|
287 |
"plugintocheck" => "contact-form-7/wp-contact-form-7.php"
|
288 |
),
|
289 |
/*
|
@@ -296,17 +362,19 @@ $GLOBALS["gtm4wp_integratefieldtexts"] = array(
|
|
296 |
GTM4WP_OPTION_INTEGRATE_WCTRACKCLASSICEC => array(
|
297 |
"label" => __( "Track classic e-commerce", GTM4WP_TEXTDOMAIN ),
|
298 |
"description" => __( sprintf( __( "Choose this option if you would like to track e-commerce data using <a href=\"%s\" target=\"_blank\">classic transaction data</a>.", GTM4WP_TEXTDOMAIN ) , 'https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce'), GTM4WP_TEXTDOMAIN ),
|
|
|
299 |
"plugintocheck" => "woocommerce/woocommerce.php"
|
300 |
),
|
301 |
GTM4WP_OPTION_INTEGRATE_WCTRACKENHANCEDEC => array(
|
302 |
"label" => __( "Track enhanced e-commerce", GTM4WP_TEXTDOMAIN ),
|
303 |
-
"description" => __( sprintf( __( "Choose this option if you would like to track e-commerce data using <a href=\"%s\" target=\"_blank\">enhanced ecommerce tracking</a>.", GTM4WP_TEXTDOMAIN ) , 'https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce'), GTM4WP_TEXTDOMAIN )
|
304 |
-
|
305 |
"plugintocheck" => "woocommerce/woocommerce.php"
|
306 |
),
|
307 |
GTM4WP_OPTION_INTEGRATE_WCREMARKETING => array(
|
308 |
"label" => __( "AdWords Remarketing", GTM4WP_TEXTDOMAIN ),
|
309 |
"description" => __( "Enable this to add Google AdWords dynamic remarketing variables to the dataLayer", GTM4WP_TEXTDOMAIN ),
|
|
|
310 |
"plugintocheck" => "woocommerce/woocommerce.php"
|
311 |
)
|
312 |
);
|
@@ -316,7 +384,7 @@ function gtm4wp_admin_output_section( $args ) {
|
|
316 |
|
317 |
switch( $args["id"] ) {
|
318 |
case GTM4WP_ADMIN_GROUP_GENERAL: {
|
319 |
-
_e( 'This plugin is intended to be used by IT guys and marketing staff. Please be sure you read the <a href="https://developers.google.com/tag-manager/" target="_blank">Google Tag Manager Help Center</a> before you start using this plugin.<br /><br
|
320 |
|
321 |
break;
|
322 |
}
|
@@ -382,7 +450,7 @@ function gtm4wp_admin_output_section( $args ) {
|
|
382 |
|
383 |
function gtm4wp_admin_output_field( $args ) {
|
384 |
global $gtm4wp_options;
|
385 |
-
|
386 |
switch( $args["label_for"] ) {
|
387 |
case GTM4WP_ADMIN_GROUP_GTMID: {
|
388 |
echo '<input type="text" id="' . GTM4WP_OPTIONS . '[' . GTM4WP_OPTION_GTM_CODE . ']" name="' . GTM4WP_OPTIONS . '[' . GTM4WP_OPTION_GTM_CODE . ']" value="' . $gtm4wp_options[GTM4WP_OPTION_GTM_CODE] . '" /><br />' . $args["description"];
|
@@ -595,7 +663,7 @@ function gtm4wp_admin_init() {
|
|
595 |
foreach($gtm4wp_includefieldtexts as $fieldid => $fielddata) {
|
596 |
add_settings_field(
|
597 |
"gtm4wp-admin-" . $fieldid . "-id",
|
598 |
-
$fielddata["label"],
|
599 |
'gtm4wp_admin_output_field',
|
600 |
GTM4WP_ADMINSLUG,
|
601 |
GTM4WP_ADMIN_GROUP_INCLUDES,
|
@@ -617,7 +685,7 @@ function gtm4wp_admin_init() {
|
|
617 |
foreach($gtm4wp_eventfieldtexts as $fieldid => $fielddata) {
|
618 |
add_settings_field(
|
619 |
"gtm4wp-admin-" . $fieldid . "-id",
|
620 |
-
$fielddata["label"],
|
621 |
'gtm4wp_admin_output_field',
|
622 |
GTM4WP_ADMINSLUG,
|
623 |
GTM4WP_ADMIN_GROUP_EVENTS,
|
@@ -639,7 +707,7 @@ function gtm4wp_admin_init() {
|
|
639 |
foreach($gtm4wp_scrollerfieldtexts as $fieldid => $fielddata) {
|
640 |
add_settings_field(
|
641 |
"gtm4wp-admin-" . $fieldid . "-id",
|
642 |
-
$fielddata["label"],
|
643 |
'gtm4wp_admin_output_field',
|
644 |
GTM4WP_ADMINSLUG,
|
645 |
GTM4WP_ADMIN_GROUP_SCROLLER,
|
@@ -661,7 +729,7 @@ function gtm4wp_admin_init() {
|
|
661 |
foreach($gtm4wp_blacklistfieldtexts as $fieldid => $fielddata) {
|
662 |
add_settings_field(
|
663 |
"gtm4wp-admin-" . $fieldid . "-id",
|
664 |
-
$fielddata["label"],
|
665 |
'gtm4wp_admin_output_field',
|
666 |
GTM4WP_ADMINSLUG,
|
667 |
GTM4WP_ADMIN_GROUP_BLACKLIST,
|
@@ -676,7 +744,7 @@ function gtm4wp_admin_init() {
|
|
676 |
foreach($gtm4wp_blacklistmfieldtexts as $fieldid => $fielddata) {
|
677 |
add_settings_field(
|
678 |
"gtm4wp-admin-" . $fieldid . "-id",
|
679 |
-
$fielddata["label"],
|
680 |
'gtm4wp_admin_output_field',
|
681 |
GTM4WP_ADMINSLUG,
|
682 |
GTM4WP_ADMIN_GROUP_BLACKLIST,
|
@@ -698,7 +766,7 @@ function gtm4wp_admin_init() {
|
|
698 |
foreach($gtm4wp_integratefieldtexts as $fieldid => $fielddata) {
|
699 |
add_settings_field(
|
700 |
"gtm4wp-admin-" . $fieldid . "-id",
|
701 |
-
$fielddata["label"],
|
702 |
'gtm4wp_admin_output_field',
|
703 |
GTM4WP_ADMINSLUG,
|
704 |
GTM4WP_ADMIN_GROUP_INTEGRATION,
|
@@ -746,7 +814,7 @@ function gtm4wp_admin_init() {
|
|
746 |
array(
|
747 |
"label_for" => GTM4WP_ADMIN_GROUP_INFO,
|
748 |
"description" => '<strong>Thomas Geiger</strong><br />
|
749 |
-
Website: <a href="
|
750 |
<a href="https://www.linkedin.com/in/duracelltomi" target="_blank">Me on LinkedIn</a><br />
|
751 |
<a href="http://www.linkedin.com/company/jabjab-online-marketing-ltd-" target="_blank">JabJab Online Marketing on LinkedIn</a>'
|
752 |
)
|
19 |
|
20 |
define( 'GTM4WP_USER_NOTICES_KEY', 'gtm4wp_user_notices_dismisses' );
|
21 |
|
22 |
+
define( 'GTM4WP_PHASE_STABLE', 'gtm4wp-phase-stable' );
|
23 |
+
define( 'GTM4WP_PHASE_BETA', 'gtm4wp-phase-beta' );
|
24 |
+
define( 'GTM4WP_PHASE_EXPERIMENTAL', 'gtm4wp-phase-experimental' );
|
25 |
+
define( 'GTM4WP_PHASE_DEPRECATED', 'gtm4wp-phase-deprecated' );
|
26 |
+
|
27 |
$GLOBALS["gtm4wp_def_user_notices_dismisses"] = array(
|
28 |
"enter-gtm-code" => false,
|
29 |
"wc-ga-plugin-warning" => false,
|
33 |
$GLOBALS["gtm4wp_includefieldtexts"] = array(
|
34 |
GTM4WP_OPTION_INCLUDE_POSTTYPE => array(
|
35 |
"label" => __( "Posttype of current post/archive", GTM4WP_TEXTDOMAIN ),
|
36 |
+
"description" => __( "Check this option to include the type of the current post or archive page (post, page or any custom post type).", GTM4WP_TEXTDOMAIN ),
|
37 |
+
"phase" => GTM4WP_PHASE_STABLE
|
38 |
),
|
39 |
GTM4WP_OPTION_INCLUDE_CATEGORIES => array(
|
40 |
"label" => __( "Category list of current post/archive", GTM4WP_TEXTDOMAIN ),
|
41 |
+
"description" => __( "Check this option to include the category names of the current post or archive page", GTM4WP_TEXTDOMAIN ),
|
42 |
+
"phase" => GTM4WP_PHASE_STABLE
|
43 |
),
|
44 |
GTM4WP_OPTION_INCLUDE_TAGS => array(
|
45 |
"label" => __( "Tags of current post", GTM4WP_TEXTDOMAIN ),
|
46 |
+
"description" => __( "Check this option to include the tags of the current post.", GTM4WP_TEXTDOMAIN ),
|
47 |
+
"phase" => GTM4WP_PHASE_STABLE
|
48 |
),
|
49 |
GTM4WP_OPTION_INCLUDE_AUTHOR => array(
|
50 |
"label" => __( "Post author name", GTM4WP_TEXTDOMAIN ),
|
51 |
+
"description" => __( "Check this option to include the author's name of the current post or author page.", GTM4WP_TEXTDOMAIN ),
|
52 |
+
"phase" => GTM4WP_PHASE_STABLE
|
53 |
),
|
54 |
GTM4WP_OPTION_INCLUDE_POSTDATE => array(
|
55 |
"label" => __( "Post date", GTM4WP_TEXTDOMAIN ),
|
56 |
+
"description" => __( "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.", GTM4WP_TEXTDOMAIN ),
|
57 |
+
"phase" => GTM4WP_PHASE_STABLE
|
58 |
),
|
59 |
GTM4WP_OPTION_INCLUDE_POSTTITLE => array(
|
60 |
"label" => __( "Post title", GTM4WP_TEXTDOMAIN ),
|
61 |
+
"description" => __( "Check this option to include the title of the current post.", GTM4WP_TEXTDOMAIN ),
|
62 |
+
"phase" => GTM4WP_PHASE_STABLE
|
63 |
),
|
64 |
GTM4WP_OPTION_INCLUDE_POSTCOUNT => array(
|
65 |
"label" => __( "Post count", GTM4WP_TEXTDOMAIN ),
|
66 |
+
"description" => __( "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.", GTM4WP_TEXTDOMAIN ),
|
67 |
+
"phase" => GTM4WP_PHASE_STABLE
|
68 |
),
|
69 |
GTM4WP_OPTION_INCLUDE_SEARCHDATA => array(
|
70 |
"label" => __( "Search data", GTM4WP_TEXTDOMAIN ),
|
71 |
+
"description" => __( "Check this option to include the search term, referring page URL and number of results on the search page.", GTM4WP_TEXTDOMAIN ),
|
72 |
+
"phase" => GTM4WP_PHASE_STABLE
|
73 |
),
|
74 |
GTM4WP_OPTION_INCLUDE_LOGGEDIN => array(
|
75 |
"label" => __( "Logged in status", GTM4WP_TEXTDOMAIN ),
|
76 |
+
"description" => __( "Check this option to include whether there is a logged in user on your website.", GTM4WP_TEXTDOMAIN ),
|
77 |
+
"phase" => GTM4WP_PHASE_STABLE
|
78 |
),
|
79 |
GTM4WP_OPTION_INCLUDE_USERROLE => array(
|
80 |
"label" => __( "Logged in user role", GTM4WP_TEXTDOMAIN ),
|
81 |
+
"description" => __( "Check this option to include the role of the logged in user.", GTM4WP_TEXTDOMAIN ),
|
82 |
+
"phase" => GTM4WP_PHASE_STABLE
|
83 |
),
|
84 |
GTM4WP_OPTION_INCLUDE_USERID => array(
|
85 |
"label" => __( "Logged in user ID", GTM4WP_TEXTDOMAIN ),
|
86 |
+
"description" => __( "Check this option to include the ID of the logged in user.", GTM4WP_TEXTDOMAIN ),
|
87 |
+
"phase" => GTM4WP_PHASE_STABLE
|
88 |
),
|
89 |
GTM4WP_OPTION_INCLUDE_REMARKETING => array(
|
90 |
"label" => __( "Remarketing variable", GTM4WP_TEXTDOMAIN ),
|
91 |
+
"description" => __( "Check this option to include a dataLayer variable where all dataLayer values are stored to be included in your AdWords remarketing tag as a custom variable field", GTM4WP_TEXTDOMAIN ),
|
92 |
+
"phase" => GTM4WP_PHASE_STABLE
|
93 |
),
|
94 |
GTM4WP_OPTION_INCLUDE_BROWSERDATA => array(
|
95 |
"label" => __( "Browser data *", GTM4WP_TEXTDOMAIN ),
|
96 |
+
"description" => __( "Check this option to include the name, version and engine data of the browser the visitor uses.", GTM4WP_TEXTDOMAIN ),
|
97 |
+
"phase" => GTM4WP_PHASE_BETA
|
98 |
),
|
99 |
GTM4WP_OPTION_INCLUDE_OSDATA => array(
|
100 |
"label" => __( "OS data *", GTM4WP_TEXTDOMAIN ),
|
101 |
+
"description" => __( "Check this option to include the name and version of the operating system the visitor uses.", GTM4WP_TEXTDOMAIN ),
|
102 |
+
"phase" => GTM4WP_PHASE_BETA
|
103 |
),
|
104 |
GTM4WP_OPTION_INCLUDE_DEVICEDATA => array(
|
105 |
"label" => __( "Device data *", GTM4WP_TEXTDOMAIN ),
|
106 |
+
"description" => __( "Check this option to include the type of device the user is currently using (desktop, tablet or mobile) including manufacturer and model data.", GTM4WP_TEXTDOMAIN ),
|
107 |
+
"phase" => GTM4WP_PHASE_BETA
|
108 |
),
|
109 |
GTM4WP_OPTION_INCLUDE_WEATHER => array(
|
110 |
"label" => __( "Weather data", GTM4WP_TEXTDOMAIN ),
|
111 |
+
"description" => sprintf( __( "Check this option to include the current weather conditions around the current visitor.<br /><strong>Attention!</strong> This feature uses <a href=\"%s\" target=\"_blank\">geoplugin.com</a> and <a href=\"%s\" target=\"_blank\">openweathermap.org</a> 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.", GTM4WP_TEXTDOMAIN ), "http://www.geoplugin.com/premium?utm_source=gtm4wp&utm_medium=link&utm_campaign=duracelltomi-google-tag-manager-for-wordpress", "http://openweathermap.org/price?utm_source=gtm4wp&utm_medium=link&utm_campaign=duracelltomi-google-tag-manager-for-wordpress" ),
|
112 |
+
"phase" => GTM4WP_PHASE_EXPERIMENTAL
|
113 |
),
|
114 |
GTM4WP_OPTION_INCLUDE_WEATHERUNITS => array(
|
115 |
"label" => __( "Weather data units", GTM4WP_TEXTDOMAIN ),
|
116 |
+
"description" => __( "Select which temperature units you would like to use.", GTM4WP_TEXTDOMAIN ),
|
117 |
+
"phase" => GTM4WP_PHASE_EXPERIMENTAL
|
118 |
)
|
119 |
);
|
120 |
|
121 |
$GLOBALS["gtm4wp_eventfieldtexts"] = array(
|
122 |
+
GTM4WP_OPTION_EVENTS_FORMMOVE => array(
|
123 |
+
"label" => __( "Form fill events (gtm4wp.formElementEnter & gtm4wp.formElementLeave)", GTM4WP_TEXTDOMAIN ),
|
124 |
+
"description" => __( "Check this option to include a Tag Manager event when a visitor moves between elements of a form (comment, contact, etc).", GTM4WP_TEXTDOMAIN ),
|
125 |
+
"phase" => GTM4WP_PHASE_STABLE
|
126 |
+
),
|
127 |
+
GTM4WP_OPTION_EVENTS_SOCIAL => array(
|
128 |
+
"label" => __( "Social actions (gtm4wp.socialAction)", GTM4WP_TEXTDOMAIN ),
|
129 |
+
"description" => __( "Check this option to include a Tag Manager event when a visitor uses a social button to share/like content on a social network.", GTM4WP_TEXTDOMAIN ),
|
130 |
+
"phase" => GTM4WP_PHASE_STABLE
|
131 |
+
),
|
132 |
GTM4WP_OPTION_EVENTS_OUTBOUND => array(
|
133 |
"label" => __( "Outbound link click events (gtm4wp.outboundClick)", GTM4WP_TEXTDOMAIN ),
|
134 |
+
"description" => __( "Check this option to include a Tag Manager event when a visitor clicks on a link directing the visitor out of your website.", GTM4WP_TEXTDOMAIN ),
|
135 |
+
"phase" => GTM4WP_PHASE_DEPRECATED
|
136 |
),
|
137 |
GTM4WP_OPTION_EVENTS_DOWNLOADS => array(
|
138 |
"label" => __( "Download click events (gtm4wp.downloadClick)", GTM4WP_TEXTDOMAIN ),
|
139 |
+
"description" => __( "Check this option to include a Tag Manager event when a visitors clicks on a link that leads to a downloadable file on your website.", GTM4WP_TEXTDOMAIN ),
|
140 |
+
"phase" => GTM4WP_PHASE_DEPRECATED
|
141 |
),
|
142 |
GTM4WP_OPTION_EVENTS_DWLEXT => array(
|
143 |
"label" => __( "Extensions to track", GTM4WP_TEXTDOMAIN ),
|
144 |
+
"description" => __( "Enter a comma separated list of extensions to track when 'Include download click events' option is set.", GTM4WP_TEXTDOMAIN ),
|
145 |
+
"phase" => GTM4WP_PHASE_DEPRECATED
|
146 |
),
|
147 |
GTM4WP_OPTION_EVENTS_EMAILCLICKS => array(
|
148 |
"label" => __( "Email click events (gtm4wp.emailClick)", GTM4WP_TEXTDOMAIN ),
|
149 |
+
"description" => __( "Check this option to include a Tag Manager event when a visitor clicks on an email link.", GTM4WP_TEXTDOMAIN ),
|
150 |
+
"phase" => GTM4WP_PHASE_DEPRECATED
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
)
|
152 |
);
|
153 |
|
154 |
$GLOBALS["gtm4wp_scrollerfieldtexts"] = array(
|
155 |
GTM4WP_OPTION_SCROLLER_ENABLED => array(
|
156 |
"label" => __( "Enabled", GTM4WP_TEXTDOMAIN ),
|
157 |
+
"description" => __( "Enable scroll tracker script on your website.", GTM4WP_TEXTDOMAIN ),
|
158 |
+
"phase" => GTM4WP_PHASE_STABLE
|
159 |
),
|
160 |
GTM4WP_OPTION_SCROLLER_DEBUGMODE => array(
|
161 |
"label" => __( "Debug mode", GTM4WP_TEXTDOMAIN ),
|
162 |
+
"description" => __( "Fire console.log() commands instead of dataLayer events.", GTM4WP_TEXTDOMAIN ),
|
163 |
+
"phase" => GTM4WP_PHASE_STABLE
|
164 |
),
|
165 |
GTM4WP_OPTION_SCROLLER_CALLBACKTIME => array(
|
166 |
"label" => __( "Time delay before location check", GTM4WP_TEXTDOMAIN ),
|
167 |
+
"description" => __( "Enter the number of milliseconds after the script checks the current location. It prevents too many events being fired while scrolling.", GTM4WP_TEXTDOMAIN ),
|
168 |
+
"phase" => GTM4WP_PHASE_STABLE
|
169 |
),
|
170 |
GTM4WP_OPTION_SCROLLER_DISTANCE => array(
|
171 |
"label" => __( "Minimum distance", GTM4WP_TEXTDOMAIN ),
|
172 |
+
"description" => __( "The minimum amount of pixels that a visitor has to scroll before we treat the move as scrolling.", GTM4WP_TEXTDOMAIN ),
|
173 |
+
"phase" => GTM4WP_PHASE_STABLE
|
174 |
),
|
175 |
GTM4WP_OPTION_SCROLLER_CONTENTID => array(
|
176 |
"label" => __( "Content ID", GTM4WP_TEXTDOMAIN ),
|
177 |
+
"description" => __( "Enter the DOM ID of the content element in your template. Leave it empty for default(content). Do not include the # sign.", GTM4WP_TEXTDOMAIN ),
|
178 |
+
"phase" => GTM4WP_PHASE_STABLE
|
179 |
),
|
180 |
GTM4WP_OPTION_SCROLLER_READERTIME => array(
|
181 |
"label" => __( "Scroller time", GTM4WP_TEXTDOMAIN ),
|
182 |
+
"description" => __( "Enter the number of seconds after the the scroller user is being treated as a reader, someone who really reads the content, not just scrolls through it.", GTM4WP_TEXTDOMAIN ),
|
183 |
+
"phase" => GTM4WP_PHASE_STABLE
|
184 |
)
|
185 |
);
|
186 |
|
187 |
$GLOBALS["gtm4wp_blacklistfieldtexts"] = array(
|
188 |
GTM4WP_OPTION_BLACKLIST_ENABLE => array(
|
189 |
"label" => __( "Enable blacklist/whitelist", GTM4WP_TEXTDOMAIN ),
|
190 |
+
"description" => __( "Disable feature or select whether you want to whitelist or blacklist tags", GTM4WP_TEXTDOMAIN ),
|
191 |
+
"phase" => GTM4WP_PHASE_STABLE
|
192 |
),
|
193 |
GTM4WP_OPTION_BLACKLIST_AWCONV => array(
|
194 |
"label" => __( "AdWords Conversion Tracking Tag", GTM4WP_TEXTDOMAIN ),
|
195 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
196 |
+
"phase" => GTM4WP_PHASE_STABLE
|
197 |
),
|
198 |
GTM4WP_OPTION_BLACKLIST_AWREMARKET => array(
|
199 |
"label" => __( "AdWords Remarketing Tag", GTM4WP_TEXTDOMAIN ),
|
200 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
201 |
+
"phase" => GTM4WP_PHASE_STABLE
|
202 |
),
|
203 |
GTM4WP_OPTION_BLACKLIST_GACLASSIC => array(
|
204 |
"label" => __( "Google Analytics Tag", GTM4WP_TEXTDOMAIN ),
|
205 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
206 |
+
"phase" => GTM4WP_PHASE_STABLE
|
207 |
),
|
208 |
GTM4WP_OPTION_BLACKLIST_UA => array(
|
209 |
"label" => __( "Universal Analytics Tag", GTM4WP_TEXTDOMAIN ),
|
210 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
211 |
+
"phase" => GTM4WP_PHASE_STABLE
|
212 |
),
|
213 |
GTM4WP_OPTION_BLACKLIST_ADADVISOR => array(
|
214 |
"label" => __( "AdAdvisor Tag", GTM4WP_TEXTDOMAIN ),
|
215 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
216 |
+
"phase" => GTM4WP_PHASE_STABLE
|
217 |
),
|
218 |
GTM4WP_OPTION_BLACKLIST_ADROLL => array(
|
219 |
"label" => __( "AdRoll Smart Pixel Tag", GTM4WP_TEXTDOMAIN ),
|
220 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
221 |
+
"phase" => GTM4WP_PHASE_STABLE
|
222 |
),
|
223 |
GTM4WP_OPTION_BLACKLIST_BIZO => array(
|
224 |
"label" => __( "Bizo Insight Tag", GTM4WP_TEXTDOMAIN ),
|
225 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
226 |
+
"phase" => GTM4WP_PHASE_STABLE
|
227 |
),
|
228 |
GTM4WP_OPTION_BLACKLIST_CLICKTALE => array(
|
229 |
"label" => __( "ClickTale Standard Tracking Tag", GTM4WP_TEXTDOMAIN ),
|
230 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
231 |
+
"phase" => GTM4WP_PHASE_STABLE
|
232 |
),
|
233 |
GTM4WP_OPTION_BLACKLIST_COMSCORE => array(
|
234 |
"label" => __( "comScore Unified Digital Measurement Tag", GTM4WP_TEXTDOMAIN ),
|
235 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
236 |
+
"phase" => GTM4WP_PHASE_STABLE
|
237 |
),
|
238 |
GTM4WP_OPTION_BLACKLIST_CUSTOMHTML => array(
|
239 |
"label" => __( "Custom HTML Tag", GTM4WP_TEXTDOMAIN ),
|
240 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
241 |
+
"phase" => GTM4WP_PHASE_STABLE
|
242 |
),
|
243 |
GTM4WP_OPTION_BLACKLIST_CUSTOMIMG => array(
|
244 |
"label" => __( "Custom Image Tag", GTM4WP_TEXTDOMAIN ),
|
245 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
246 |
+
"phase" => GTM4WP_PHASE_STABLE
|
247 |
),
|
248 |
GTM4WP_OPTION_BLACKLIST_DBLCLKCOUNT => array(
|
249 |
"label" => __( "DoubleClick Floodlight Counter Tag", GTM4WP_TEXTDOMAIN ),
|
250 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
251 |
+
"phase" => GTM4WP_PHASE_STABLE
|
252 |
),
|
253 |
GTM4WP_OPTION_BLACKLIST_DBLCLKSALES => array(
|
254 |
"label" => __( "DoubleClick Floodlight Sales Tag", GTM4WP_TEXTDOMAIN ),
|
255 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
256 |
+
"phase" => GTM4WP_PHASE_STABLE
|
257 |
),
|
258 |
GTM4WP_OPTION_BLACKLIST_MARIN => array(
|
259 |
"label" => __( "Marin Software Tag", GTM4WP_TEXTDOMAIN ),
|
260 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
261 |
+
"phase" => GTM4WP_PHASE_STABLE
|
262 |
),
|
263 |
GTM4WP_OPTION_BLACKLIST_MPLEXIFRAME => array(
|
264 |
"label" => __( "Mediaplex - IFRAME MCT Tag", GTM4WP_TEXTDOMAIN ),
|
265 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
266 |
+
"phase" => GTM4WP_PHASE_STABLE
|
267 |
),
|
268 |
GTM4WP_OPTION_BLACKLIST_MPLEXROI => array(
|
269 |
"label" => __( "Mediaplex - Standard IMG ROI Tag", GTM4WP_TEXTDOMAIN ),
|
270 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
271 |
+
"phase" => GTM4WP_PHASE_STABLE
|
272 |
),
|
273 |
GTM4WP_OPTION_BLACKLIST_MEDIA6DEG => array(
|
274 |
"label" => __( "Media6Degrees Universal Pixel Tag", GTM4WP_TEXTDOMAIN ),
|
275 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
276 |
+
"phase" => GTM4WP_PHASE_STABLE
|
277 |
),
|
278 |
GTM4WP_OPTION_BLACKLIST_TURNCONV => array(
|
279 |
"label" => __( "Turn Conversion Tracking Tag", GTM4WP_TEXTDOMAIN ),
|
280 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
281 |
+
"phase" => GTM4WP_PHASE_STABLE
|
282 |
),
|
283 |
GTM4WP_OPTION_BLACKLIST_TURNDATA => array(
|
284 |
"label" => __( "Turn Data Collection Tag", GTM4WP_TEXTDOMAIN ),
|
285 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
286 |
+
"phase" => GTM4WP_PHASE_STABLE
|
287 |
)
|
288 |
);
|
289 |
|
290 |
$GLOBALS["gtm4wp_blacklistmfieldtexts"] = array(
|
291 |
GTM4WP_OPTION_BLACKLIST_MACRO_DOMELEMENT => array(
|
292 |
"label" => __( "DOM element Macro", GTM4WP_TEXTDOMAIN ),
|
293 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
294 |
+
"phase" => GTM4WP_PHASE_STABLE
|
295 |
),
|
296 |
GTM4WP_OPTION_BLACKLIST_MACRO_CUSTOMJS => array(
|
297 |
"label" => __( "Custom JavaScript Macro", GTM4WP_TEXTDOMAIN ),
|
298 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
299 |
+
"phase" => GTM4WP_PHASE_STABLE
|
300 |
),
|
301 |
GTM4WP_OPTION_BLACKLIST_MACRO_CONSTANT => array(
|
302 |
"label" => __( "Constant Macro", GTM4WP_TEXTDOMAIN ),
|
303 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
304 |
+
"phase" => GTM4WP_PHASE_STABLE
|
305 |
),
|
306 |
GTM4WP_OPTION_BLACKLIST_MACRO_1STCOOKIE => array(
|
307 |
"label" => __( "First Party Cookie Macro", GTM4WP_TEXTDOMAIN ),
|
308 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
309 |
+
"phase" => GTM4WP_PHASE_STABLE
|
310 |
),
|
311 |
GTM4WP_OPTION_BLACKLIST_MACRO_EVENTNAME => array(
|
312 |
"label" => __( "Event Name Macro", GTM4WP_TEXTDOMAIN ),
|
313 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
314 |
+
"phase" => GTM4WP_PHASE_STABLE
|
315 |
),
|
316 |
GTM4WP_OPTION_BLACKLIST_MACRO_JSVAR => array(
|
317 |
"label" => __( "JavaScript Variable Macro", GTM4WP_TEXTDOMAIN ),
|
318 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
319 |
+
"phase" => GTM4WP_PHASE_STABLE
|
320 |
),
|
321 |
GTM4WP_OPTION_BLACKLIST_MACRO_DLAYERVAR => array(
|
322 |
"label" => __( "DataLayer Variable Macro", GTM4WP_TEXTDOMAIN ),
|
323 |
+
"description" => __( "It is not recommended to blacklist this type of macro since most features of this plugin depend on dataLayer macros.", GTM4WP_TEXTDOMAIN ),
|
324 |
+
"phase" => GTM4WP_PHASE_STABLE
|
325 |
),
|
326 |
GTM4WP_OPTION_BLACKLIST_MACRO_RANDOMNUM => array(
|
327 |
"label" => __( "Random Number Macro", GTM4WP_TEXTDOMAIN ),
|
328 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
329 |
+
"phase" => GTM4WP_PHASE_STABLE
|
330 |
),
|
331 |
GTM4WP_OPTION_BLACKLIST_MACRO_REFERRER => array(
|
332 |
"label" => __( "Referrer Macro", GTM4WP_TEXTDOMAIN ),
|
333 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
334 |
+
"phase" => GTM4WP_PHASE_STABLE
|
335 |
),
|
336 |
GTM4WP_OPTION_BLACKLIST_MACRO_URL => array(
|
337 |
"label" => __( "URL Macro", GTM4WP_TEXTDOMAIN ),
|
338 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
339 |
+
"phase" => GTM4WP_PHASE_STABLE
|
340 |
),
|
341 |
GTM4WP_OPTION_BLACKLIST_MACRO_AUTOEVENT => array(
|
342 |
"label" => __( "Auto-Event Variable Macro", GTM4WP_TEXTDOMAIN ),
|
343 |
+
"description" => __( "", GTM4WP_TEXTDOMAIN ),
|
344 |
+
"phase" => GTM4WP_PHASE_STABLE
|
345 |
)
|
346 |
);
|
347 |
|
349 |
GTM4WP_OPTION_INTEGRATE_WPCF7 => array(
|
350 |
"label" => __( "Contact Form 7", GTM4WP_TEXTDOMAIN ),
|
351 |
"description" => __( "Check this to include a dataLayer event after a successfull form submission.", GTM4WP_TEXTDOMAIN ),
|
352 |
+
"phase" => GTM4WP_PHASE_STABLE,
|
353 |
"plugintocheck" => "contact-form-7/wp-contact-form-7.php"
|
354 |
),
|
355 |
/*
|
362 |
GTM4WP_OPTION_INTEGRATE_WCTRACKCLASSICEC => array(
|
363 |
"label" => __( "Track classic e-commerce", GTM4WP_TEXTDOMAIN ),
|
364 |
"description" => __( sprintf( __( "Choose this option if you would like to track e-commerce data using <a href=\"%s\" target=\"_blank\">classic transaction data</a>.", GTM4WP_TEXTDOMAIN ) , 'https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce'), GTM4WP_TEXTDOMAIN ),
|
365 |
+
"phase" => GTM4WP_PHASE_STABLE,
|
366 |
"plugintocheck" => "woocommerce/woocommerce.php"
|
367 |
),
|
368 |
GTM4WP_OPTION_INTEGRATE_WCTRACKENHANCEDEC => array(
|
369 |
"label" => __( "Track enhanced e-commerce", GTM4WP_TEXTDOMAIN ),
|
370 |
+
"description" => __( sprintf( __( "Choose this option if you would like to track e-commerce data using <a href=\"%s\" target=\"_blank\">enhanced ecommerce tracking</a>.", GTM4WP_TEXTDOMAIN ) , 'https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce'), GTM4WP_TEXTDOMAIN ),
|
371 |
+
"phase" => GTM4WP_PHASE_BETA,
|
372 |
"plugintocheck" => "woocommerce/woocommerce.php"
|
373 |
),
|
374 |
GTM4WP_OPTION_INTEGRATE_WCREMARKETING => array(
|
375 |
"label" => __( "AdWords Remarketing", GTM4WP_TEXTDOMAIN ),
|
376 |
"description" => __( "Enable this to add Google AdWords dynamic remarketing variables to the dataLayer", GTM4WP_TEXTDOMAIN ),
|
377 |
+
"phase" => GTM4WP_PHASE_STABLE,
|
378 |
"plugintocheck" => "woocommerce/woocommerce.php"
|
379 |
)
|
380 |
);
|
384 |
|
385 |
switch( $args["id"] ) {
|
386 |
case GTM4WP_ADMIN_GROUP_GENERAL: {
|
387 |
+
_e( 'This plugin is intended to be used by IT guys and marketing staff. Please be sure you read the <a href="https://developers.google.com/tag-manager/" target="_blank">Google Tag Manager Help Center</a> before you start using this plugin.<br /><br />', GTM4WP_TEXTDOMAIN );
|
388 |
|
389 |
break;
|
390 |
}
|
450 |
|
451 |
function gtm4wp_admin_output_field( $args ) {
|
452 |
global $gtm4wp_options;
|
453 |
+
|
454 |
switch( $args["label_for"] ) {
|
455 |
case GTM4WP_ADMIN_GROUP_GTMID: {
|
456 |
echo '<input type="text" id="' . GTM4WP_OPTIONS . '[' . GTM4WP_OPTION_GTM_CODE . ']" name="' . GTM4WP_OPTIONS . '[' . GTM4WP_OPTION_GTM_CODE . ']" value="' . $gtm4wp_options[GTM4WP_OPTION_GTM_CODE] . '" /><br />' . $args["description"];
|
663 |
foreach($gtm4wp_includefieldtexts as $fieldid => $fielddata) {
|
664 |
add_settings_field(
|
665 |
"gtm4wp-admin-" . $fieldid . "-id",
|
666 |
+
$fielddata["label"].'<span class="'.$fielddata["phase"].'"></span>',
|
667 |
'gtm4wp_admin_output_field',
|
668 |
GTM4WP_ADMINSLUG,
|
669 |
GTM4WP_ADMIN_GROUP_INCLUDES,
|
685 |
foreach($gtm4wp_eventfieldtexts as $fieldid => $fielddata) {
|
686 |
add_settings_field(
|
687 |
"gtm4wp-admin-" . $fieldid . "-id",
|
688 |
+
$fielddata["label"].'<span class="'.$fielddata["phase"].'"></span>',
|
689 |
'gtm4wp_admin_output_field',
|
690 |
GTM4WP_ADMINSLUG,
|
691 |
GTM4WP_ADMIN_GROUP_EVENTS,
|
707 |
foreach($gtm4wp_scrollerfieldtexts as $fieldid => $fielddata) {
|
708 |
add_settings_field(
|
709 |
"gtm4wp-admin-" . $fieldid . "-id",
|
710 |
+
$fielddata["label"].'<span class="'.$fielddata["phase"].'"></span>',
|
711 |
'gtm4wp_admin_output_field',
|
712 |
GTM4WP_ADMINSLUG,
|
713 |
GTM4WP_ADMIN_GROUP_SCROLLER,
|
729 |
foreach($gtm4wp_blacklistfieldtexts as $fieldid => $fielddata) {
|
730 |
add_settings_field(
|
731 |
"gtm4wp-admin-" . $fieldid . "-id",
|
732 |
+
$fielddata["label"].'<span class="'.$fielddata["phase"].'"></span>',
|
733 |
'gtm4wp_admin_output_field',
|
734 |
GTM4WP_ADMINSLUG,
|
735 |
GTM4WP_ADMIN_GROUP_BLACKLIST,
|
744 |
foreach($gtm4wp_blacklistmfieldtexts as $fieldid => $fielddata) {
|
745 |
add_settings_field(
|
746 |
"gtm4wp-admin-" . $fieldid . "-id",
|
747 |
+
$fielddata["label"].'<span class="'.$fielddata["phase"].'"></span>',
|
748 |
'gtm4wp_admin_output_field',
|
749 |
GTM4WP_ADMINSLUG,
|
750 |
GTM4WP_ADMIN_GROUP_BLACKLIST,
|
766 |
foreach($gtm4wp_integratefieldtexts as $fieldid => $fielddata) {
|
767 |
add_settings_field(
|
768 |
"gtm4wp-admin-" . $fieldid . "-id",
|
769 |
+
$fielddata["label"].'<span class="'.$fielddata["phase"].'"></span>',
|
770 |
'gtm4wp_admin_output_field',
|
771 |
GTM4WP_ADMINSLUG,
|
772 |
GTM4WP_ADMIN_GROUP_INTEGRATION,
|
814 |
array(
|
815 |
"label_for" => GTM4WP_ADMIN_GROUP_INFO,
|
816 |
"description" => '<strong>Thomas Geiger</strong><br />
|
817 |
+
Website: <a href="https://duracelltomi.com/" target="_blank">duracelltomi.com</a><br />
|
818 |
<a href="https://www.linkedin.com/in/duracelltomi" target="_blank">Me on LinkedIn</a><br />
|
819 |
<a href="http://www.linkedin.com/company/jabjab-online-marketing-ltd-" target="_blank">JabJab Online Marketing on LinkedIn</a>'
|
820 |
)
|
css/admin-gtm4wp.css
CHANGED
@@ -42,3 +42,31 @@
|
|
42 |
color: #000;
|
43 |
font-weight: bold;
|
44 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
color: #000;
|
43 |
font-weight: bold;
|
44 |
}
|
45 |
+
|
46 |
+
.gtm4wp-phase-beta,
|
47 |
+
.gtm4wp-phase-experimental,
|
48 |
+
.gtm4wp-phase-deprecated {
|
49 |
+
display: inline-block;
|
50 |
+
background-color: #f00;
|
51 |
+
color: #fff;
|
52 |
+
font-size: 9px;
|
53 |
+
padding: 2px;
|
54 |
+
margin-left: 5px;
|
55 |
+
}
|
56 |
+
|
57 |
+
.gtm4wp-phase-beta:before {
|
58 |
+
content: "beta";
|
59 |
+
}
|
60 |
+
|
61 |
+
.gtm4wp-phase-deprecated {
|
62 |
+
background-color: #ddd;
|
63 |
+
color: #000;
|
64 |
+
}
|
65 |
+
|
66 |
+
.gtm4wp-phase-experimental:before {
|
67 |
+
content: "experimental";
|
68 |
+
}
|
69 |
+
|
70 |
+
.gtm4wp-phase-deprecated:before {
|
71 |
+
content: "depecrated";
|
72 |
+
}
|
duracelltomi-google-tag-manager-for-wordpress.php
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Google Tag Manager for Wordpress
|
4 |
-
Version: 0
|
5 |
-
Plugin URI:
|
6 |
Description: The first Google Tag Manager plugin for WordPress with business goals in mind
|
7 |
Author: Thomas Geiger
|
8 |
-
Author URI:
|
9 |
*/
|
10 |
|
11 |
-
define( 'GTM4WP_VERSION', '0
|
12 |
define( 'GTM4WP_PATH', plugin_dir_path( __FILE__ ) );
|
13 |
define( 'GTM4WP_TEXTDOMAIN', 'gtm4wp-lang' );
|
14 |
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Google Tag Manager for Wordpress
|
4 |
+
Version: 1.0
|
5 |
+
Plugin URI: https://duracelltomi.com/google-tag-manager-for-wordpress/
|
6 |
Description: The first Google Tag Manager plugin for WordPress with business goals in mind
|
7 |
Author: Thomas Geiger
|
8 |
+
Author URI: https://duracelltomi.com/
|
9 |
*/
|
10 |
|
11 |
+
define( 'GTM4WP_VERSION', '1.0' );
|
12 |
define( 'GTM4WP_PATH', plugin_dir_path( __FILE__ ) );
|
13 |
define( 'GTM4WP_TEXTDOMAIN', 'gtm4wp-lang' );
|
14 |
|
integration/woocommerce.php
CHANGED
@@ -320,7 +320,7 @@ function gtm4wp_woocommerce_wp_footer() {
|
|
320 |
if ( true === $gtm4wp_options[ GTM4WP_OPTION_INTEGRATE_WCTRACKENHANCEDEC ] ) {
|
321 |
gtm4wp_woocommerce_addjs("
|
322 |
$('.add_to_cart_button:not(.product_type_variable, .product_type_grouped)').click(function() {
|
323 |
-
var productdata = $( this ).
|
324 |
|
325 |
". $gtm4wp_datalayer_name .".push({
|
326 |
'event': 'gtm4wp.addProductToCart',
|
320 |
if ( true === $gtm4wp_options[ GTM4WP_OPTION_INTEGRATE_WCTRACKENHANCEDEC ] ) {
|
321 |
gtm4wp_woocommerce_addjs("
|
322 |
$('.add_to_cart_button:not(.product_type_variable, .product_type_grouped)').click(function() {
|
323 |
+
var productdata = $( this ).closest( 'li' ).find( 'a .gtm4wp_productdata' );
|
324 |
|
325 |
". $gtm4wp_datalayer_name .".push({
|
326 |
'event': 'gtm4wp.addProductToCart',
|
js/admin-tabcreator.js
CHANGED
@@ -64,11 +64,11 @@
|
|
64 |
jQuery( '#wpbody form .tabinfo:eq(' + tabindex + '),#wpbody form .form-table:eq(' + tabindex + ')' )
|
65 |
.show();
|
66 |
|
67 |
-
jQuery( '#adminsubtabs' + tabindex + ':not(.subtab-activated)' )
|
68 |
.find( 'a:first' )
|
69 |
.trigger( 'click' );
|
70 |
|
71 |
-
jQuery( '#adminsubtabs' + tabindex )
|
72 |
.addClass( 'subtab-activated' )
|
73 |
.show();
|
74 |
|
64 |
jQuery( '#wpbody form .tabinfo:eq(' + tabindex + '),#wpbody form .form-table:eq(' + tabindex + ')' )
|
65 |
.show();
|
66 |
|
67 |
+
jQuery( '#wpbody-content #adminsubtabs' + tabindex + ':not(.subtab-activated)' )
|
68 |
.find( 'a:first' )
|
69 |
.trigger( 'click' );
|
70 |
|
71 |
+
jQuery( '#wpbody-content #adminsubtabs' + tabindex )
|
72 |
.addClass( 'subtab-activated' )
|
73 |
.show();
|
74 |
|
public/frontend.php
CHANGED
@@ -41,11 +41,14 @@ function gtm4wp_add_basic_datalayer_data( $dataLayer ) {
|
|
41 |
|
42 |
if ( $gtm4wp_options[ GTM4WP_OPTION_INCLUDE_USERROLE ] ) {
|
43 |
get_currentuserinfo();
|
44 |
-
$dataLayer["visitorType"] = ( $current_user->roles[0]
|
45 |
}
|
46 |
|
47 |
if ( $gtm4wp_options[ GTM4WP_OPTION_INCLUDE_USERID ] ) {
|
48 |
-
$
|
|
|
|
|
|
|
49 |
}
|
50 |
|
51 |
if ( $gtm4wp_options[ GTM4WP_OPTION_INCLUDE_POSTTITLE ] ) {
|
@@ -389,7 +392,7 @@ function gtm4wp_get_the_gtm_tag() {
|
|
389 |
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
390 |
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({\'gtm.start\':
|
391 |
new Date().getTime(),event:\'gtm.js\'});var f=d.getElementsByTagName(s)[0],
|
392 |
-
j=d.createElement(s),dl=l!=\'
|
393 |
\'//www.googletagmanager.com/gtm.js?id=\'+i+dl;f.parentNode.insertBefore(j,f);
|
394 |
})(window,document,\'script\',\'' . $gtm4wp_datalayer_name . '\',\'' . $gtm4wp_options[ GTM4WP_OPTION_GTM_CODE ] . '\');</script>
|
395 |
<!-- End Google Tag Manager -->';
|
41 |
|
42 |
if ( $gtm4wp_options[ GTM4WP_OPTION_INCLUDE_USERROLE ] ) {
|
43 |
get_currentuserinfo();
|
44 |
+
$dataLayer["visitorType"] = ( empty( $current_user->roles[0] ) ? "visitor-logged-out" : $current_user->roles[0] );
|
45 |
}
|
46 |
|
47 |
if ( $gtm4wp_options[ GTM4WP_OPTION_INCLUDE_USERID ] ) {
|
48 |
+
$_gtm4wp_userid = get_current_user_id();
|
49 |
+
if ( $_gtm4wp_userid > 0 ) {
|
50 |
+
$dataLayer["visitorId"] = $_gtm4wp_userid;
|
51 |
+
}
|
52 |
}
|
53 |
|
54 |
if ( $gtm4wp_options[ GTM4WP_OPTION_INCLUDE_POSTTITLE ] ) {
|
392 |
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
393 |
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({\'gtm.start\':
|
394 |
new Date().getTime(),event:\'gtm.js\'});var f=d.getElementsByTagName(s)[0],
|
395 |
+
j=d.createElement(s),dl=l!=\'dataLayer\'?\'&l=\'+l:\'\';j.async=true;j.src=
|
396 |
\'//www.googletagmanager.com/gtm.js?id=\'+i+dl;f.parentNode.insertBefore(j,f);
|
397 |
})(window,document,\'script\',\'' . $gtm4wp_datalayer_name . '\',\'' . $gtm4wp_options[ GTM4WP_OPTION_GTM_CODE ] . '\');</script>
|
398 |
<!-- End Google Tag Manager -->';
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== DuracellTomi's Google Tag Manager for WordPress ===
|
2 |
Contributors: duracelltomi
|
3 |
-
Donate link:
|
4 |
Tags: google tag manager, tag manager, gtm, google, adwords, google adwords, adwords remarketing, remarketing, google analytics, analytics
|
5 |
Requires at least: 3.0.1
|
6 |
-
Tested up to: 4.1
|
7 |
-
Stable tag: 0
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl.html
|
10 |
|
@@ -42,6 +42,8 @@ This can be useful to catch empty (product) categories.
|
|
42 |
|
43 |
= Browser / OS / Device data =
|
44 |
|
|
|
|
|
45 |
* browser data (name, version, engine)
|
46 |
* OS data (name, version)
|
47 |
* device data (type, manufacturer, model)
|
@@ -50,6 +52,8 @@ Data is provided using the WhichBrowser library: http://whichbrowser.net/
|
|
50 |
|
51 |
= Weather data =
|
52 |
|
|
|
|
|
53 |
Add the current weather conditions into the dataLayer so that you can use this information to generate special
|
54 |
remarketing lists and additional segmentation in your web analytics solution:
|
55 |
|
@@ -72,13 +76,11 @@ http://www.geoplugin.com/premium
|
|
72 |
|
73 |
This plugin can fire several Tag Manager event so that you can include special tags when
|
74 |
|
75 |
-
* the visitor clicks on an outbound link
|
76 |
-
* the visitor clicks on a download link
|
77 |
-
* the visitor clicks on an email link
|
78 |
* the visitor moves between elements of a form (comment, contact, etc.)
|
79 |
* the visitor clicks on a Facebook like/share (limited feature) or Twitter button
|
80 |
-
|
81 |
-
|
|
|
82 |
|
83 |
= Scroll tracking =
|
84 |
|
@@ -125,12 +127,26 @@ Google Tag Manager for WordPress can integrate with several popular plugins.
|
|
125 |
* fire event when visitors ads a product to your cart
|
126 |
* include transaction data to be sent to Google/Universal Analytics
|
127 |
* include necessary remarketing tags for Google AdWords Dynamic Remarketing
|
128 |
-
* Enhanced e-commerce (
|
129 |
* implementation of [Enhanced E-commerce](https://developers.google.com/tag-manager/enhanced-ecommerce)
|
130 |
* Does not include tracking of promotions since WooCommerce does not have such a feature (yet)
|
131 |
|
132 |
More integration to come!
|
133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
== Installation ==
|
135 |
|
136 |
1. Upload `duracelltomi-google-tag-manager-for-wordpress` to the `/wp-content/plugins/` directory
|
@@ -233,7 +249,7 @@ If it shows an error, go and edit your theme manually.
|
|
233 |
= Facebook like/share/send button events do not fire for me, why? =
|
234 |
|
235 |
It is a limitation of Facebook. Click event tracking is only available for html5/xfbml buttons.
|
236 |
-
If you or your social plugin inserts the Facebook buttons using
|
237 |
|
238 |
== Screenshots ==
|
239 |
|
@@ -246,6 +262,25 @@ If you or your social plugin inserts the Facebook buttons using IFRAME-s (like S
|
|
246 |
|
247 |
== Changelog ==
|
248 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
= 0.9.1 =
|
250 |
|
251 |
* Fixed: PHP error message: missing get_shipping function using WooCommerce 2.3.x
|
@@ -336,6 +371,10 @@ If you or your social plugin inserts the Facebook buttons using IFRAME-s (like S
|
|
336 |
|
337 |
== Upgrade Notice ==
|
338 |
|
|
|
|
|
|
|
|
|
339 |
= 0.9.1 =
|
340 |
|
341 |
Bugfix release for WooCommerce users with ecommerce tracking enabled
|
1 |
=== DuracellTomi's Google Tag Manager for WordPress ===
|
2 |
Contributors: duracelltomi
|
3 |
+
Donate link: https://duracelltomi.com/
|
4 |
Tags: google tag manager, tag manager, gtm, google, adwords, google adwords, adwords remarketing, remarketing, google analytics, analytics
|
5 |
Requires at least: 3.0.1
|
6 |
+
Tested up to: 4.2.1
|
7 |
+
Stable tag: 1.0
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl.html
|
10 |
|
42 |
|
43 |
= Browser / OS / Device data =
|
44 |
|
45 |
+
(beta)
|
46 |
+
|
47 |
* browser data (name, version, engine)
|
48 |
* OS data (name, version)
|
49 |
* device data (type, manufacturer, model)
|
52 |
|
53 |
= Weather data =
|
54 |
|
55 |
+
(beta)
|
56 |
+
|
57 |
Add the current weather conditions into the dataLayer so that you can use this information to generate special
|
58 |
remarketing lists and additional segmentation in your web analytics solution:
|
59 |
|
76 |
|
77 |
This plugin can fire several Tag Manager event so that you can include special tags when
|
78 |
|
|
|
|
|
|
|
79 |
* the visitor moves between elements of a form (comment, contact, etc.)
|
80 |
* the visitor clicks on a Facebook like/share (limited feature) or Twitter button
|
81 |
+
* the visitor clicks on an outbound link (depecrated)
|
82 |
+
* the visitor clicks on a download link (depecrated)
|
83 |
+
* the visitor clicks on an email link (depecrated)
|
84 |
|
85 |
= Scroll tracking =
|
86 |
|
127 |
* fire event when visitors ads a product to your cart
|
128 |
* include transaction data to be sent to Google/Universal Analytics
|
129 |
* include necessary remarketing tags for Google AdWords Dynamic Remarketing
|
130 |
+
* Enhanced e-commerce (beta):
|
131 |
* implementation of [Enhanced E-commerce](https://developers.google.com/tag-manager/enhanced-ecommerce)
|
132 |
* Does not include tracking of promotions since WooCommerce does not have such a feature (yet)
|
133 |
|
134 |
More integration to come!
|
135 |
|
136 |
+
= Planned features =
|
137 |
+
|
138 |
+
Note: list of planned features can change as development goes on!
|
139 |
+
|
140 |
+
* 1.3
|
141 |
+
* dataLayer elements to include when JavaScript is turned of in a browser (request by Simo Ahava)
|
142 |
+
* 1.2
|
143 |
+
* MailChimp for WordPress support (request by I-Visio)
|
144 |
+
* Custom dataLayer elements: place your own items site-wide or per page/post
|
145 |
+
* 1.1
|
146 |
+
* YouTube video tracking using GTM events
|
147 |
+
* Vimeo video tracking using GTM events
|
148 |
+
* New code insertion option that does not require theme tweaking (request by Phil Pearce)
|
149 |
+
|
150 |
== Installation ==
|
151 |
|
152 |
1. Upload `duracelltomi-google-tag-manager-for-wordpress` to the `/wp-content/plugins/` directory
|
249 |
= Facebook like/share/send button events do not fire for me, why? =
|
250 |
|
251 |
It is a limitation of Facebook. Click event tracking is only available for html5/xfbml buttons.
|
252 |
+
If you or your social plugin inserts the Facebook buttons using IFRAMEs (like Sociable), it is not possible to track likes.
|
253 |
|
254 |
== Screenshots ==
|
255 |
|
262 |
|
263 |
== Changelog ==
|
264 |
|
265 |
+
= 1.0 =
|
266 |
+
|
267 |
+
The plugin itself is now declared as stable. This means that it should work with most WordPress instances.
|
268 |
+
From now on each version will include features labeled as:
|
269 |
+
|
270 |
+
* Beta: the feature has been proven to work for several users but it can still have some bugs
|
271 |
+
* Experimental: new feature that needs proper testing with more users
|
272 |
+
* Depecrated: this feature will be removed in a future version
|
273 |
+
|
274 |
+
If you see any issue with beta or experimental functions just disable the checkbox. Using this error messages should disappear.
|
275 |
+
Please report all bugs found in my plugin using the [contact form on my website](https://duracelltomi.com/contact).
|
276 |
+
|
277 |
+
* Fixed: wrong GTM container code when renaming default dataLayer variable name (thx Vassilis Papavassiliou)
|
278 |
+
* Fixed: Enhanced Ecommerce product click data was "undefined" in some cases (thx Sergio Alen)
|
279 |
+
* Fixed: wrong user role detection while addint visitorType to the dataLayer (thx Philippe Vachon-Rivard)
|
280 |
+
* Changed: only add visitorId to the dataLayer if there is a logged in user
|
281 |
+
* Added: feature labels so that you can see beta, experimental and depecrated features
|
282 |
+
* Depecrated: outbound click, email click and download click events. You should use GTM trigger events instead
|
283 |
+
|
284 |
= 0.9.1 =
|
285 |
|
286 |
* Fixed: PHP error message: missing get_shipping function using WooCommerce 2.3.x
|
371 |
|
372 |
== Upgrade Notice ==
|
373 |
|
374 |
+
= 1.0 =
|
375 |
+
|
376 |
+
First stable release, please read changelog for details!
|
377 |
+
|
378 |
= 0.9.1 =
|
379 |
|
380 |
Bugfix release for WooCommerce users with ecommerce tracking enabled
|