Hotjar - Version 1.0.13

Version Description

  • Tested on WP 6.0.
Download this release

Release Info

Developer hotjar
Plugin Icon wp plugin Hotjar
Version 1.0.13
Comparing to
See all releases

Code changes from version 1.0.12 to 1.0.13

hotjar.php CHANGED
@@ -4,7 +4,7 @@
4
  * Description: The fast & visual way to understand your users.
5
  * Author: Hotjar
6
  * Author URI: https://www.hotjar.com/
7
- * Version: 1.0.12
8
  * License: GPLv3
9
  * License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
10
  * Text Domain: hotjar
@@ -26,7 +26,7 @@ function hotjar_plugin_init() {
26
  /**
27
  * @var Const Plugin Version Number
28
  */
29
- const VERSION = '1.0.12';
30
 
31
  /**
32
  * @var Singleton The reference the *Singleton* instance of this class
4
  * Description: The fast & visual way to understand your users.
5
  * Author: Hotjar
6
  * Author URI: https://www.hotjar.com/
7
+ * Version: 1.0.13
8
  * License: GPLv3
9
  * License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
10
  * Text Domain: hotjar
26
  /**
27
  * @var Const Plugin Version Number
28
  */
29
+ const VERSION = '1.0.13';
30
 
31
  /**
32
  * @var Singleton The reference the *Singleton* instance of this class
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: hotjar
3
  Tags: hotjar,insights,visual,heatmaps,recordings,funnels,analytics
4
  Requires at least: 4.6
5
- Tested up to: 5.8.1
6
- Stable tag: 1.0.12
7
  License: GPLv3
8
  License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
9
 
@@ -84,6 +84,10 @@ You can uninstall this plugin at any time to remove Hotjar from your site. Data
84
 
85
  == Changelog ==
86
 
 
 
 
 
87
  = 1.0.12 =
88
  * Updated assets and tested on WP 5.8.1
89
 
2
  Contributors: hotjar
3
  Tags: hotjar,insights,visual,heatmaps,recordings,funnels,analytics
4
  Requires at least: 4.6
5
+ Tested up to: 6.0
6
+ Stable tag: 1.0.13
7
  License: GPLv3
8
  License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
9
 
84
 
85
  == Changelog ==
86
 
87
+
88
+ = 1.0.13 =
89
+ * Tested on WP 6.0.
90
+
91
  = 1.0.12 =
92
  * Updated assets and tested on WP 5.8.1
93
 
trunk/LICENSE DELETED
@@ -1,15 +0,0 @@
1
- Hotjar Plugin for WordPress
2
- Copyright (C) 2019 Hotjar Ltd.
3
-
4
- This program is free software: you can redistribute it and/or modify
5
- it under the terms of the GNU General Public License as published by
6
- the Free Software Foundation, either version 3 of the License, or
7
- (at your option) any later version.
8
-
9
- This program is distributed in the hope that it will be useful,
10
- but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- GNU General Public License for more details.
13
-
14
- You should have received a copy of the GNU General Public License
15
- along with this program. If not, see <https://www.gnu.org/licenses/>.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/admin/static/hotjar-admin.css DELETED
@@ -1,20 +0,0 @@
1
- #business-info-wrap {
2
- margin: 2rem;
3
- }
4
-
5
- #hotjar-form-area {
6
- padding: 0.5rem 1rem;
7
- margin-top: 1.5rem;
8
- }
9
-
10
- .hotjar-logo {
11
- display: block;
12
- width: 80px;
13
- margin-bottom: 1rem;
14
- }
15
-
16
- .hotjar-tagline {
17
- display: block;
18
- width: 350px;
19
- margin-left: -9px;
20
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/admin/static/hotjar_logo_2x.png DELETED
Binary file
trunk/admin/static/tagline_2x.png DELETED
Binary file
trunk/admin/views/settings.php DELETED
@@ -1,64 +0,0 @@
1
- <?php
2
-
3
- // No direct access to this file
4
- defined( 'ABSPATH' ) or die();
5
-
6
- ?>
7
-
8
- <?php if ( isset( $_GET['settings-updated'] ) ) : ?>
9
-
10
- <?php if ( get_option('hotjar_site_id') == '' ): ?>
11
- <div id="message" class="notice notice-warning is-dismissible">
12
- <p><strong><?php _e('Hotjar script is disabled.', 'hotjar'); ?></strong></p>
13
- </div>
14
- <?php else: ?>
15
- <div id="message" class="notice notice-success is-dismissible">
16
- <p><strong><?php echo sprintf( __('Hotjar script installed for Site ID %s <a href="%s" target="_blank">Click here to verify your install</a>.', 'hotjar'), get_option('hotjar_site_id'), get_site_url() . '?hjVerifyInstall=' . get_option('hotjar_site_id') ); ?></strong></p>
17
- </div>
18
- <?php endif; ?>
19
-
20
- <?php endif; ?>
21
-
22
-
23
- <div id="business-info-wrap" class="wrap">
24
-
25
- <div class="wp-header">
26
- <img src="<?php echo plugins_url( '../static/hotjar_logo_2x.png', __FILE__ ); ?>" alt="Hotjar" class="hotjar-logo">
27
- <img src="<?php echo plugins_url( '../static/tagline_2x.png', __FILE__ ); ?>" alt="<?php echo __('The fast & visual way to understand your users.', 'hotjar'); ?>" class="hotjar-tagline">
28
- </div>
29
-
30
-
31
-
32
- <form method="post" action="options.php">
33
- <?php settings_fields( 'hotjar' );
34
- do_settings_sections('hotjar'); ?>
35
-
36
- <div id="hotjar-form-area">
37
- <p><?php
38
- $url = 'https://insights.hotjar.com/site/list';
39
- $link = sprintf( wp_kses( __( 'Visit your <a href="%s" target="_blank">Hotjar site list</a> to find your unique Hotjar ID.', 'hotjar'), array( 'a' => array( 'href' => array(), 'target' => '_blank' ) ) ), esc_url( $url ) );
40
- echo $link;
41
- ?></p>
42
- <p><?php _e('Input your Hotjar ID into the field below to connect your Hotjar and WordPress accounts.', 'hotjar'); ?></p>
43
-
44
- <table class="form-table">
45
- <tbody>
46
- <tr>
47
- <th scope="row">
48
- <label for="hotjar_site_id"><?php esc_html_e( 'Hotjar ID', 'hotjar'); ?></label>
49
- </th>
50
-
51
- <td>
52
- <input type="number" name="hotjar_site_id" id="hotjar_site_id" value="<?php echo esc_attr( get_option('hotjar_site_id') ); ?>" />
53
- <p class="description" id="wp_hotjar_site_id_description"><?php esc_html_e( '(Leave blank to disable)', 'hotjar' ); ?></p>
54
- </td>
55
- </tr>
56
- </tbody>
57
-
58
- </table>
59
- </div>
60
-
61
- <?php submit_button(); ?>
62
-
63
- </form>
64
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/hotjar.php DELETED
@@ -1,114 +0,0 @@
1
- <?php
2
- /**
3
- * Plugin Name: Hotjar
4
- * Description: The fast & visual way to understand your users.
5
- * Author: Hotjar
6
- * Author URI: https://www.hotjar.com/
7
- * Version: 1.0.12
8
- * License: GPLv3
9
- * License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
10
- * Text Domain: hotjar
11
- *
12
- */
13
-
14
- if ( ! defined( 'ABSPATH' ) ) {
15
- exit;
16
- }
17
-
18
-
19
- add_action( 'plugins_loaded', 'hotjar_plugin_init' );
20
-
21
- function hotjar_plugin_init() {
22
-
23
- if ( ! class_exists( 'WP_Hotjar' ) ) :
24
-
25
- class WP_Hotjar {
26
- /**
27
- * @var Const Plugin Version Number
28
- */
29
- const VERSION = '1.0.12';
30
-
31
- /**
32
- * @var Singleton The reference the *Singleton* instance of this class
33
- */
34
- private static $instance;
35
-
36
- /**
37
- * Returns the *Singleton* instance of this class.
38
- *
39
- * @return Singleton The *Singleton* instance.
40
- */
41
- public static function get_instance() {
42
- if ( null === self::$instance ) {
43
- self::$instance = new self();
44
- }
45
- return self::$instance;
46
- }
47
-
48
- private function __clone() {}
49
-
50
- private function __wakeup() {}
51
-
52
- /**
53
- * Protected constructor to prevent creating a new instance of the
54
- * *Singleton* via the `new` operator from outside of this class.
55
- */
56
- private function __construct() {
57
- add_action( 'admin_init', array( $this, 'install' ) );
58
- $this->init();
59
- }
60
-
61
- /**
62
- * Init the plugin after plugins_loaded so environment variables are set.
63
- *
64
- * @since 1.0.0
65
- */
66
- public function init() {
67
- require_once( dirname( __FILE__ ) . '/includes/class-hotjar.php' );
68
- $hotjar = new Hotjar();
69
- $hotjar->init();
70
- }
71
-
72
- /**
73
- * Updates the plugin version in db
74
- *
75
- * @since 1.0.0
76
- */
77
- public function update_plugin_version() {
78
- delete_option( 'hotjar_version' );
79
- update_option( 'hotjar_version', self::VERSION );
80
- }
81
-
82
- /**
83
- * Handles upgrade routines.
84
- *
85
- * @since 1.0.0
86
- */
87
- public function install() {
88
- if ( ! is_plugin_active( plugin_basename( __FILE__ ) ) ) {
89
- return;
90
- }
91
-
92
- if ( ( self::VERSION !== get_option( 'hotjar_version' ) ) ) {
93
-
94
- $this->update_plugin_version();
95
- }
96
- }
97
-
98
- /**
99
- * Adds plugin action links.
100
- *
101
- * @since 1.0.0
102
- */
103
- public function plugin_action_links( $links ) {
104
- $plugin_links = array(
105
- '<a href="admin.php?page=hotjar-settings">Settings</a>',
106
- '<a href="https://www.hotjar.com/">Support</a>',
107
- );
108
- return array_merge( $plugin_links, $links );
109
- }
110
- }
111
-
112
- WP_Hotjar::get_instance();
113
- endif;
114
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/includes/class-hotjar.php DELETED
@@ -1,83 +0,0 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) {
3
- exit;
4
- }
5
-
6
- class Hotjar {
7
-
8
- public function __construct()
9
- {
10
-
11
- }
12
-
13
- public function init()
14
- {
15
- $this->init_admin();
16
- $this->enqueue_script();
17
- $this->enqueue_admin_styles();
18
- }
19
-
20
- public function init_admin() {
21
- register_setting( 'hotjar', 'hotjar_site_id' );
22
- add_action( 'admin_menu', array( $this, 'create_nav_page' ) );
23
- }
24
-
25
- public function create_nav_page() {
26
- add_options_page(
27
- esc_html__( 'Hotjar', 'hotjar' ),
28
- esc_html__( 'Hotjar', 'hotjar' ),
29
- 'manage_options',
30
- 'hotjar_settings',
31
- array($this,'admin_view')
32
- );
33
- }
34
-
35
- public static function admin_view()
36
- {
37
- require_once plugin_dir_path( __FILE__ ) . '/../admin/views/settings.php';
38
- }
39
-
40
- public static function hotjar_script()
41
- {
42
- $hotjar_site_id = get_option( 'hotjar_site_id' );
43
- $is_admin = is_admin();
44
-
45
- $hotjar_site_id = trim($hotjar_site_id);
46
- if (!$hotjar_site_id) {
47
- return;
48
- }
49
-
50
- if ( $is_admin ) {
51
- return;
52
- }
53
-
54
- echo "
55
- <script>
56
- (function(h,o,t,j,a,r){
57
- h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
58
- h._hjSettings={hjid:" . $hotjar_site_id . ",hjsv:5};
59
- a=o.getElementsByTagName('head')[0];
60
- r=o.createElement('script');r.async=1;
61
- r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
62
- a.appendChild(r);
63
- })(window,document,'//static.hotjar.com/c/hotjar-','.js?sv=');
64
- </script>
65
- ";
66
- }
67
-
68
- private function enqueue_script() {
69
- add_action( 'wp_head', array($this, 'hotjar_script') );
70
- }
71
-
72
- private function enqueue_admin_styles() {
73
- add_action( 'admin_enqueue_scripts', array($this, 'hotjar_admin_styles' ) );
74
- }
75
-
76
- public static function hotjar_admin_styles() {
77
- wp_register_style( 'hotjar_custom_admin_style', plugins_url( '../admin/static/hotjar-admin.css', __FILE__ ), array(), '20190701', 'all' );
78
- wp_enqueue_style( 'hotjar_custom_admin_style' );
79
- }
80
-
81
- }
82
-
83
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/readme.txt DELETED
@@ -1,116 +0,0 @@
1
- === Hotjar ===
2
- Contributors: hotjar
3
- Tags: hotjar,insights,visual,heatmaps,recordings,funnels,analytics
4
- Requires at least: 4.6
5
- Tested up to: 5.8.1
6
- Stable tag: 1.0.12
7
- License: GPLv3
8
- License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
9
-
10
- The fast & visual way to understand your users.
11
-
12
- == Description ==
13
-
14
- Hotjar is the fast & visual way to understand your users, providing everything your team needs to uncover insights and make the right changes to your site. Connect all the dots with one powerful solution providing:
15
-
16
- * **Heatmaps** - Understand what users want, care about and do on your site by visually representing their clicks, taps and scrolling behavior – which are the strongest indicators of visitor motivation and desire.
17
- * **Visitor Recordings** - Eliminate guesswork with Recordings of real visitor behavior on your site. By seeing your visitor’s clicks, taps and mouse movements you can identify usability issues on the fly and issues they encounter.
18
- * **Conversion Funnels** - Find the biggest opportunities for improvement and testing by identifying on which page and at which step most visitors are leaving your site.
19
- * **Form Analysis** - Improve online form completion rates by discovering which fields take too long to fill, which are left blank, and why your visitors abandon your form and page.
20
- * **Feedback Polls** - Improving the performance and experience of your website starts with understanding what your visitors want and what's preventing them from achieving it. Target questions to specific visitors anywhere on your web and mobile site.
21
- * **Incoming Feedback** - Give your visitors an easy way to leave instant visual feedback on your website or app. See what people love and hate, identify issues, and find opportunities for growth.
22
- * **Surveys** - Build your own responsive surveys using an easy editor. Collect responses in real-time from any device. Distribute your surveys using web links, emails or invite your visitors just before they abandon your site to uncover their objections or concerns.
23
- * **Recruit Test Users** - Recruit the best possible participants for user research and testing directly from your site. Collect profiling information, contact details and offer a gift in exchange for their help.
24
-
25
- This plugin provides a simple installation of Hotjar on your WordPress site, giving you immediate access to all Hotjar features.
26
-
27
- == Installation ==
28
-
29
- = Simple installation =
30
-
31
- <iframe width="560" height="315" src="https://www.youtube.com/embed/A0-xOfbX6eM" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
32
-
33
- The Hotjar plugin is available to install via the WordPress plugin library and you can install it directly from within your WordPress dashboard. For a step-by-step installation guide, check out [our handy help doc](https://help.hotjar.com/hc/en-us/articles/115009340247-WordPress).
34
-
35
- = Manual installation =
36
-
37
- Alternatively, you can install manually:
38
-
39
- 1. Download the Hotjar plugin as a zip file.
40
- 2. Upload the folder `hotjar` to the `/wp-content/plugins/` directory
41
- 3. Activate the plugin through the 'Plugins' menu in WordPress
42
-
43
- = Configuration =
44
-
45
- After installation, [configure the plugin](https://youtu.be/A0-xOfbX6eM?t=25) by visiting Settings -> Hotjar and entering your unique Hotjar Site ID. You can find your Site ID from [the Sites & Organisations list](https://insights.hotjar.com/site/list) in Insights.
46
-
47
- == Frequently Asked Questions ==
48
-
49
- = Do I need a Hotjar account to use this plugin? =
50
-
51
- Yes. You can [sign up for a free Hotjar account](https://insights.hotjar.com/register) which provides access to all our features including heatmaps, recordings and feedback tools.
52
-
53
- = I've set up Hotjar, what now? =
54
-
55
- You can enable, disable and enable all the Hotjar features from within the [Insights app](https://insights.hotjar.com). Any changes will be reflected immediately on the site(s) where you have the Hotjar script installed.
56
-
57
- For more information on getting started with Hotjar [visit our help center](https://help.hotjar.com/hc/en-us).
58
-
59
- = Where can I find out more about Hotjar? =
60
-
61
- [Visit our website](https://www.hotjar.com/) to learn more about Hotjar and how you can use it to start gaining insights into how users use your site.
62
-
63
- = What are the Hotjar Terms of Service? =
64
-
65
- The full [terms of service are available here](https://www.hotjar.com/legal/policies/terms-of-service) together with other legal and privacy documentation. If you have further questions do not hesitate to reach out to our support.
66
-
67
- = Is Hotjar GDPR compliant? =
68
-
69
- We’ve built Hotjar with a [privacy by design](https://www.hotjar.com/privacy/gdpr-compliance) approach and have developed a number of [compliance controls](https://www.hotjar.com/legal/compliance/gdpr-commitment) for our customers to be able to use Hotjar in a GDPR compliant manner.
70
-
71
- = Can my users opt-out? =
72
-
73
- Yes. Hotjar respects the Do Not Track header and users can also opt-out on a per-browser basis by visiting [Hotjar opt out](https://www.hotjar.com/legal/compliance/opt-out).
74
-
75
- = How do I remove Hotjar from my site? =
76
-
77
- You can uninstall this plugin at any time to remove Hotjar from your site. Data which has been collected can be removed through the Insights interface, or by deleting your site or account. For more information see our [data retention documentation.](https://help.hotjar.com/hc/en-us/articles/115011640427-Data-Retention).
78
-
79
- == Screenshots ==
80
-
81
- 1. The settings interface. Add your unique Hotjar Site ID to the empty field, and Save Changes to install the Hotjar script for that site.
82
- 2. After saving you will see this success message. Click the link to verify your installation was successful.
83
- 3. Success! If you see this message Hotjar is installed on your site. Visit [Insights](https://insights.hotjar.com) to configure the Hotjar tools on your site.
84
-
85
- == Changelog ==
86
-
87
- = 1.0.12 =
88
- * Updated assets and tested on WP 5.8.1
89
-
90
- = 1.0.11 =
91
- * Tested on WP 5.8.
92
-
93
- = 1.0.10 =
94
- * Tested on WP 5.7.2.
95
-
96
- = 1.0.9 =
97
- * Tested on WP 5.6.
98
-
99
- = 1.0.8 =
100
- * Tested on WP 5.5.
101
-
102
- = 1.0.7 =
103
- * Update description.
104
-
105
- = 1.0.6 =
106
- * Update changelog as well.
107
-
108
- = 1.0.5 =
109
- * Fix borked readme in the 1.0.4 tag.
110
-
111
- = 1.0.4 =
112
- * Tested up to bumped to 5.3.2
113
-
114
- = 1.0 =
115
- * Initial release.
116
-