HubSpot – Free Marketing Plugin for WordPress - Version 4.2.1

Version Description

(2015.08.13) = - Fix detection of front page for popup triggering - Update screenshots

Download this release

Release Info

Developer leadin
Plugin Icon 128x128 HubSpot – Free Marketing Plugin for WordPress
Version 4.2.1
Comparing to
See all releases

Code changes from version 4.2.0 to 4.2.1

admin/leadin-admin.php CHANGED
@@ -111,7 +111,7 @@ class WPLeadInAdmin {
111
 
112
  $submenu['leadin'][0][0] = 'Stats';
113
 
114
- if ( ! isset($_GET['page']) || $_GET['page'] != 'leadin_settings' )
115
  {
116
  if ( ! get_option('leadin_portalId') )
117
  $li_pointers = new LI_Pointers(TRUE);
@@ -175,7 +175,6 @@ class WPLeadInAdmin {
175
  'portalId' => get_option('leadin_portalId'),
176
  'hapikey' => get_option('leadin_hapikey'),
177
  'env' => constant('LEADIN_ENV'),
178
- 'segmentKey' => constant('LEADIN_SEGMENT_WRITE_KEY'),
179
  'user' => $this->leadin_get_user_for_tracking(),
180
  'allRoles' => $wp_roles->get_names(),
181
  'leadinPluginVersion' => constant('LEADIN_PLUGIN_VERSION'),
@@ -192,7 +191,8 @@ class WPLeadInAdmin {
192
  'leadinPluginDirectory' => LEADIN_PLUGIN_SLUG,
193
  'ajaxUrl' => is_ssl() ? str_replace('http:', 'https:', $ajaxUrl) : str_replace('https:', 'http:', $ajaxUrl),
194
  'locale' => get_locale(),
195
- 'timezone' => get_option('gmt_offset')
 
196
  );
197
 
198
  // remove after migration is complete
111
 
112
  $submenu['leadin'][0][0] = 'Stats';
113
 
114
+ if ( ! isset($_GET['page']) || $_GET['page'] != ('leadin' || 'leadin_settings' || 'leadin_contacts') )
115
  {
116
  if ( ! get_option('leadin_portalId') )
117
  $li_pointers = new LI_Pointers(TRUE);
175
  'portalId' => get_option('leadin_portalId'),
176
  'hapikey' => get_option('leadin_hapikey'),
177
  'env' => constant('LEADIN_ENV'),
 
178
  'user' => $this->leadin_get_user_for_tracking(),
179
  'allRoles' => $wp_roles->get_names(),
180
  'leadinPluginVersion' => constant('LEADIN_PLUGIN_VERSION'),
191
  'leadinPluginDirectory' => LEADIN_PLUGIN_SLUG,
192
  'ajaxUrl' => is_ssl() ? str_replace('http:', 'https:', $ajaxUrl) : str_replace('https:', 'http:', $ajaxUrl),
193
  'locale' => get_locale(),
194
+ 'timezone' => get_option('gmt_offset'),
195
+ 'timezoneString' => get_option('timezone_string') // If not set by the user manually it will be an empty string
196
  );
197
 
198
  // remove after migration is complete
images/src/checkmark.png ADDED
Binary file
images/src/leadin-icon-32x32.png ADDED
Binary file
images/src/leadin-svg-icon.svg ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg width="32px" height="20px" viewBox="0 0 32 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
3
+ <title>leadin-svg-icon</title>
4
+ <description>Created with Sketch (http://www.bohemiancoding.com/sketch)</description>
5
+ <defs></defs>
6
+ <g id="Logo" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
7
+ <path d="M24.2659022,1.36625531 L18.6030712,19.9939886 L24.3824248,19.9939886 C25.180195,19.9939886 26.0085196,19.3966068 26.2321138,18.6610995 L31.4897464,1.36625531 C31.7135312,0.630121017 31.2475193,0.0333662628 30.450454,0.0333662628 L26.1155911,0.0333662628 C25.3178209,0.0333662628 24.4894964,0.63074804 24.2659022,1.36625531 Z" id="Rectangle-100" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
8
+ <path d="M13.4017203,6.68750917 L9.35655059,19.9939886 L15.1359041,19.9939886 C15.9336743,19.9939886 16.761737,19.3974683 16.9851132,18.6626783 L21.0302829,5.35619888 L15.2509294,5.35619888 C14.4531592,5.35619888 13.6250965,5.95271916 13.4017203,6.68750917 Z" id="Rectangle-100-copy" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
9
+ <path d="M2.53756131,12.008688 L0.514245522,18.664332 C0.291003421,19.3986811 0.757455297,19.9939886 1.55452066,19.9939886 L5.88938348,19.9939886 C6.68715368,19.9939886 7.51532043,19.3971259 7.73808978,18.664332 L10.1656212,10.6790315 L4.38626761,10.6790315 C3.58849742,10.6790315 2.76033066,11.2758941 2.53756131,12.008688 Z" id="Rectangle-100-copy-2" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
10
+ </g>
11
+ </svg>
images/src/popup-bottom.png ADDED
Binary file
images/src/popup-over.png ADDED
Binary file
images/src/popup-top.png ADDED
Binary file
images/src/select2-spinner.gif ADDED
Binary file
images/src/select2.png ADDED
Binary file
images/src/select2x2.png ADDED
Binary file
images/src/triangle.png ADDED
Binary file
inc/class-leadin-pointers.php CHANGED
@@ -24,7 +24,7 @@ class LI_Pointers {
24
 
25
  if ( $new_install )
26
  {
27
- add_action('admin_enqueue_scripts', array($this, 'enqueu_new_install_pointer'));
28
  }
29
  else
30
  {
@@ -35,7 +35,7 @@ class LI_Pointers {
35
  /**
36
  * Enqueue styles and scripts needed for the pointers.
37
  */
38
- function enqueu_new_install_pointer ()
39
  {
40
  if ( ! current_user_can('manage_options') )
41
  return;
24
 
25
  if ( $new_install )
26
  {
27
+ add_action('admin_enqueue_scripts', array($this, 'enqueue_new_install_pointer'));
28
  }
29
  else
30
  {
35
  /**
36
  * Enqueue styles and scripts needed for the pointers.
37
  */
38
+ function enqueue_new_install_pointer ()
39
  {
40
  if ( ! current_user_can('manage_options') )
41
  return;
inc/class-leadin.php CHANGED
@@ -59,14 +59,14 @@ class WPLeadIn {
59
 
60
  if ( is_single() )
61
  $page_type = 'post';
62
- else if ( is_page() )
63
- $page_type = 'page';
64
  else if ( is_archive() )
65
  $page_type = 'archive';
66
  else if ( $this->leadin_is_login_or_register_page() )
67
  $page_type = 'login';
68
- else if ( is_home() )
69
- $page_type = 'home';
70
  else
71
  $page_type = 'other';
72
 
59
 
60
  if ( is_single() )
61
  $page_type = 'post';
62
+ else if ( is_front_page() )
63
+ $page_type = 'home';
64
  else if ( is_archive() )
65
  $page_type = 'archive';
66
  else if ( $this->leadin_is_login_or_register_page() )
67
  $page_type = 'login';
68
+ else if ( is_page() )
69
+ $page_type = 'page';
70
  else
71
  $page_type = 'other';
72
 
inc/leadin-constants.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined('LEADIN_UTM_SOURCE') )
4
+ define('LEADIN_UTM_SOURCE', 'leadin%20repo%20plugin');
5
+
6
+ if ( ! defined('LEADIN_UTM_MEDIUM') )
7
+ define('LEADIN_UTM_MEDIUM', 'referral');
8
+
9
+ if ( ! defined('LEADIN_UTM_CONTENT') )
10
+ define('LEADIN_UTM_CONTENT', 'e10');
11
+
12
+ if ( ! defined('LEADIN_UTM_CAMPAIGN') )
13
+ define('LEADIN_UTM_CAMPAIGN', 'one%20click%20updater');
14
+
15
+ ?>
inc/leadin-functions.php CHANGED
@@ -134,127 +134,6 @@ function leadin_get_current_user ()
134
  return $leadin_user;
135
  }
136
 
137
- /**
138
- * Get list of traits converted for Segment
139
- *
140
- * @return array
141
- */
142
- function leadin_get_segment_traits ()
143
- {
144
- $leadin_user = leadin_get_current_user();
145
- $traits = array(
146
- "name" => $leadin_user['alias'],
147
- "email" => $leadin_user['email'],
148
- "wp-url" => $leadin_user["wp_url"],
149
- "wp-version" => $leadin_user["wp_version"],
150
- "li-version" => $leadin_user["li_version"],
151
- "li-source" => LEADIN_SOURCE,
152
- "createdAt" => date("Y-m-d H:i:s"),
153
- "website" => $leadin_user["wp_url"],
154
- "company" => $leadin_user["wp_url"],
155
- "utm_source" => $leadin_user["utm_source"],
156
- "utm_medium" => $leadin_user["utm_medium"],
157
- "utm_term" => $leadin_user["utm_term"],
158
- "utm_content" => $leadin_user["utm_content"],
159
- "utm_campaign" => $leadin_user["utm_campaign"],
160
- "referral_source" => $leadin_user["referral_source"],
161
- "portal_id" => $leadin_user["portal_id"]
162
- );
163
-
164
- return $traits;
165
- }
166
-
167
- /**
168
- * Set Premium propertey on Leadin user in Segment
169
- *
170
- * @return bool
171
- */
172
- function leadin_set_user_properties ( $properties = array() )
173
- {
174
- if ( ! function_exists('curl_init') )
175
- return FALSE;
176
-
177
- $leadin_user = leadin_get_current_user();
178
-
179
- Segment::init(LEADIN_SEGMENT_WRITE_KEY);
180
-
181
- Segment::identify(array(
182
- "userId" => $leadin_user['user_id'],
183
- "traits" => $properties
184
- ));
185
- }
186
-
187
- /**
188
- * Send Mixpanel event when plugin is activated/deactivated
189
- *
190
- * @param bool
191
- *
192
- * @return bool
193
- */
194
- function leadin_track_plugin_registration_hook ( $activated )
195
- {
196
- $properties = array();
197
-
198
- if ( $activated )
199
- {
200
- leadin_track_plugin_activity("Activated Plugin");
201
- $properties["last_activated"] = date("Y-m-d H:i:s");
202
- $properties["li-status"] = "activated";
203
- }
204
- else
205
- {
206
- $leadin_user = leadin_get_current_user();
207
- $track_props = array();
208
- if ( empty($leadin_user["portal_id"]) ) {
209
- $track_props["is_signed_up"] = "false";
210
- }
211
- else {
212
- $track_props["is_signed_up"] = "true";
213
- }
214
- leadin_track_plugin_activity("Deactivated Plugin", $track_props);
215
- $properties["last_deactivated"] = date("Y-m-d H:i:s");
216
- $properties["li-status"] = "deactivated";
217
- }
218
-
219
- leadin_set_user_properties( $properties );
220
-
221
- return TRUE;
222
- }
223
-
224
- /**
225
- * Track plugin activity
226
- *
227
- * @param string
228
- *
229
- * @return array
230
- */
231
- function leadin_track_plugin_activity ( $activity_desc, $custom_properties = array() )
232
- {
233
- if ( ! function_exists('curl_init') )
234
- return FALSE;
235
-
236
- $leadin_user = leadin_get_current_user();
237
-
238
- $default_properties = leadin_get_segment_traits();
239
- $properties = array_merge((array)$default_properties, (array)$custom_properties);
240
- if (!empty($leadin_user['portal_id']) ) {
241
- $tracking_user_id = $leadin_user['portal_id'];
242
- }
243
- else {
244
- $tracking_user_id = $leadin_user['user_id'];
245
- }
246
-
247
- Segment::init(LEADIN_SEGMENT_WRITE_KEY);
248
-
249
- Segment::track(array(
250
- 'userId' => $tracking_user_id,
251
- 'event' => $activity_desc,
252
- 'properties' => $properties
253
- ));
254
-
255
- return TRUE;
256
- }
257
-
258
  /**
259
  * Logs a debug statement to /wp-content/debug.log
260
  *
@@ -1088,12 +967,4 @@ function leadin_maybe_add_migration_db_columns ()
1088
  }
1089
  }
1090
 
1091
- function log_error ( $message )
1092
- {
1093
- if ( is_array($message) || is_object($message) )
1094
- error_log(print_r($message, TRUE));
1095
- else
1096
- error_log($message);
1097
- }
1098
-
1099
  ?>
134
  return $leadin_user;
135
  }
136
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  /**
138
  * Logs a debug statement to /wp-content/debug.log
139
  *
967
  }
968
  }
969
 
 
 
 
 
 
 
 
 
970
  ?>
leadin.php CHANGED
@@ -31,9 +31,6 @@ if ( !defined('LEADIN_DB_VERSION') )
31
  if ( !defined('LEADIN_PLUGIN_VERSION') )
32
  define('LEADIN_PLUGIN_VERSION', '4.1.1');
33
 
34
- if ( !defined('LEADIN_SEGMENT_WRITE_KEY') )
35
- define('LEADIN_SEGMENT_WRITE_KEY', '1jPKDqXIRKMzEX7zv4eqlqELGXcDq6NT');
36
-
37
  if ( !defined('LEADIN_SOURCE') )
38
  define('LEADIN_SOURCE', 'leadin.com');
39
 
@@ -94,7 +91,6 @@ function activate_leadin ( $network_wide )
94
  switch_to_blog($blog_id);
95
  add_leadin_defaults();
96
  $activated[] = $blog_id;
97
- leadin_track_plugin_registration_hook(TRUE);
98
  }
99
 
100
  // Switch back to the current blog
@@ -106,7 +102,6 @@ function activate_leadin ( $network_wide )
106
  else
107
  {
108
  add_leadin_defaults();
109
- leadin_track_plugin_registration_hook(TRUE);
110
  }
111
  }
112
 
@@ -158,28 +153,6 @@ function add_leadin_defaults ( )
158
  }
159
 
160
  setcookie ( "ignore_social_share" , "1", 2592000, "/" );
161
-
162
- $traits = array();
163
-
164
- if ( defined('LEADIN_REFERRAL_SOURCE') )
165
- $traits['referral_source'] = LEADIN_REFERRAL_SOURCE;
166
-
167
- if ( defined('LEADIN_UTM_SOURCE') )
168
- $traits['utm_source'] = LEADIN_UTM_SOURCE;
169
-
170
- if ( defined('LEADIN_UTM_MEDIUM') )
171
- $traits['utm_medium'] = LEADIN_UTM_MEDIUM;
172
-
173
- if ( defined('LEADIN_UTM_TERM') )
174
- $traits['utm_term'] = LEADIN_UTM_TERM;
175
-
176
- if ( defined('LEADIN_UTM_CONTENT') )
177
- $traits['utm_content'] = LEADIN_UTM_CONTENT;
178
-
179
- if ( defined('LEADIN_UTM_CAMPAIGN') )
180
- $traits['utm_campaign'] = LEADIN_UTM_CAMPAIGN;
181
-
182
- leadin_set_user_properties($traits);
183
  }
184
 
185
  /**
@@ -206,8 +179,6 @@ function deactivate_leadin ( $network_wide )
206
  // Switch back to the current blog
207
  switch_to_blog($current_blog);
208
  }
209
- else
210
- leadin_track_plugin_registration_hook(FALSE);
211
  }
212
 
213
  function activate_leadin_on_new_blog ( $blog_id, $user_id, $domain, $path, $site_id, $meta )
31
  if ( !defined('LEADIN_PLUGIN_VERSION') )
32
  define('LEADIN_PLUGIN_VERSION', '4.1.1');
33
 
 
 
 
34
  if ( !defined('LEADIN_SOURCE') )
35
  define('LEADIN_SOURCE', 'leadin.com');
36
 
91
  switch_to_blog($blog_id);
92
  add_leadin_defaults();
93
  $activated[] = $blog_id;
 
94
  }
95
 
96
  // Switch back to the current blog
102
  else
103
  {
104
  add_leadin_defaults();
 
105
  }
106
  }
107
 
153
  }
154
 
155
  setcookie ( "ignore_social_share" , "1", 2592000, "/" );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  }
157
 
158
  /**
179
  // Switch back to the current blog
180
  switch_to_blog($current_blog);
181
  }
 
 
182
  }
183
 
184
  function activate_leadin_on_new_blog ( $blog_id, $user_id, $domain, $path, $site_id, $meta )
package.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "leadin",
3
+ "version": "1.0.0",
4
+ "devDependencies": {
5
+ "grunt": "^0.4.5",
6
+ "grunt-contrib-compass": "^1.0.1",
7
+ "grunt-contrib-clean": "^0.6.0",
8
+ "grunt-contrib-concat": "~0.4.0",
9
+ "grunt-contrib-uglify": "~0.4.0",
10
+ "grunt-contrib-watch": "~0.6.1"
11
+ },
12
+ "description": "=== LeadIn === Contributors: andygcook, nelsonjoyce Tags: lead tracking, visitor tracking, analytics, crm, marketing automation, inbound marketing, subscription, marketing, lead generation, mailchimp Requires at least: 3.7 Tested up to: 3.9.1 Stable tag: 1.0.0",
13
+ "main": "gruntfile.js",
14
+ "dependencies": {},
15
+ "scripts": {
16
+ "test": "echo \"Error: no test specified\" && exit 1"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/LeadIn/leadin.git"
21
+ },
22
+ "author": "",
23
+ "license": "ISC",
24
+ "bugs": {
25
+ "url": "https://github.com/LeadIn/leadin/issues"
26
+ },
27
+ "homepage": "https://github.com/LeadIn/leadin"
28
+ }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: leadin, sredmond
3
  Tags: crm, contacts, lead tracking, click tracking, visitor tracking, analytics, marketing automation, inbound marketing, subscription, marketing, lead generation, mailchimp, constant contact, newsletter, popup, popover, email list, email, contacts database, contact form, forms, form widget, popup form
4
  Requires at least: 3.7
5
  Tested up to: 4.2.4
6
- Stable tag: 4.2.0
7
 
8
  Leadin is an easy-to-use marketing automation and lead tracking plugin for WordPress that helps you better understand your web site visitors.
9
 
@@ -62,14 +62,17 @@ Having trouble? Check out our <a href="http://support.leadin.com/" target="_blan
62
  1. See the visit history of each contact.
63
  2. Get an email notification for every new lead.
64
  3. Leadin stats show you where your leads are coming from.
65
- 4. Segment your contact list based on page views and submissions.
66
  5. Collect more contacts with the pop-up subscribe widget.
67
- 6. Create custom tagged lists, choose the form triggers to add contacts and sync your contacts to third-party email services
68
 
69
  == Changelog ==
70
 
71
- - Current version: 4.2.0
72
- - Current version release: 2015-07-14
 
 
 
 
73
 
74
  = 4.2.0 (2015.08.13) =
75
  - Migration improvements
3
  Tags: crm, contacts, lead tracking, click tracking, visitor tracking, analytics, marketing automation, inbound marketing, subscription, marketing, lead generation, mailchimp, constant contact, newsletter, popup, popover, email list, email, contacts database, contact form, forms, form widget, popup form
4
  Requires at least: 3.7
5
  Tested up to: 4.2.4
6
+ Stable tag: 4.2.1
7
 
8
  Leadin is an easy-to-use marketing automation and lead tracking plugin for WordPress that helps you better understand your web site visitors.
9
 
62
  1. See the visit history of each contact.
63
  2. Get an email notification for every new lead.
64
  3. Leadin stats show you where your leads are coming from.
65
+ 4. All your contacts stored safely in one place.
66
  5. Collect more contacts with the pop-up subscribe widget.
 
67
 
68
  == Changelog ==
69
 
70
+ - Current version: 4.2.1
71
+ - Current version release: 2015-08-13
72
+
73
+ = 4.2.1 (2015.08.13) =
74
+ - Fix detection of front page for popup triggering
75
+ - Update screenshots
76
 
77
  = 4.2.0 (2015.08.13) =
78
  - Migration improvements
screenshot-1.png CHANGED
Binary file
screenshot-2.png CHANGED
Binary file
screenshot-3.png CHANGED
Binary file
screenshot-4.png CHANGED
Binary file
screenshot-5.png CHANGED
Binary file
screenshot-6.png DELETED
Binary file