93
93
$ domain_mode = vartrue ($ prefs ['domain_mode ' ], 0 );
94
94
$ googleanalytics_adsense_script = '' ;
95
95
96
- // Per RFC 2109, cookie domains must contain at least one dot other than the
97
- // first. For hosts such as 'localhost' or IP Addresses we don't set a cookie domain.
96
+ // Per RFC 2109, cookie domains must contain at least one dot other than the first. For hosts such as 'localhost'
97
+ // or IP Addresses we don't set a cookie domain.
98
98
if ($ domain_mode == 1 && count (explode ('. ' , $ cookie_domain )) > 2 && !is_numeric (str_replace ('. ' , '' , $ cookie_domain )))
99
99
{
100
100
$ create_only_fields = array_merge ($ create_only_fields , array ('cookieDomain ' => $ cookie_domain ));
110
110
// Track logged in users across all devices.
111
111
if (vartrue ($ prefs ['track_user_id ' ], 0 ) && USERID )
112
112
{
113
- // The USERID value should be a unique, persistent, and non-personally
114
- // identifiable string identifier that represents a user or signed-in
115
- // account across devices.
113
+ // The USERID value should be a unique, persistent, and non-personally identifiable string identifier that
114
+ // represents a user or signed-in account across devices.
116
115
$ userID = google_analytics_hmac_base64 (USERID , google_analytics_get_private_key ()); // TODO: Salt private key.
117
116
$ create_only_fields ['userId ' ] = $ userID ;
118
117
}
180
179
}
181
180
182
181
/**
183
- * Based on visibility setting this function returns TRUE if GA code should
184
- * be added to the current user class and otherwise FALSE.
182
+ * Based on visibility setting this function returns TRUE if GA code should be added to the current user class and
183
+ * otherwise FALSE.
185
184
*/
186
185
function google_analytics_visibility_roles ()
187
186
{
@@ -190,8 +189,8 @@ function google_analytics_visibility_roles()
190
189
}
191
190
192
191
/**
193
- * Based on visibility setting this function returns TRUE if GA code should
194
- * be added to the current page and otherwise FALSE.
192
+ * Based on visibility setting this function returns TRUE if GA code should be added to the current page and otherwise
193
+ * FALSE.
195
194
*/
196
195
function google_analytics_visibility_pages ()
197
196
{
@@ -258,7 +257,7 @@ function google_analytics_visibility_pages()
258
257
* <code>
259
258
* <?php
260
259
* google_analytics_match_path('my/path/here', 'my/path/*'); // returns true
261
- * google_analytics_match_path('my/path/here', '*my *'); // returns true
260
+ * google_analytics_match_path('my/path/here', '*path *'); // returns true
262
261
* ?>
263
262
* </code>
264
263
*
0 commit comments