Version Description
Download this release
Release Info
Developer | Hasinur Rahman |
Plugin | WooCommerce Conversion Tracking |
Version | 2.0.3 |
Comparing to | |
See all releases |
Code changes from version 2.0.2 to 2.0.3
- assets/css/style.css +53 -0
- assets/images/happy-addons.png +0 -0
- assets/js/admin.js +33 -1
- assets/js/admin.min.js +1 -1
- conversion-tracking.php +42 -2
- includes/class-ajax.php +62 -0
- includes/integrations/class-integration-facebook.php +80 -9
- languages/woocommerce-conversion-tracking.pot +21 -7
- readme.txt +6 -3
assets/css/style.css
CHANGED
@@ -326,3 +326,56 @@ PLEASE DO NOT MODIFY*/
|
|
326 |
visibility: visible;
|
327 |
opacity: 1;
|
328 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
326 |
visibility: visible;
|
327 |
opacity: 1;
|
328 |
}
|
329 |
+
.wcct-notice-wrap {
|
330 |
+
overflow: hidden;
|
331 |
+
padding: 22px 15px;
|
332 |
+
}
|
333 |
+
.wcct-message-icon {
|
334 |
+
width: 10%;
|
335 |
+
float: left;
|
336 |
+
}
|
337 |
+
.wcct-message-icon img {
|
338 |
+
height: 50px;
|
339 |
+
}
|
340 |
+
.wcct-message-content {
|
341 |
+
width: 70%;
|
342 |
+
float: left;
|
343 |
+
margin-top: 20px;
|
344 |
+
}
|
345 |
+
.wcct-message-content p {
|
346 |
+
font-size: 16px;
|
347 |
+
padding: 0;
|
348 |
+
margin: 0;
|
349 |
+
}
|
350 |
+
.wcct-message-action {
|
351 |
+
width: 16.5%;
|
352 |
+
float: right;
|
353 |
+
text-align: center;
|
354 |
+
margin-right: 1.2%;
|
355 |
+
}
|
356 |
+
#wcct_remote_notice {
|
357 |
+
display: none;
|
358 |
+
}
|
359 |
+
#wcct-install-happ-addons {
|
360 |
+
background: #5c41d2 !important;
|
361 |
+
border-color: #5c41d2 !important;
|
362 |
+
box-shadow: 0 1px 0 #5c41d2;
|
363 |
+
color: #fff;
|
364 |
+
text-decoration: none;
|
365 |
+
text-shadow: 0 -1px 1px #5c41d2, 1px 0 1px #5c41d2, 0 1px 1px #5c41d2, -1px 0 1px #5c41d2;
|
366 |
+
height: inherit;
|
367 |
+
padding: 4px 20px;
|
368 |
+
display: flex;
|
369 |
+
align-items: center;
|
370 |
+
}
|
371 |
+
#wcct-install-happ-addons i {
|
372 |
+
margin-right: 7px;
|
373 |
+
}
|
374 |
+
#wcct-install-happ-addons:hover {
|
375 |
+
background: #150654 !important;
|
376 |
+
border-color: #150654 !important;
|
377 |
+
box-shadow: 0 1px 0 #150654;
|
378 |
+
color: #fff;
|
379 |
+
text-decoration: none;
|
380 |
+
text-shadow: 0 -1px 1px #150654, 1px 0 1px #150654, 0 1px 1px #150654, -1px 0 1px #150654;
|
381 |
+
}
|
assets/images/happy-addons.png
ADDED
Binary file
|
assets/js/admin.js
CHANGED
@@ -88,4 +88,36 @@
|
|
88 |
$( tooltipText ).text( newText );
|
89 |
} );
|
90 |
|
91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
$( tooltipText ).text( newText );
|
89 |
} );
|
90 |
|
91 |
+
// Install and activate happy addons
|
92 |
+
$( '#wcct-install-happ-addons' ).on( 'click', function( e ) {
|
93 |
+
e.preventDefault();
|
94 |
+
var loader = $( '#wcct-preloader' );
|
95 |
+
$('.wcct-update-icon').remove();
|
96 |
+
$(this).text('Installing...');
|
97 |
+
$(this).addClass( 'updating-message' );
|
98 |
+
loader.show();
|
99 |
+
var remote_message = $( '#wcct_remote_notice' );
|
100 |
+
wp.ajax.send( 'activate_happy_addons', {
|
101 |
+
success: function( response ) {
|
102 |
+
$('.wcct-notice-wrap').hide();
|
103 |
+
loader.hide();
|
104 |
+
remote_message.show();
|
105 |
+
remote_message.html('<p><strong>' + response.message + 'Happy Addons !</strong></p>');
|
106 |
+
},
|
107 |
+
error: function( error ) {
|
108 |
+
loader.hide();
|
109 |
+
remote_message.html('<p><strong>' + response.message + '</strong></p>');
|
110 |
+
}
|
111 |
+
} );
|
112 |
+
} );
|
113 |
+
|
114 |
+
// Dismiss notice
|
115 |
+
$('.wcct-notice-wrap').on( 'click', function() {
|
116 |
+
wp.ajax.send( 'wcct_dismissable_notice', {
|
117 |
+
success: function( response ) {
|
118 |
+
console.log( 'Success' );
|
119 |
+
}
|
120 |
+
} );
|
121 |
+
} );
|
122 |
+
|
123 |
+
})( jQuery );
|
assets/js/admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(a){a("#wcct-submit").on("click",function(b){return b.preventDefault(),a("#wcct-submit").addClass("updating-message"),wp.ajax.send("wcct_save_settings",{data:a("#integration-form").serialize(),success:function(b){a("#ajax-message").html("<p><strong>"+b.message+"</strong></p>").show().delay(3e3).slideUp("fast"),a("html, body").animate({scrollTop:0},"fast"),a("#wcct-submit").removeClass("updating-message")},error:function(a){alert("something wrong happend")}}),!1}),a(".slider").on("click",function(){var b=a(this).attr("data-id");a("#setting-"+b).stop().toggle("fast")}),a(".toogle-seller:checked").each(function(b,c){var d=a(c).attr("data-id"),e=a("#setting-"+d);a(e).css("display","block")}),a(".event").on("change",function(){var b=a(this).next(".event-label-box");b.addClass("event-label-space"),b.stop().toggle()}),a(".event:checked").each(function(b,c){a(c).next(".event-label-box").addClass("event-label-space"),a(c).next(".event-label-box").css("display","block")}),a(".disabled-class").on("click",function(){var b=a(this).text();swal({title:b+" is available in Pro version",text:"Please upgrade to the Pro version to get all the awesome feature",buttons:{confirm:"Get the Pro Version",cancel:"Close"}}).then(function(a){a&&window.open("https://wedevs.com/woocommerce-conversion-tracking/upgrade-to-pro/?utm_source=wp-admin&utm_medium=pro-upgrade&utm_campaign=wcct_upgrade&utm_content=Pro_Alert","_blank")},function(){})}),a(".toogle-seller").on("change",function(){var b=a(this).parents(".switch").find(".integration-tooltip"),c=a(b).text().trim(),d="";"Activate"==c?d="Deactivate":"Deactivate"==c&&(d="Activate"),a(b).text(d)})}(jQuery);
|
1 |
+
!function(a){a("#wcct-submit").on("click",function(b){return b.preventDefault(),a("#wcct-submit").addClass("updating-message"),wp.ajax.send("wcct_save_settings",{data:a("#integration-form").serialize(),success:function(b){a("#ajax-message").html("<p><strong>"+b.message+"</strong></p>").show().delay(3e3).slideUp("fast"),a("html, body").animate({scrollTop:0},"fast"),a("#wcct-submit").removeClass("updating-message")},error:function(a){alert("something wrong happend")}}),!1}),a(".slider").on("click",function(){var b=a(this).attr("data-id");a("#setting-"+b).stop().toggle("fast")}),a(".toogle-seller:checked").each(function(b,c){var d=a(c).attr("data-id"),e=a("#setting-"+d);a(e).css("display","block")}),a(".event").on("change",function(){var b=a(this).next(".event-label-box");b.addClass("event-label-space"),b.stop().toggle()}),a(".event:checked").each(function(b,c){a(c).next(".event-label-box").addClass("event-label-space"),a(c).next(".event-label-box").css("display","block")}),a(".disabled-class").on("click",function(){var b=a(this).text();swal({title:b+" is available in Pro version",text:"Please upgrade to the Pro version to get all the awesome feature",buttons:{confirm:"Get the Pro Version",cancel:"Close"}}).then(function(a){a&&window.open("https://wedevs.com/woocommerce-conversion-tracking/upgrade-to-pro/?utm_source=wp-admin&utm_medium=pro-upgrade&utm_campaign=wcct_upgrade&utm_content=Pro_Alert","_blank")},function(){})}),a(".toogle-seller").on("change",function(){var b=a(this).parents(".switch").find(".integration-tooltip"),c=a(b).text().trim(),d="";"Activate"==c?d="Deactivate":"Deactivate"==c&&(d="Activate"),a(b).text(d)}),a("#wcct-install-happ-addons").on("click",function(b){b.preventDefault();var c=a("#wcct-preloader");a(".wcct-update-icon").remove(),a(this).text("Installing..."),a(this).addClass("updating-message"),c.show();var d=a("#wcct_remote_notice");wp.ajax.send("activate_happy_addons",{success:function(b){a(".wcct-notice-wrap").hide(),c.hide(),d.show(),d.html("<p><strong>"+b.message+"Happy Addons !</strong></p>")},error:function(a){c.hide(),d.html("<p><strong>"+response.message+"</strong></p>")}})})}(jQuery);
|
conversion-tracking.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WooCommerce Conversion Tracking
|
4 |
Plugin URI: https://wedevs.com/products/plugins/woocommerce-conversion-tracking/
|
5 |
Description: Adds various conversion tracking codes to cart, checkout, registration success and product page on WooCommerce
|
6 |
-
Version: 2.0.
|
7 |
Author: Tareq Hasan
|
8 |
Author URI: https://tareq.co/
|
9 |
License: GPL2
|
@@ -54,7 +54,7 @@ class WeDevs_WC_Conversion_Tracking {
|
|
54 |
*
|
55 |
* @var string
|
56 |
*/
|
57 |
-
public $version = '2.0.
|
58 |
|
59 |
/**
|
60 |
* Holds various class instances
|
@@ -181,6 +181,7 @@ class WeDevs_WC_Conversion_Tracking {
|
|
181 |
add_action( 'init', array( $this, 'init_tracker' ) );
|
182 |
add_action( 'admin_notices', array( $this, 'check_woocommerce_exist' ) );
|
183 |
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'plugin_action_links' ) );
|
|
|
184 |
}
|
185 |
|
186 |
/**
|
@@ -286,6 +287,45 @@ class WeDevs_WC_Conversion_Tracking {
|
|
286 |
<?php
|
287 |
}
|
288 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
}
|
290 |
|
291 |
function wcct_init() {
|
3 |
Plugin Name: WooCommerce Conversion Tracking
|
4 |
Plugin URI: https://wedevs.com/products/plugins/woocommerce-conversion-tracking/
|
5 |
Description: Adds various conversion tracking codes to cart, checkout, registration success and product page on WooCommerce
|
6 |
+
Version: 2.0.3
|
7 |
Author: Tareq Hasan
|
8 |
Author URI: https://tareq.co/
|
9 |
License: GPL2
|
54 |
*
|
55 |
* @var string
|
56 |
*/
|
57 |
+
public $version = '2.0.3';
|
58 |
|
59 |
/**
|
60 |
* Holds various class instances
|
181 |
add_action( 'init', array( $this, 'init_tracker' ) );
|
182 |
add_action( 'admin_notices', array( $this, 'check_woocommerce_exist' ) );
|
183 |
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'plugin_action_links' ) );
|
184 |
+
add_action( 'admin_notices', array( $this, 'happy_addons_ads_banner' ) );
|
185 |
}
|
186 |
|
187 |
/**
|
287 |
<?php
|
288 |
}
|
289 |
}
|
290 |
+
|
291 |
+
/**
|
292 |
+
* Add happy addons ads banner
|
293 |
+
*
|
294 |
+
* @return void
|
295 |
+
*/
|
296 |
+
public function happy_addons_ads_banner() {
|
297 |
+
if ( ! class_exists( '\Elementor\Plugin' ) ) {
|
298 |
+
return;
|
299 |
+
}
|
300 |
+
|
301 |
+
if ( class_exists( '\Happy_Addons\Elementor\Base' ) ) {
|
302 |
+
return;
|
303 |
+
}
|
304 |
+
$dismissable = get_option( 'wcct_dismissable_notice', true );
|
305 |
+
|
306 |
+
if ( $dismissable == 'closed' ) {
|
307 |
+
return;
|
308 |
+
}
|
309 |
+
|
310 |
+
?>
|
311 |
+
<div id="wcct_remote_notice" class="notice notice-success">
|
312 |
+
</div>
|
313 |
+
<div class="notice is-dismissible wcct-notice-wrap">
|
314 |
+
<div class="wcct-message-icon">
|
315 |
+
<img src="<?php echo WCCT_ASSETS . '/images/happy-addons.png'?>" alt="">
|
316 |
+
</div>
|
317 |
+
<div class="wcct-message-content">
|
318 |
+
<p><?php _e( 'Reach beyond your imagination in creating web pages. <strong> Try Happy Addons for Elementor to shape your dream.</strong> 😊') ?></p>
|
319 |
+
</div>
|
320 |
+
<div class="wcct-message-action">
|
321 |
+
<a href="" id="wcct-install-happ-addons" class="button button-primary"> <i class="dashicons dashicons-update wcct-update-icon"></i> Install Now For FREE</a>
|
322 |
+
<p></strong><a target="_blank" href="https://wordpress.org/plugins/happy-elementor-addons/">Read more details ➔</a>
|
323 |
+
</p>
|
324 |
+
</div>
|
325 |
+
</div>
|
326 |
+
|
327 |
+
<?php
|
328 |
+
}
|
329 |
}
|
330 |
|
331 |
function wcct_init() {
|
includes/class-ajax.php
CHANGED
@@ -10,6 +10,8 @@ class WCCT_Ajax {
|
|
10 |
*/
|
11 |
public function __construct() {
|
12 |
add_action( 'wp_ajax_wcct_save_settings', array( $this, 'wcct_save_settings' ) );
|
|
|
|
|
13 |
}
|
14 |
|
15 |
/**
|
@@ -42,4 +44,64 @@ class WCCT_Ajax {
|
|
42 |
) );
|
43 |
|
44 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
}
|
10 |
*/
|
11 |
public function __construct() {
|
12 |
add_action( 'wp_ajax_wcct_save_settings', array( $this, 'wcct_save_settings' ) );
|
13 |
+
add_action( 'wp_ajax_activate_happy_addons', array( $this, 'wcct_install_happy_addons' ) );
|
14 |
+
add_action( 'wp_ajax_wcct_dismissable_notice', array( $this, 'wcct_dismissable_notice' ) );
|
15 |
}
|
16 |
|
17 |
/**
|
44 |
) );
|
45 |
|
46 |
}
|
47 |
+
/**
|
48 |
+
* Install the Happy addons via ajax
|
49 |
+
*
|
50 |
+
* @return json
|
51 |
+
*/
|
52 |
+
public function wcct_install_happy_addons() {
|
53 |
+
|
54 |
+
include_once ABSPATH . 'wp-admin/includes/plugin-install.php';
|
55 |
+
include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
56 |
+
|
57 |
+
$upgrader = new Plugin_Upgrader( new WP_Ajax_Upgrader_Skin() );
|
58 |
+
|
59 |
+
$plugin = 'happy-elementor-addons';
|
60 |
+
$api = plugins_api( 'plugin_information', array( 'slug' => $plugin, 'fields' => array( 'sections' => false ) ) );
|
61 |
+
|
62 |
+
|
63 |
+
if (is_wp_error($api)) {
|
64 |
+
die(sprintf(__('ERROR: Error fetching plugin information: %s', 'woocommerce-conversion-tracking'), $api->get_error_message()));
|
65 |
+
}
|
66 |
+
|
67 |
+
add_filter( 'upgrader_package_options', function ( $options ) {
|
68 |
+
$options['clear_destination'] = true;
|
69 |
+
$options['hook_extra'] = [
|
70 |
+
'type' => 'plugin',
|
71 |
+
'action' => 'install',
|
72 |
+
'plugin' => 'happy-elementor-addons/plugin.php',
|
73 |
+
];
|
74 |
+
return $options;
|
75 |
+
});
|
76 |
+
|
77 |
+
$result = $upgrader->install( $api->download_link );
|
78 |
+
|
79 |
+
if ( is_wp_error( $result ) ) {
|
80 |
+
wp_send_json_error( $result );
|
81 |
+
}
|
82 |
+
|
83 |
+
$result = activate_plugin( 'happy-elementor-addons/plugin.php' );
|
84 |
+
|
85 |
+
if ( is_wp_error( $result ) ) {
|
86 |
+
wp_send_json_error( $result );
|
87 |
+
}
|
88 |
+
wp_send_json_success([
|
89 |
+
'message' => __( 'Successfully installed and activate,', 'woocommerce-conversion-tracking' )
|
90 |
+
]);
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Dismissable notice
|
95 |
+
*
|
96 |
+
* @return object
|
97 |
+
*/
|
98 |
+
public function wcct_dismissable_notice() {
|
99 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
100 |
+
return;
|
101 |
+
}
|
102 |
+
|
103 |
+
update_option( 'wcct_dismissable_notice', 'closed' );
|
104 |
+
|
105 |
+
wp_send_json_success();
|
106 |
+
}
|
107 |
}
|
includes/integrations/class-integration-facebook.php
CHANGED
@@ -98,13 +98,13 @@ class WCCT_Integration_Facebook extends WCCT_Integration {
|
|
98 |
echo $this->build_event( 'PageView', array() );
|
99 |
?>
|
100 |
</script>
|
101 |
-
|
102 |
-
<noscript><img height="1" width="1" style="display:none"
|
103 |
-
src="https://www.facebook.com/tr?id=<?php echo $facebook_pixel_id; ?>&ev=PageView&noscript=1"
|
104 |
-
/></noscript>
|
105 |
<?php
|
106 |
|
107 |
-
$this->
|
|
|
|
|
|
|
|
|
108 |
}
|
109 |
|
110 |
/**
|
@@ -139,13 +139,17 @@ class WCCT_Integration_Facebook extends WCCT_Integration {
|
|
139 |
if ( ! $this->event_enabled( 'AddToCart' ) ) {
|
140 |
return;
|
141 |
}
|
|
|
|
|
|
|
142 |
?>
|
143 |
<script type="text/javascript">
|
144 |
jQuery(function($) {
|
145 |
-
$(document).on('added_to_cart', function (event, fragments,
|
146 |
-
|
147 |
-
|
148 |
-
|
|
|
149 |
});
|
150 |
});
|
151 |
});
|
@@ -247,6 +251,73 @@ class WCCT_Integration_Facebook extends WCCT_Integration {
|
|
247 |
'categories' => $categories
|
248 |
);
|
249 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
}
|
251 |
|
252 |
return new WCCT_Integration_Facebook();
|
98 |
echo $this->build_event( 'PageView', array() );
|
99 |
?>
|
100 |
</script>
|
|
|
|
|
|
|
|
|
101 |
<?php
|
102 |
|
103 |
+
$this->print_event_script();
|
104 |
+
|
105 |
+
if ( ! class_exists( 'WeDevs_WC_Conversion_Tracking_Pro' ) ) {
|
106 |
+
$this->add_to_cart_ajax();
|
107 |
+
}
|
108 |
}
|
109 |
|
110 |
/**
|
139 |
if ( ! $this->event_enabled( 'AddToCart' ) ) {
|
140 |
return;
|
141 |
}
|
142 |
+
|
143 |
+
$integration_settins = $this->get_integration_settings();
|
144 |
+
$facebook_pixel_id = ! empty( $integration_settins[0]['pixel_id'] ) ? $integration_settins[0]['pixel_id'] : '';
|
145 |
?>
|
146 |
<script type="text/javascript">
|
147 |
jQuery(function($) {
|
148 |
+
$(document).on('added_to_cart', function (event, fragments, dhash, button) {
|
149 |
+
wcfbq('<?php echo $facebook_pixel_id ?>', 'AddToCart', {
|
150 |
+
content_ids: [ $(button).data('product_id') ],
|
151 |
+
content_type: 'product',
|
152 |
+
currency: '<?php echo get_woocommerce_currency()?>'
|
153 |
});
|
154 |
});
|
155 |
});
|
251 |
'categories' => $categories
|
252 |
);
|
253 |
}
|
254 |
+
|
255 |
+
public function print_event_script() {
|
256 |
+
?>
|
257 |
+
<script>
|
258 |
+
(function (window, document) {
|
259 |
+
if (window.wcfbq) return;
|
260 |
+
window.wcfbq = (function () {
|
261 |
+
if (arguments.length > 0) {
|
262 |
+
var pixelId, trackType, contentObj;
|
263 |
+
|
264 |
+
if (typeof arguments[0] == 'string') pixelId = arguments[0];
|
265 |
+
if (typeof arguments[1] == 'string') trackType = arguments[1];
|
266 |
+
if (typeof arguments[2] == 'object') contentObj = arguments[2];
|
267 |
+
|
268 |
+
var params = [];
|
269 |
+
if (typeof pixelId === 'string' && pixelId.replace(/\s+/gi, '') != '' &&
|
270 |
+
typeof trackType === 'string' && trackType.replace(/\s+/gi, '')) {
|
271 |
+
params.push('id=' + encodeURIComponent(pixelId));
|
272 |
+
switch (trackType) {
|
273 |
+
case 'PageView':
|
274 |
+
case 'ViewContent':
|
275 |
+
case 'Search':
|
276 |
+
case 'AddToCart':
|
277 |
+
case 'InitiateCheckout':
|
278 |
+
case 'AddPaymentInfo':
|
279 |
+
case 'Lead':
|
280 |
+
case 'CompleteRegistration':
|
281 |
+
case 'Purchase':
|
282 |
+
case 'AddToWishlist':
|
283 |
+
params.push('ev=' + encodeURIComponent(trackType));
|
284 |
+
break;
|
285 |
+
default:
|
286 |
+
return;
|
287 |
+
}
|
288 |
+
|
289 |
+
params.push('dl=' + encodeURIComponent(document.location.href));
|
290 |
+
if (document.referrer) params.push('rl=' + encodeURIComponent(document.referrer));
|
291 |
+
params.push('if=false');
|
292 |
+
params.push('ts=' + new Date().getTime());
|
293 |
+
|
294 |
+
if (typeof contentObj == 'object') {
|
295 |
+
for (var u in contentObj) {
|
296 |
+
if (typeof contentObj[u] == 'object' && contentObj[u] instanceof Array) {
|
297 |
+
if (contentObj[u].length > 0) {
|
298 |
+
for (var y = 0; y < contentObj[u].length; y++) { contentObj[u][y] = (contentObj[u][y] + '').replace(/^\s+|\s+$/gi, '').replace(/\s+/gi, ' ').replace(/,/gi, '§'); }
|
299 |
+
params.push('cd[' + u + ']=' + encodeURIComponent(contentObj[u].join(',').replace(/^/gi, '[\'').replace(/$/gi, '\']').replace(/,/gi, '\',\'').replace(/§/gi, '\,')));
|
300 |
+
}
|
301 |
+
}
|
302 |
+
else if (typeof contentObj[u] == 'string')
|
303 |
+
params.push('cd[' + u + ']=' + encodeURIComponent(contentObj[u]));
|
304 |
+
}
|
305 |
+
}
|
306 |
+
|
307 |
+
params.push('v=' + encodeURIComponent('2.7.19'));
|
308 |
+
|
309 |
+
var imgId = new Date().getTime();
|
310 |
+
var img = document.createElement('img');
|
311 |
+
img.id = 'fb_' + imgId, img.src = 'https://www.facebook.com/tr/?' + params.join('&'), img.width = 1, img.height = 1, img.style = 'display:none;';
|
312 |
+
document.body.appendChild(img);
|
313 |
+
window.setTimeout(function () { var t = document.getElementById('fb_' + imgId); t.parentElement.removeChild(t); }, 1000);
|
314 |
+
}
|
315 |
+
}
|
316 |
+
});
|
317 |
+
})(window, document);
|
318 |
+
</script>
|
319 |
+
<?php
|
320 |
+
}
|
321 |
}
|
322 |
|
323 |
return new WCCT_Integration_Facebook();
|
languages/woocommerce-conversion-tracking.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the GPL2.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WooCommerce Conversion Tracking 2.0.
|
6 |
"Report-Msgid-Bugs-To: https://example.com\n"
|
7 |
-
"POT-Creation-Date: 2019-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -13,24 +13,30 @@ msgstr ""
|
|
13 |
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
|
14 |
"X-Generator: grunt-wp-i18n 0.5.4\n"
|
15 |
|
16 |
-
#: conversion-tracking.php:
|
17 |
msgid "Get PRO"
|
18 |
msgstr ""
|
19 |
|
20 |
-
#: conversion-tracking.php:
|
21 |
msgid "Docs"
|
22 |
msgstr ""
|
23 |
|
24 |
-
#: conversion-tracking.php:
|
25 |
msgid "Settings"
|
26 |
msgstr ""
|
27 |
|
28 |
-
#: conversion-tracking.php:
|
29 |
msgid ""
|
30 |
"<b>Woocommerce conversion tracking</b> requires <a target=\"_blank\" "
|
31 |
"href=\"https://wordpress.org/plugins/woocommerce/\">Woocommerce</a>"
|
32 |
msgstr ""
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
#: includes/class-admin.php:49
|
35 |
msgid "Conversion Tracking"
|
36 |
msgstr ""
|
@@ -39,10 +45,18 @@ msgstr ""
|
|
39 |
msgid "Integrations"
|
40 |
msgstr ""
|
41 |
|
42 |
-
#: includes/class-ajax.php:
|
43 |
msgid "Settings has been saved successfully!"
|
44 |
msgstr ""
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
#: includes/class-integration-pro-features.php:39
|
47 |
msgid "Facebook Product Catalog (Pro)"
|
48 |
msgstr ""
|
2 |
# This file is distributed under the GPL2.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WooCommerce Conversion Tracking 2.0.3\n"
|
6 |
"Report-Msgid-Bugs-To: https://example.com\n"
|
7 |
+
"POT-Creation-Date: 2019-08-05 09:53:06+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
|
14 |
"X-Generator: grunt-wp-i18n 0.5.4\n"
|
15 |
|
16 |
+
#: conversion-tracking.php:268
|
17 |
msgid "Get PRO"
|
18 |
msgstr ""
|
19 |
|
20 |
+
#: conversion-tracking.php:271
|
21 |
msgid "Docs"
|
22 |
msgstr ""
|
23 |
|
24 |
+
#: conversion-tracking.php:272
|
25 |
msgid "Settings"
|
26 |
msgstr ""
|
27 |
|
28 |
+
#: conversion-tracking.php:285
|
29 |
msgid ""
|
30 |
"<b>Woocommerce conversion tracking</b> requires <a target=\"_blank\" "
|
31 |
"href=\"https://wordpress.org/plugins/woocommerce/\">Woocommerce</a>"
|
32 |
msgstr ""
|
33 |
|
34 |
+
#: conversion-tracking.php:313
|
35 |
+
msgid ""
|
36 |
+
"Reach beyond your imagination in creating web pages. <strong> Try Happy "
|
37 |
+
"Addons for Elementor to shape your dream.</strong> 😊"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
#: includes/class-admin.php:49
|
41 |
msgid "Conversion Tracking"
|
42 |
msgstr ""
|
45 |
msgid "Integrations"
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: includes/class-ajax.php:42
|
49 |
msgid "Settings has been saved successfully!"
|
50 |
msgstr ""
|
51 |
|
52 |
+
#: includes/class-ajax.php:63
|
53 |
+
msgid "ERROR: Error fetching plugin information: %s"
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: includes/class-ajax.php:88
|
57 |
+
msgid "Successfully installed and activate,"
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
#: includes/class-integration-pro-features.php:39
|
61 |
msgid "Facebook Product Catalog (Pro)"
|
62 |
msgstr ""
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: tareq1988
|
|
3 |
Tags: ecommerce, e-commerce, commerce, woocommerce, tracking, facebook, google, adwords, tracking-pixel
|
4 |
Donate link: https://tareq.co/donate/
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -88,8 +88,11 @@ We put the JavaScript scripts provided by you in the page and it fires a convers
|
|
88 |
5. Custom Codes
|
89 |
|
90 |
== Changelog ==
|
|
|
|
|
|
|
91 |
|
92 |
-
= Version 2.0.2 (29-April-2019)
|
93 |
|
94 |
* [fix] Missing value of product price
|
95 |
|
3 |
Tags: ecommerce, e-commerce, commerce, woocommerce, tracking, facebook, google, adwords, tracking-pixel
|
4 |
Donate link: https://tareq.co/donate/
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 5.2.2
|
7 |
+
Stable tag: 2.0.3
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
88 |
5. Custom Codes
|
89 |
|
90 |
== Changelog ==
|
91 |
+
= Version 2.0.3 (05-August-2019) =
|
92 |
+
* [fix] AddToCart Event doesn't work for ajax
|
93 |
+
* [new] Add happy addons banner
|
94 |
|
95 |
+
= Version 2.0.2 (29-April-2019) =
|
96 |
|
97 |
* [fix] Missing value of product price
|
98 |
|