Version Description
- 24/11/2022 =
- The new release contains easy-to-implement updates to better adapt our Google Tag Manager capabilities, including the ability to deploy custom GTM features. For a hassle-free deployment of dynamic remarketing and conversion tags, we have also incorporated all pixels (Google ads, Facebook ads, Microsoft ads, Twitter ads, Pinterest ads, Snapchat ads, and Tiktok ads) option in onboarding.
- We have added the how-to guides for pixel implementation.
- Also, now Conversios eCommerce tracking is compatible with "YITH Multi Currency Switcher for WooCommerce" and "YITH Custom Thank You Page for WooCommerce" plugins.
Download this release
Release Info
Developer | ramniktatvic |
Plugin | Enhanced Ecommerce Google Analytics Plugin for WooCommerce |
Version | 5.1.0 |
Comparing to | |
See all releases |
Code changes from version 5.0.6 to 5.1.0
- admin/class-conversios-onboarding.php +792 -500
- admin/class-enhanced-ecommerce-google-analytics-admin.php +0 -98
- admin/class-tvc-admin-helper.php +113 -55
- admin/css/custom-style.css +12 -12
- admin/css/style.css +100 -25
- admin/helper/class-onboarding-helper.php +82 -35
- admin/images/events-hit.png +0 -0
- admin/images/google ads_icon.png +0 -0
- admin/images/google_analytics_icon.png +0 -0
- admin/images/google_shopping_icon.png +0 -0
- admin/images/gtm_logo.png +0 -0
- admin/js/onboarding-custom.js +220 -275
- admin/partials/general-fields.php +75 -37
- admin/partials/pricings.php +1 -1
- enhanced-ecommerce-google-analytics.php +2 -2
- includes/class-enhanced-ecommerce-google-analytics.php +0 -1
- includes/data/class-tvc-ajax-file.php +1 -3
- includes/setup/account.php +1 -1
- includes/setup/add-campaign.php +1 -1
- includes/setup/google-ads.php +1 -1
- includes/setup/google-shopping-feed-gaa-config.php +1 -1
- includes/setup/google-shopping-feed-shopping-campaigns.php +2 -2
- includes/setup/google-shopping-feed-sync-product.php +2 -3
- includes/setup/google-shopping-feed.php +1 -1
- public/class-con-settings.php +13 -2
- public/class-enhanced-ecommerce-google-analytics-public-pro.php +19 -7
- public/class-enhanced-ecommerce-google-analytics-public.php +36 -34
- readme.txt +10 -2
admin/class-conversios-onboarding.php
CHANGED
@@ -15,6 +15,7 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
15 |
protected $tvc_data = array();
|
16 |
protected $last_login;
|
17 |
protected $is_refresh_token_expire;
|
|
|
18 |
public function __construct( ){
|
19 |
if ( ! is_admin() ) {
|
20 |
return;
|
@@ -32,6 +33,8 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
32 |
$this->connect_url = $this->TVC_Admin_Helper->get_connect_url();
|
33 |
$this->tvc_data = $this->TVC_Admin_Helper->get_store_data();
|
34 |
$this->is_refresh_token_expire = $this->TVC_Admin_Helper->is_refresh_token_expire();
|
|
|
|
|
35 |
/**
|
36 |
* check last login for check RefreshToken
|
37 |
*/
|
@@ -101,8 +104,7 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
101 |
$tracking_option = "UA";
|
102 |
$login_customer_id ="";
|
103 |
$completed_last_step ="step-0";
|
104 |
-
$complete_step = array("step-0"=>1,"step-1"=>0,"step-2"=>0
|
105 |
-
|
106 |
if ( isset($_GET['subscription_id']) && sanitize_text_field($_GET['subscription_id'])){
|
107 |
$this->subscriptionId = sanitize_text_field($_GET['subscription_id']);
|
108 |
if ( isset($_GET['g_mail']) && sanitize_email($_GET['g_mail'])){
|
@@ -142,22 +144,15 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
142 |
$complete_step["step-1"] = 1;
|
143 |
}
|
144 |
if($googleDetail->google_ads_id != "" ){
|
145 |
-
$complete_step["step-
|
146 |
}
|
147 |
if($googleDetail->google_merchant_center_id != "" ){
|
148 |
-
$complete_step["step-
|
149 |
}
|
150 |
}
|
151 |
}
|
152 |
}
|
153 |
-
}
|
154 |
-
|
155 |
-
$is_e_e_tracking = (property_exists($googleDetail,"enhanced_e_commerce_tracking") && $googleDetail->enhanced_e_commerce_tracking == 1)?"checked":(($defaulSelection == 1)?"checked":"");
|
156 |
-
$is_u_t_tracking = (property_exists($googleDetail,"user_time_tracking") && $googleDetail->user_time_tracking == 1)?"checked":(($defaulSelection == 1)?"checked":"");
|
157 |
-
$is_a_g_snippet = (property_exists($googleDetail,"add_gtag_snippet") && $googleDetail->add_gtag_snippet == 1)?"checked":(($defaulSelection == 1)?"checked":"");
|
158 |
-
$is_c_i_tracking = (property_exists($googleDetail,"client_id_tracking") && $googleDetail->client_id_tracking == 1)?"checked":(($defaulSelection == 1)?"checked":"");
|
159 |
-
$is_e_tracking = (property_exists($googleDetail,"exception_tracking") && $googleDetail->exception_tracking == 1)?"checked":(($defaulSelection == 1)?"checked":"");
|
160 |
-
$is_e_l_a_tracking = (property_exists($googleDetail,"enhanced_link_attribution_tracking") && $googleDetail->enhanced_link_attribution_tracking == 1)?"checked":(($defaulSelection == 1)?"checked":"");
|
161 |
|
162 |
$countries = json_decode(file_get_contents(ENHANCAD_PLUGIN_DIR . "includes/setup/json/countries.json"));
|
163 |
$credit = json_decode(file_get_contents(ENHANCAD_PLUGIN_DIR . "includes/setup/json/country_reward.json"));
|
@@ -181,6 +176,8 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
181 |
}
|
182 |
}
|
183 |
}
|
|
|
|
|
184 |
?>
|
185 |
<style>
|
186 |
#menu-dashboard li.current{display: none;}
|
@@ -200,7 +197,7 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
200 |
<div class="smallcontainer">
|
201 |
<div class="onbordingtop">
|
202 |
<h2><?php esc_html_e("Let’s get you started.","enhanced-e-commerce-for-woocommerce-store"); ?></h2>
|
203 |
-
<p><?php esc_html_e("Automate
|
204 |
</div>
|
205 |
<div class="row">
|
206 |
<!-- onborading left start -->
|
@@ -217,151 +214,249 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
217 |
</div>
|
218 |
</div>
|
219 |
<div class="stepmoredtlwrp">
|
220 |
-
<div class="stepmoredtl">
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
<img class="google-icon" src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/g-logo.png'); ?>"/>
|
225 |
-
</div>
|
226 |
-
<p class="btn-text"><b><?php esc_html_e("Sign in with google","enhanced-e-commerce-for-woocommerce-store"); ?></b></p>
|
227 |
-
</div>
|
228 |
-
<?php } else{?>
|
229 |
-
|
230 |
-
<?php if($this->is_refresh_token_expire == true){?>
|
231 |
-
<p class="alert alert-primary"><?php esc_html_e("It seems the token to access your Google accounts is expired. Sign in again to continue.","enhanced-e-commerce-for-woocommerce-store"); ?></p>
|
232 |
-
<div class="google_connect_url google-btn">
|
233 |
-
<div class="google-icon-wrapper">
|
234 |
-
<img class="google-icon" src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/g-logo.png'); ?>"/>
|
235 |
-
</div>
|
236 |
-
<p class="btn-text"><b><?php esc_html_e("Sign in with google","enhanced-e-commerce-for-woocommerce-store"); ?></b></p>
|
237 |
-
</div>
|
238 |
-
<?php } else{ ?>
|
239 |
-
<div class="google_connect_url google-btn">
|
240 |
-
<div class="google-icon-wrapper">
|
241 |
-
<img class="google-icon" src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/g-logo.png'); ?>"/>
|
242 |
-
</div>
|
243 |
-
<p class="btn-text mr-35"><b><?php esc_html_e("Reauthorize","enhanced-e-commerce-for-woocommerce-store"); ?></b></p>
|
244 |
-
</div>
|
245 |
-
<?php } ?>
|
246 |
-
<?php } ?>
|
247 |
-
<p><?php esc_html_e("Make sure you sign in with the google email account that has all privileges to access google analytics, google ads and google merchant center account that you want to configure for your store. We take programmatic access to your accounts to automate the Google analytics tracking and Google Shopping for you so that you do not need any developer or expert to set up the plugin.","enhanced-e-commerce-for-woocommerce-store"); ?></p>
|
248 |
</div>
|
249 |
</div>
|
250 |
</div>
|
251 |
<!-- step-0 over -->
|
252 |
-
<!-- step-1 start -->
|
253 |
-
|
254 |
<div class="onbordording-step onbrdstep-1 gglanystep <?php echo ($complete_step['step-1']==1 && $this->tvc_data['g_mail'] && $this->is_refresh_token_expire == false )?'selectedactivestep':''; ?> <?php if($this->subscriptionId != "" && $this->tvc_data['g_mail'] && $this->is_refresh_token_expire == false){ echo "activestep"; } ?>">
|
255 |
<div class="stepdtltop" data-is-done="<?php echo esc_attr($complete_step['step-1']); ?>" id="google-analytics" data-id="step_1">
|
256 |
<div class="stepleftround">
|
257 |
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/check-wbg.png'); ?>" alt="" />
|
258 |
</div>
|
259 |
<div class="stepdetwrap">
|
260 |
-
<h4><?php esc_html_e("
|
261 |
-
<p><?php esc_html_e("Select your Google Analytics account from the dropdown below and hit “Next”. That’s it..!! Google Analytics eCommerce tracking will be set up automatically. Isn’t it easy peasy??","enhanced-e-commerce-for-woocommerce-store"); ?></p>
|
262 |
</div>
|
263 |
</div>
|
264 |
<div class="stepmoredtlwrp">
|
265 |
<div class="stepmoredtl">
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
342 |
<div class="cstmrdobtn-item">
|
343 |
<label for="both">
|
344 |
<input type="radio" <?php echo esc_attr($this->is_checked($tracking_option, "BOTH")); ?> name="analytic_tag_type" id="both" value="BOTH">
|
345 |
<span class="checkmark"></span>
|
346 |
<?php esc_html_e("Both","enhanced-e-commerce-for-woocommerce-store"); ?>
|
347 |
</label>
|
|
|
348 |
<div id="BOTH" class="slctunivr-filed">
|
349 |
<div class="tvc-multi-dropdown">
|
350 |
-
<div id="both-tvc-ua-acc-edit_box" class="botslectbxitem tvc-edit-accounts <?php if($googleDetail->ua_analytic_account_id){ ?> tvc-disable-edits <?php } ?>" style="margin: 0px 5px 0px 0px;">
|
351 |
<div class="tvc-dropdown">
|
352 |
-
<div class="tvc-dropdown-header" id="both_ua_account_id_option_val" data-profileid="" data-accountid="<?php if($googleDetail->ua_analytic_account_id){ echo esc_attr($googleDetail->ua_analytic_account_id); } ?>"><?php if($googleDetail->ua_analytic_account_id){
|
353 |
echo esc_attr($googleDetail->ua_analytic_account_id);
|
354 |
}else{?><?php esc_html_e("Select UA Account Id","enhanced-e-commerce-for-woocommerce-store"); ?><?php } ?></div>
|
355 |
<div class="tvc-dropdown-content" id="both_ua_account_id_option">
|
356 |
-
<div class="tvc-select-items"><option value=""><?php esc_html_e("Select UA Account Id","enhanced-e-commerce-for-woocommerce-store"); ?></option></div>
|
357 |
<div class="tvc_load_more_acc option"><?php esc_html_e("Load More","enhanced-e-commerce-for-woocommerce-store"); ?></div>
|
358 |
</div>
|
359 |
</div>
|
360 |
</div>
|
361 |
-
<div id="both-tvc-ua-web-edit_box" class="botslectbxitem <?php if($googleDetail->property_id){ ?> tvc-disable-edits <?php } ?>" >
|
362 |
<div class="tvc-dropdown">
|
363 |
-
<div class="tvc-dropdown-header" id="both_ua_web_property_id_option_val" data-profileid="" data-accountid="<?php if($googleDetail->ua_analytic_account_id){ echo esc_attr($googleDetail->ua_analytic_account_id); } ?>" data-val="<?php if($googleDetail->property_id){ echo esc_attr($googleDetail->property_id); } ?>">
|
364 |
-
<?php if($googleDetail->property_id){
|
365 |
echo esc_attr($googleDetail->property_id);
|
366 |
}else{?><?php esc_html_e("Select Property Id","enhanced-e-commerce-for-woocommerce-store"); ?>
|
367 |
<?php } ?> </div>
|
@@ -369,27 +464,26 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
369 |
<div class="tvc-select-items"><option value=""><?php esc_html_e("Select Property Id","enhanced-e-commerce-for-woocommerce-store"); ?></option></div>
|
370 |
</div>
|
371 |
</div>
|
372 |
-
</div>
|
373 |
-
|
374 |
<button id="both-tvc-ua-acc-edit" class="tvc-onboardEdit tvc-edit-acc_fire"><?php esc_html_e("Edit","enhanced-e-commerce-for-woocommerce-store"); ?></button>
|
375 |
</div>
|
376 |
|
377 |
<div class="tvc-multi-dropdown">
|
378 |
-
<div id="both-tvc-ga4-acc-edit_box" class="botslectbxitem tvc-edit-accounts <?php if($googleDetail->ga4_analytic_account_id){ ?> tvc-disable-edits <?php } ?>" style="margin: 0px 5px 0px 0px;">
|
379 |
<div class="tvc-dropdown">
|
380 |
-
<div class="tvc-dropdown-header" id="both_ga4_account_id_option_val" data-profileid=""data-accountid="<?php if($googleDetail->ga4_analytic_account_id){ echo esc_attr($googleDetail->ga4_analytic_account_id); } ?>"><?php if($googleDetail->ga4_analytic_account_id){
|
381 |
echo esc_attr($googleDetail->ga4_analytic_account_id);
|
382 |
}else{?><?php esc_html_e("Select GA4 Account Id","enhanced-e-commerce-for-woocommerce-store"); ?><?php } ?></div>
|
383 |
<div class="tvc-dropdown-content" id="both_ga4_account_id_option">
|
384 |
-
<div class="tvc-select-items"><option value=""><?php esc_html_e("Select GA4 Account Id","enhanced-e-commerce-for-woocommerce-store"); ?></option></div>
|
385 |
<div class="tvc_load_more_acc option"><?php esc_html_e("Load More","enhanced-e-commerce-for-woocommerce-store"); ?></div>
|
386 |
</div>
|
387 |
</div>
|
388 |
</div>
|
389 |
-
<div id="both-tvc-ga4-web-edit_box" class="botslectbxitem <?php if($googleDetail->measurement_id){ ?> tvc-disable-edits <?php } ?>">
|
390 |
<div class="tvc-dropdown">
|
391 |
-
<div class="tvc-dropdown-header" id="both_ga4_web_measurement_id_option_val" data-profileid="" data-name="" data-accountid="<?php if($googleDetail->ga4_analytic_account_id){ echo esc_attr($googleDetail->ga4_analytic_account_id); } ?>" data-val="<?php if($googleDetail->measurement_id){ echo esc_attr($googleDetail->measurement_id); } ?>">
|
392 |
-
<?php if($googleDetail->measurement_id){
|
393 |
echo esc_attr($googleDetail->measurement_id);
|
394 |
}else{?><?php esc_html_e("Select Measurement Id","enhanced-e-commerce-for-woocommerce-store"); ?>
|
395 |
<?php } ?> </div>
|
@@ -401,179 +495,353 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
401 |
<button id="both-tvc-ga4-acc-edit" class="tvc-onboardEdit tvc-edit-acc_fire"><?php esc_html_e("Edit","enhanced-e-commerce-for-woocommerce-store"); ?></button>
|
402 |
</div>
|
403 |
|
404 |
-
<div id="old_tracking" data-tracking_option="<?php echo esc_attr($tracking_option); ?>" data-measurement_id="<?php echo esc_attr($googleDetail->measurement_id); ?>" data-property_id="<?php echo esc_attr($googleDetail->property_id); ?>"></div>
|
405 |
</div>
|
406 |
</div>
|
407 |
-
|
408 |
-
|
409 |
-
|
|
|
|
|
410 |
<div class="chckbxbgbx">
|
411 |
<div class="cstmcheck-item">
|
412 |
<label for="enhanced_e_commerce_tracking">
|
413 |
-
<input type="checkbox" class="custom-control-input" name="enhanced_e_commerce_tracking" id="enhanced_e_commerce_tracking"
|
414 |
-
<span class="checkmark"></span>
|
415 |
-
<?php esc_html_e("Enhaced e-commerce tracking","enhanced-e-commerce-for-woocommerce-store"); ?>
|
416 |
</label>
|
417 |
</div>
|
418 |
<div class="cstmcheck-item">
|
419 |
<label for="add_gtag_snippet">
|
420 |
-
<input type="checkbox" class="custom-control-input" name="add_gtag_snippe" id="add_gtag_snippet"
|
421 |
-
<span class="checkmark"></span>
|
422 |
-
<?php esc_html_e("Add gtag.js snippet","enhanced-e-commerce-for-woocommerce-store"); ?>
|
423 |
</label>
|
424 |
</div>
|
425 |
</div>
|
426 |
-
</div>
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
433 |
</div>
|
434 |
</div>
|
435 |
-
</div>
|
436 |
-
</div>
|
437 |
-
</div>
|
438 |
-
|
439 |
<!-- step-1 over -->
|
440 |
<!-- step-2 start -->
|
441 |
-
<div class="onbordording-step onbrdstep-2
|
442 |
-
<div class="stepdtltop" data-is-done="<?php echo esc_attr($complete_step['step-2']); ?>" id="
|
443 |
<div class="stepleftround">
|
444 |
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/check-wbg.png'); ?>" alt="" />
|
445 |
</div>
|
446 |
<div class="stepdetwrap">
|
447 |
-
|
448 |
-
<p><?php esc_html_e("Select the Google Ads account from the drop down or create a new one. Once you connect Google Ads account, dynamic remarketing, Google Ads conversion and enhanced conversion tags will be activated which will help your reach out to your store visitor based on their browsing behavior and your campaign measurements will be effective. DO NOT MISS THIS if you really want to increase your eCommerce sales.","enhanced-e-commerce-for-woocommerce-store"); ?></p>
|
449 |
</div>
|
450 |
</div>
|
451 |
<div class="stepmoredtlwrp">
|
452 |
<div class="stepmoredtl">
|
453 |
<form action="#">
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
468 |
|
469 |
-
|
470 |
-
<div class="onbrdpp-body alert alert-primary" style="display:none;" id="new_google_ads_section">
|
471 |
-
<h4><?php esc_html_e("Account Created","enhanced-e-commerce-for-woocommerce-store"); ?></h4>
|
472 |
-
<p><?php esc_html_e("Your Google Ads Account has been created","enhanced-e-commerce-for-woocommerce-store"); ?> <strong>(<b><span id="new_google_ads_id"></span></b>).</strong></p>
|
473 |
-
<h5><?php esc_html_e("Steps to claim your Google Ads Account:","enhanced-e-commerce-for-woocommerce-store"); ?></h5>
|
474 |
-
<ol>
|
475 |
-
<li><?php esc_html_e("Accept invitation mail from Google Ads sent to your email address","enhanced-e-commerce-for-woocommerce-store"); ?> <em><?php echo (isset($this->tvc_data['g_mail']))?esc_attr($this->tvc_data['g_mail']):""; ?></em><span id="invitationLink"><br><em>OR</em> Open
|
476 |
-
<a href="" target="_blank" id="ads_invitationLink">Invitation Link</a></span>
|
477 |
-
</li>
|
478 |
-
<li><?php esc_html_e("Log into your Google Ads account and set up your billing preferences","enhanced-e-commerce-for-woocommerce-store"); ?></li>
|
479 |
-
</ol>
|
480 |
-
</div>
|
481 |
-
</div>
|
482 |
-
|
483 |
-
<div class="form-row">
|
484 |
-
<?php
|
485 |
-
$is_r_tags = (property_exists($googleDetail,"remarketing_tags") && $googleDetail->remarketing_tags == 1)?"checked":(($defaulSelection == 1)?"checked":"");
|
486 |
-
$is_l_g_an_w_g_ad = (property_exists($googleDetail,"link_google_analytics_with_google_ads") && $googleDetail->link_google_analytics_with_google_ads == 1)?"checked":(($defaulSelection == 1)?"checked":"");
|
487 |
-
$is_d_r_tags = (property_exists($googleDetail,"dynamic_remarketing_tags") && $googleDetail->dynamic_remarketing_tags == 1)?"checked":(($defaulSelection == 1)?"checked":"");
|
488 |
-
$is_g_ad_c_tracking = (property_exists($googleDetail,"google_ads_conversion_tracking") && $googleDetail->google_ads_conversion_tracking == 1)?"checked":(($defaulSelection == 1)?"checked":"");
|
489 |
-
?>
|
490 |
-
<h5><?php esc_html_e("Advance Settings (Optional)","enhanced-e-commerce-for-woocommerce-store"); ?></h5>
|
491 |
-
<div class="chckbxbgbx dsplcolmview">
|
492 |
-
<div class="cstmcheck-item">
|
493 |
-
<label for="remarketing_tag">
|
494 |
-
<input type="checkbox" class="custom-control-input" name="remarketing_tag" id="remarketing_tag" value="1" <?php echo esc_attr($is_r_tags); ?>>
|
495 |
-
<span class="checkmark"></span>
|
496 |
-
<?php esc_html_e("Enable Google Remarketing Tag","enhanced-e-commerce-for-woocommerce-store"); ?>
|
497 |
-
</label>
|
498 |
-
</div>
|
499 |
-
<div class="cstmcheck-item">
|
500 |
-
<label for="dynamic_remarketing_tags">
|
501 |
-
<input type="checkbox" class="custom-control-input" name="dynamic_remarketing_tags" id="dynamic_remarketing_tags" value="1" <?php echo esc_attr($is_d_r_tags); ?>>
|
502 |
-
<span class="checkmark"></span>
|
503 |
-
<?php esc_html_e("Enable Dynamic Remarketing Tag","enhanced-e-commerce-for-woocommerce-store"); ?>
|
504 |
-
</label>
|
505 |
-
</div>
|
506 |
-
<div class="cstmcheck-item <?php if($this->plan_id == 1){?>cstmcheck-item-pro <?php } ?>">
|
507 |
-
<label for="google_ads_conversion_tracking">
|
508 |
-
<?php if($this->plan_id != 1){?>
|
509 |
-
<input type="checkbox" class="custom-control-input" name="google_ads_conversion_tracking" id="google_ads_conversion_tracking" value="1" <?php echo esc_attr($is_g_ad_c_tracking); ?>>
|
510 |
-
<span class="checkmark"></span>
|
511 |
-
<?php esc_html_e("Google Ads conversion tracking","enhanced-e-commerce-for-woocommerce-store"); ?>
|
512 |
-
<?php }else{?>
|
513 |
-
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/icon/lock.svg'); ?>"><label><?php esc_html_e("Google Ads conversion tracking (Pro Plan)","enhanced-e-commerce-for-woocommerce-store"); ?></label>
|
514 |
-
<?php } ?>
|
515 |
-
</label>
|
516 |
-
</div>
|
517 |
-
<div class="cstmcheck-item">
|
518 |
-
<label for="link_google_analytics_with_google_ads">
|
519 |
-
<input type="checkbox" class="custom-control-input" name="link_google_analytics_with_google_ads" id="link_google_analytics_with_google_ads" value="1" <?php echo esc_attr($is_l_g_an_w_g_ad); ?>>
|
520 |
-
<span class="checkmark"></span>
|
521 |
-
<?php esc_html_e("Link Google Analytics with Google Ads","enhanced-e-commerce-for-woocommerce-store"); ?>
|
522 |
-
</label>
|
523 |
-
</div>
|
524 |
-
</div>
|
525 |
-
</div>
|
526 |
-
<div class="stepsbmtbtn">
|
527 |
-
<button type="button" id="step_2" class="stepnextbtn stpnxttrgr"><?php esc_html_e("Next","enhanced-e-commerce-for-woocommerce-store"); ?></button>
|
528 |
-
<!-- add dslbbtn class for disable button -->
|
529 |
-
</div>
|
530 |
-
</form>
|
531 |
-
</div>
|
532 |
-
</div>
|
533 |
-
</div>
|
534 |
-
<!-- step-2 over -->
|
535 |
-
<!-- step-3 start -->
|
536 |
-
<div class="onbordording-step onbrdstep-3 gglmrchntstep <?php echo ($complete_step['step-3']==1 && $this->is_refresh_token_expire == false )?'selectedactivestep':''; ?>">
|
537 |
-
<div class="stepdtltop" data-is-done="<?php echo esc_attr($complete_step['step-3']); ?>" id="gmc-account" data-id="step_3">
|
538 |
-
<div class="stepleftround">
|
539 |
-
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/check-wbg.png'); ?>" alt="" />
|
540 |
-
</div>
|
541 |
-
<div class="stepdetwrap">
|
542 |
-
<h4><?php esc_html_e("Select Google Merchant Center Account","enhanced-e-commerce-for-woocommerce-store"); ?></h4>
|
543 |
-
<p><?php esc_html_e("Make your WooCommerce shop and products available to millions of shoppers across google.","enhanced-e-commerce-for-woocommerce-store"); ?></p>
|
544 |
-
</div>
|
545 |
-
</div>
|
546 |
-
<div class="stepmoredtlwrp">
|
547 |
-
<div class="stepmoredtl">
|
548 |
-
<form action="#">
|
549 |
-
<div class="selcttopwrap">
|
550 |
-
<div class="form-group" style="display:none;" id="new_merchant_section">
|
551 |
-
<div class="text-center">
|
552 |
-
<div class="alert alert-primary" style="padding: 10px;" role="alert">
|
553 |
-
<label class="form-label-control font-weight-bold"><?php esc_html_e("New Google Merchant Center with account id: ","enhanced-e-commerce-for-woocommerce-store"); ?><span id="new_merchant_id"></span> <?php esc_html_e('is created successfully. Click on "Save" to finish the configuration.',"enhanced-e-commerce-for-woocommerce-store"); ?></label>
|
554 |
-
</div>
|
555 |
-
</div>
|
556 |
-
</div>
|
557 |
-
<div id="tvc_merchant_section">
|
558 |
-
<div class="ggladsselectbx">
|
559 |
-
<select class="slect2bx " id="google_merchant_center_id" name="google_merchant_center_id">
|
560 |
-
<option value=''><?php esc_html_e("Select Google Merchant Center","enhanced-e-commerce-for-woocommerce-store"); ?></option>
|
561 |
-
</select>
|
562 |
-
</div>
|
563 |
-
<?php if($googleDetail->google_merchant_center_id){?>
|
564 |
-
<button id="tvc-gmc-acc-edit" class="tvc-onboardEdit"><?php esc_html_e("Edit","enhanced-e-commerce-for-woocommerce-store"); ?></button><?php } ?>
|
565 |
-
<div class="orwrp"><?php esc_html_e("or","enhanced-e-commerce-for-woocommerce-store"); ?></div>
|
566 |
-
<div class="creatnewwrp">
|
567 |
-
<button type="button" class="cretnewbtn newmrchntbtn"><span class="plusicon"><img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/blue-plus.png'); ?>" alt="" /></span> <?php esc_html_e("Create New","enhanced-e-commerce-for-woocommerce-store"); ?></button>
|
568 |
-
</div>
|
569 |
-
</div>
|
570 |
-
</div>
|
571 |
<div class="stepsbmtbtn">
|
572 |
-
<button type="button" id="step_3" data-enchanter="finish" class="stepnextbtn finishbtn"><?php esc_html_e("Save","enhanced-e-commerce-for-woocommerce-store"); ?></button>
|
573 |
<!-- add dslbbtn class for disable button -->
|
574 |
-
</div>
|
575 |
-
<?php //echo "<pre>";
|
576 |
-
//print_r($googleDetail); echo "</pre>"; ?>
|
577 |
<input type="hidden" id="subscriptionMerchantId" name="subscriptionMerchantId" value="<?php echo property_exists($googleDetail,"merchant_id")?esc_attr($googleDetail->merchant_id):""; ?>">
|
578 |
<input type="hidden" id="subscriptionMerchantCenId" name="subscriptionMerchantCenId" value="<?php echo property_exists($googleDetail,"google_merchant_center_id")?esc_attr($googleDetail->google_merchant_center_id):""; ?>">
|
579 |
<input type="hidden" id="loginCustomerId" name="loginCustomerId" value="<?php echo esc_attr($login_customer_id); ?>">
|
@@ -585,11 +853,12 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
585 |
</form>
|
586 |
</div>
|
587 |
<div class="stepnotewrp">
|
588 |
-
<?php esc_html_e('If you are in the European Economic Area or Switzerland your Merchant Center account must be associated with a Comparison Shopping Service (CSS). Please find more information at Google Merchant Center Help website. If you create a new Merchant Center account through this application, it will be associated with Google Shopping, Google’s CSS, by default. You can change the CSS associated with your account at any time. Please find more information about our CSS Partners
|
|
|
589 |
</div>
|
590 |
</div>
|
591 |
</div>
|
592 |
-
<!-- step-
|
593 |
</div>
|
594 |
<!-- onborading left over -->
|
595 |
<!-- onborading right panel start -->
|
@@ -610,11 +879,11 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
610 |
<li><a target="_blank" href="<?php echo esc_url_raw("https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/"); ?>" href=""><?php esc_html_e("FAQ","enhanced-e-commerce-for-woocommerce-store"); ?></a></li>
|
611 |
</ul>
|
612 |
</div>
|
613 |
-
|
614 |
<ul>
|
615 |
-
<li><?php esc_html_e('
|
616 |
-
<a class="contct-lnk" target="_blank" href="<?php echo esc_url_raw("https://conversios.io/contact-us/?utm_source=app_woo&utm_medium=inapp&utm_campaign=pro_contact"); ?>" href=""><?php esc_html_e("here
|
617 |
-
</a
|
618 |
</li>
|
619 |
</ul>
|
620 |
</div>
|
@@ -628,30 +897,55 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
628 |
</div>
|
629 |
</div>
|
630 |
</div>
|
631 |
-
<!--
|
632 |
-
<div class="pp-modal onbrd-popupwrp" id="
|
633 |
<div class="onbrdppmain" role="document">
|
634 |
<div class="onbrdnpp-cntner acccretppcntnr">
|
635 |
-
<div class="onbrdnpp-hdr">
|
636 |
-
<h4><?php esc_html_e("You have not selected Google Ads account.","enhanced-e-commerce-for-woocommerce-store"); ?></h4>
|
637 |
<div class="ppclsbtn clsbtntrgr"><img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/close-icon.png');?>" alt="" /></div>
|
638 |
</div>
|
639 |
<div class="onbrdpp-body">
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
651 |
</div>
|
652 |
</div>
|
653 |
</div>
|
654 |
-
</div>
|
655 |
<!-- google ads poppup -->
|
656 |
<div id="ggladspopup" class="pp-modal onbrd-popupwrp ggladspp">
|
657 |
<div class="onbrdppmain">
|
@@ -764,68 +1058,31 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
764 |
<div class="onbrdppmain">
|
765 |
<div class="onbrdnpp-cntner congratppcntnr">
|
766 |
<div class="onbrdnpp-hdr txtcnter">
|
767 |
-
<h2><?php esc_html_e("
|
768 |
<div class="ppclsbtn clsbtntrgr"><img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/close-icon.png'); ?>" alt="" /></div>
|
769 |
</div>
|
770 |
<div class="onbrdpp-body congratppbody">
|
771 |
-
<p><?php esc_html_e("
|
772 |
-
<div class="congratppdtlwrp">
|
773 |
-
<div class="cngrtppdtl-item" id="google_analytics_property_id_info">
|
774 |
-
<div class="cngtrpplft">
|
775 |
-
<span class="cngrtchckicon"><img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/green-check.png'); ?>" alt="" /></span>
|
776 |
-
<?php esc_html_e("Google Analytics Property Id:","enhanced-e-commerce-for-woocommerce-store"); ?>
|
777 |
-
</div>
|
778 |
-
<div class="cngtrpprgt" id="selected_google_analytics_property"></div>
|
779 |
-
<div>
|
780 |
-
<?php echo '<p class="ga-text text-right"><a href="' . esc_url_raw($this->url) . '" class="text-underline"><img class="editbtn" src="'.esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/icon/edit_icon.png').'" alt="refresh"/></a></p>';?>
|
781 |
-
</div>
|
782 |
-
</div>
|
783 |
-
<div class="cngrtppdtl-item" id="google_analytics_measurement_id_info">
|
784 |
-
<div class="cngtrpplft">
|
785 |
-
<span class="cngrtchckicon"><img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/green-check.png'); ?>" alt="" /></span>
|
786 |
-
<?php esc_html_e("Google Analytics 4 Measurement Id:","enhanced-e-commerce-for-woocommerce-store"); ?>
|
787 |
-
</div>
|
788 |
-
<div class="cngtrpprgt" id="selected_google_analytics_measurement"></div>
|
789 |
-
<div>
|
790 |
-
<?php echo '<p class="ga-text text-right"><a href="' . esc_url_raw($this->url) . '" class="text-underline"><img class="editbtn" src="'.esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/icon/edit_icon.png').'" alt="refresh"/></a></p>';?>
|
791 |
-
</div>
|
792 |
-
</div>
|
793 |
-
<div class="cngrtppdtl-item" id="google_ads_info">
|
794 |
-
<div class="cngtrpplft">
|
795 |
-
<span class="cngrtchckicon"><img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/green-check.png'); ?>" alt="" /></span>
|
796 |
-
<?php esc_html_e("Google Ads Account:","enhanced-e-commerce-for-woocommerce-store"); ?>
|
797 |
-
</div>
|
798 |
-
<div class="cngtrpprgt" id="selected_google_ads_account"></div>
|
799 |
-
<div>
|
800 |
-
<?php echo '<p class="ga-text text-right"><a href="' . esc_url_raw($this->url) . '" class="text-underline"><img class="editbtn" src="'.esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/icon/edit_icon.png').'" alt="refresh"/></a></p>';?>
|
801 |
-
</div>
|
802 |
-
</div>
|
803 |
-
<div class="cngrtppdtl-item" id="google_merchant_center_info">
|
804 |
-
<div class="cngtrpplft">
|
805 |
-
<span class="cngrtchckicon"><img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/green-check.png'); ?>" alt="" /></span>
|
806 |
-
<?php esc_html_e("Google Merchant Center Account","enhanced-e-commerce-for-woocommerce-store"); ?>
|
807 |
-
</div>
|
808 |
-
<div class="cngtrpprgt" id="selected_google_merchant_center"></div>
|
809 |
-
<div>
|
810 |
-
<?php echo '<p class="ga-text text-right"><a href="' . esc_url_raw($this->url) . '" class="text-underline"><img class="editbtn" src="'.esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/icon/edit_icon.png').'" alt="refresh"/></a></p>';?>
|
811 |
-
</div>
|
812 |
-
</div>
|
813 |
</div>
|
814 |
</div>
|
815 |
<div class="ppfooterbtn">
|
816 |
-
|
817 |
-
<button type="button" id="
|
|
|
|
|
|
|
818 |
</div>
|
819 |
</div>
|
820 |
</div>
|
821 |
</div>
|
822 |
<?php
|
823 |
-
$ua_acc_val=
|
824 |
-
$ga4_acc_val=
|
825 |
-
$propId=
|
826 |
-
$measurementId=
|
827 |
-
$googleAds=
|
828 |
-
$gmc_field=
|
829 |
?>
|
830 |
<input type="hidden" id="ua_acc_val" value="<?php echo esc_attr($ua_acc_val); ?>">
|
831 |
<input type="hidden" id="ga4_acc_val" value="<?php echo esc_attr($ga4_acc_val); ?>">
|
@@ -907,11 +1164,26 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
907 |
|
908 |
//Step-1
|
909 |
jQuery(document).ready(function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
910 |
let tracking_option = jQuery('input[type=radio][name=analytic_tag_type]:checked').val();
|
911 |
if(tracking_option != ""){
|
912 |
jQuery(".slctunivr-filed").slideUp();
|
913 |
jQuery("#"+tracking_option).slideDown();
|
914 |
-
is_validate_step("step_1");
|
915 |
}
|
916 |
let ua_page=2;
|
917 |
jQuery('.tvc_load_more_acc').click(function(event){
|
@@ -940,11 +1212,10 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
940 |
list_analytics_web_properties(type,tvc_data,account_id);
|
941 |
}
|
942 |
});
|
943 |
-
//Step-2
|
944 |
if(subscription_id != "" && googleAds == 1){
|
945 |
list_googl_ads_account(tvc_data);
|
946 |
}
|
947 |
-
|
948 |
/*if(subscription_id != "" && gmc_field == 1 && googleAds == 0){
|
949 |
list_google_merchant_account(tvc_data);
|
950 |
}*/
|
@@ -957,13 +1228,7 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
957 |
e.preventDefault();
|
958 |
create_google_ads_account(tvc_data);
|
959 |
jQuery('.ggladspp').removeClass('showpopup');
|
960 |
-
});
|
961 |
-
// skip google ads account selection
|
962 |
-
jQuery("#ads-skip-continue").on('click', function(e){
|
963 |
-
e.preventDefault();
|
964 |
-
save_google_ads_data("", tvc_data, subscription_id, true );
|
965 |
-
go_next(jQuery("#step_2"));
|
966 |
-
});
|
967 |
//Step - 3
|
968 |
|
969 |
jQuery("#tvc-gmc-acc-edit").on('click', function(e){
|
@@ -977,11 +1242,7 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
977 |
//Click skip merchant center account on popup
|
978 |
jQuery("#merchant-center-skip-continue").on('click', function(e){
|
979 |
e.preventDefault();
|
980 |
-
|
981 |
-
save_merchant_data("", "", tvc_data, subscription_id, plan_id, true );
|
982 |
-
}else{
|
983 |
-
add_message("error","Please select property/measurement id.");
|
984 |
-
}
|
985 |
})
|
986 |
//Click finish button
|
987 |
jQuery("#step_3").on('click', function(e){
|
@@ -995,76 +1256,123 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
995 |
if( google_merchant_center_id == null || google_merchant_center_id == "" ){
|
996 |
jQuery('#tvc_merchant_center_skip_confirm').addClass('showpopup');
|
997 |
jQuery('body').addClass('scrlnone');
|
998 |
-
}else{
|
999 |
-
|
1000 |
-
save_merchant_data(google_merchant_center_id, merchant_id, tvc_data, subscription_id, plan_id, false );
|
1001 |
-
}else{
|
1002 |
-
add_message("error","Please Connect Google Analytics Account.");
|
1003 |
-
}
|
1004 |
}
|
|
|
1005 |
})
|
1006 |
//option listner activity added here
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
let tracking_option = jQuery('input:radio[name=analytic_tag_type]:checked').val();
|
1038 |
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
//console.log(accountid+"="+profileid);
|
1044 |
|
1045 |
-
|
1046 |
-
|
1047 |
-
jQuery("#"+option_id+"_val").attr("data-profileid",profileid);
|
1048 |
-
jQuery("#"+option_id+"_val").attr("data-val",val);
|
1049 |
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1067 |
var tracking_option = jQuery('input[type=radio][name=analytic_tag_type]:checked').val();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1068 |
var view_id = "";
|
1069 |
add_message("warning","Processing... Do not refresh.",false);
|
1070 |
if(tracking_option == "UA"){
|
@@ -1076,65 +1384,38 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
1076 |
type: "POST",
|
1077 |
dataType: "json",
|
1078 |
url: tvc_ajax_url,
|
1079 |
-
data: {action: "update_setup_time_to_subscription", tvc_data:tvc_data, subscription_id:subscription_id, ga_view_id:ga_view_id, conversios_onboarding_nonce:conversios_onboarding_nonce},
|
1080 |
beforeSend: function () {
|
1081 |
loaderSection(true);
|
1082 |
},
|
1083 |
success: function (response) {
|
|
|
1084 |
//console.log(response);
|
1085 |
-
if (response.error === false) {
|
1086 |
-
|
1087 |
-
|
1088 |
-
if(response.return_url){
|
1089 |
-
location.replace( response.return_url);
|
1090 |
-
}else{
|
1091 |
-
location.replace( "admin.php?page=conversios-google-analytics");
|
1092 |
-
}
|
1093 |
//user_tracking_data('complate_onboard', error_msg,'conversios_onboarding','Confirm_to_Finish_the_Onboarding_process');
|
1094 |
}else{
|
1095 |
//user_tracking_data('complate_onboard', response.errors,'conversios_onboarding','Confirm_to_Finish_the_Onboarding_process');
|
1096 |
-
|
1097 |
-
}
|
|
|
1098 |
}
|
1099 |
});
|
1100 |
-
|
1101 |
-
|
1102 |
-
jQuery('#confirm_selection_dash').on('click', function(e){
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
|
|
1109 |
}else{
|
1110 |
-
|
1111 |
-
|
1112 |
-
jQuery.ajax({
|
1113 |
-
type: "POST",
|
1114 |
-
dataType: "json",
|
1115 |
-
url: tvc_ajax_url,
|
1116 |
-
data: {action: "update_setup_time_to_subscription", tvc_data:tvc_data, subscription_id:subscription_id, ga_view_id:ga_view_id, conversios_onboarding_nonce:conversios_onboarding_nonce},
|
1117 |
-
beforeSend: function () {
|
1118 |
-
loaderSection(true);
|
1119 |
-
},
|
1120 |
-
success: function (response) {
|
1121 |
-
//console.log(response);
|
1122 |
-
if (response.error === false) {
|
1123 |
-
//console.log(response.return_url);
|
1124 |
-
if(response.return_url){
|
1125 |
-
location.replace( "admin.php?page=conversios");
|
1126 |
-
}else{
|
1127 |
-
location.replace( "admin.php?page=conversios-google-analytics");
|
1128 |
-
}
|
1129 |
-
//user_tracking_data('complate_onboard', response.errors,'conversios_onboarding','Confirm_to_Finish_the_Onboarding_process');
|
1130 |
-
}else{
|
1131 |
-
loaderSection(false);
|
1132 |
-
//user_tracking_data('complate_onboard', 'null','cnversios_onboarding','Confirm_to_Finish_the_Onboarding_process');
|
1133 |
-
}
|
1134 |
-
}
|
1135 |
-
});
|
1136 |
});
|
1137 |
-
|
1138 |
/**
|
1139 |
* Convesios defoult html script
|
1140 |
*/
|
@@ -1160,40 +1441,34 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
1160 |
jQuery(this).on("click", function(event){
|
1161 |
var step =jQuery(this).attr("id");
|
1162 |
//step 1 next button call
|
1163 |
-
if(step == "step_1"){
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
go_next(this);
|
1168 |
-
list_google_merchant_account(tvc_data);
|
1169 |
-
}
|
1170 |
-
}
|
1171 |
-
//step 2 next button call
|
1172 |
-
if(step == "step_2" ){
|
1173 |
-
//event.preventDefault();
|
1174 |
-
let google_ads_id = jQuery("#new_google_ads_id").text();
|
1175 |
if(google_ads_id ==null || google_ads_id ==""){
|
1176 |
google_ads_id = jQuery('#ads-account').val();
|
1177 |
}
|
1178 |
-
|
1179 |
-
if(
|
1180 |
go_next(this);
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
});
|
1186 |
});
|
1187 |
|
1188 |
});
|
1189 |
jQuery('.slctunivr-filed').slideUp();
|
1190 |
-
|
1191 |
-
|
1192 |
function go_next(next_this){
|
1193 |
jQuery(next_this).closest('.onbordording.-step').find('.stepdtltop').attr("data-is-done","1");
|
1194 |
jQuery(next_this).closest('.onbordording-step').addClass('selectedactivestep');
|
1195 |
jQuery(next_this).closest('.onbordording-step').removeClass('activestep');
|
1196 |
jQuery( next_this ).closest('.onbordording-step').next('.onbordording-step').addClass('activestep');
|
|
|
|
|
|
|
1197 |
}
|
1198 |
</script>
|
1199 |
<script>
|
@@ -1204,7 +1479,8 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
1204 |
<!-- popup script -->
|
1205 |
<script>
|
1206 |
jQuery(document).ready(function() {
|
1207 |
-
|
|
|
1208 |
jQuery(".newggladsbtn").on( "click", function() {
|
1209 |
jQuery('.ggladspp').addClass('showpopup');
|
1210 |
jQuery('body').addClass('scrlnone');
|
@@ -1212,8 +1488,9 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
1212 |
|
1213 |
//close any poup whie click on out side
|
1214 |
jQuery('body').click(function(evt){
|
1215 |
-
if(jQuery(evt.target).closest('#step_2
|
1216 |
-
|
|
|
1217 |
jQuery('.onbrd-popupwrp').removeClass('showpopup');
|
1218 |
jQuery('body').removeClass('scrlnone');
|
1219 |
});
|
@@ -1222,6 +1499,21 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
1222 |
jQuery(this).closest('.onbrd-popupwrp').removeClass('showpopup');
|
1223 |
jQuery('body').removeClass('scrlnone');
|
1224 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1225 |
/*
|
1226 |
jQuery(".sndinvitebtn").on( "click", function() {
|
1227 |
|
15 |
protected $tvc_data = array();
|
16 |
protected $last_login;
|
17 |
protected $is_refresh_token_expire;
|
18 |
+
protected $ee_options = array();
|
19 |
public function __construct( ){
|
20 |
if ( ! is_admin() ) {
|
21 |
return;
|
33 |
$this->connect_url = $this->TVC_Admin_Helper->get_connect_url();
|
34 |
$this->tvc_data = $this->TVC_Admin_Helper->get_store_data();
|
35 |
$this->is_refresh_token_expire = $this->TVC_Admin_Helper->is_refresh_token_expire();
|
36 |
+
//get last onboarded user settings
|
37 |
+
$this->ee_options = $this->TVC_Admin_Helper->get_ee_options_settings();
|
38 |
/**
|
39 |
* check last login for check RefreshToken
|
40 |
*/
|
104 |
$tracking_option = "UA";
|
105 |
$login_customer_id ="";
|
106 |
$completed_last_step ="step-0";
|
107 |
+
$complete_step = array("step-0"=>1,"step-1"=>0,"step-2"=>0);
|
|
|
108 |
if ( isset($_GET['subscription_id']) && sanitize_text_field($_GET['subscription_id'])){
|
109 |
$this->subscriptionId = sanitize_text_field($_GET['subscription_id']);
|
110 |
if ( isset($_GET['g_mail']) && sanitize_email($_GET['g_mail'])){
|
144 |
$complete_step["step-1"] = 1;
|
145 |
}
|
146 |
if($googleDetail->google_ads_id != "" ){
|
147 |
+
$complete_step["step-1"] = 1;
|
148 |
}
|
149 |
if($googleDetail->google_merchant_center_id != "" ){
|
150 |
+
$complete_step["step-2"] = 1;
|
151 |
}
|
152 |
}
|
153 |
}
|
154 |
}
|
155 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
|
157 |
$countries = json_decode(file_get_contents(ENHANCAD_PLUGIN_DIR . "includes/setup/json/countries.json"));
|
158 |
$credit = json_decode(file_get_contents(ENHANCAD_PLUGIN_DIR . "includes/setup/json/country_reward.json"));
|
176 |
}
|
177 |
}
|
178 |
}
|
179 |
+
/* we hide the tracking method for new subscription id user and showing for old subscription id user*/
|
180 |
+
$is_show_tracking_method_options = $this->TVC_Admin_Helper->is_show_tracking_method_options($this->subscriptionId);
|
181 |
?>
|
182 |
<style>
|
183 |
#menu-dashboard li.current{display: none;}
|
197 |
<div class="smallcontainer">
|
198 |
<div class="onbordingtop">
|
199 |
<h2><?php esc_html_e("Let’s get you started.","enhanced-e-commerce-for-woocommerce-store"); ?></h2>
|
200 |
+
<p><?php esc_html_e("Automate ecommerce tracking in Google Analytics, remarketing and conversion pixels for Google Ads, Meta, Microsoft ads, Snapchat, Pinterest, Twitter, Tiktok and set up product feed from Google Shopping in 5 minutes.","enhanced-e-commerce-for-woocommerce-store"); ?></p>
|
201 |
</div>
|
202 |
<div class="row">
|
203 |
<!-- onborading left start -->
|
214 |
</div>
|
215 |
</div>
|
216 |
<div class="stepmoredtlwrp">
|
217 |
+
<div class="stepmoredtl">
|
218 |
+
<div class="stepsbmtbtn">
|
219 |
+
<button type="button" class="stepnextbtn tvc_google_signinbtn">Get Started</button>
|
220 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
</div>
|
222 |
</div>
|
223 |
</div>
|
224 |
<!-- step-0 over -->
|
225 |
+
<!-- step-1 start -->
|
|
|
226 |
<div class="onbordording-step onbrdstep-1 gglanystep <?php echo ($complete_step['step-1']==1 && $this->tvc_data['g_mail'] && $this->is_refresh_token_expire == false )?'selectedactivestep':''; ?> <?php if($this->subscriptionId != "" && $this->tvc_data['g_mail'] && $this->is_refresh_token_expire == false){ echo "activestep"; } ?>">
|
227 |
<div class="stepdtltop" data-is-done="<?php echo esc_attr($complete_step['step-1']); ?>" id="google-analytics" data-id="step_1">
|
228 |
<div class="stepleftround">
|
229 |
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/check-wbg.png'); ?>" alt="" />
|
230 |
</div>
|
231 |
<div class="stepdetwrap">
|
232 |
+
<h4><?php esc_html_e("Configure Google Tag Manager, Google Analytics and Pixels","enhanced-e-commerce-for-woocommerce-store"); ?></h4>
|
|
|
233 |
</div>
|
234 |
</div>
|
235 |
<div class="stepmoredtlwrp">
|
236 |
<div class="stepmoredtl">
|
237 |
+
<!-- con_gtm_setting_sec -->
|
238 |
+
<?php
|
239 |
+
$tracking_method = isset($this->ee_options['tracking_method'])?$this->ee_options['tracking_method']:"gtag";
|
240 |
+
|
241 |
+
$want_to_use_your_gtm = (isset($this->ee_options['want_to_use_your_gtm']) && $this->ee_options['want_to_use_your_gtm'] != "")?$this->ee_options['want_to_use_your_gtm']:"0"; ?>
|
242 |
+
<div class="con_gtm_setting_sec">
|
243 |
+
<?php if( $is_show_tracking_method_options){ ?>
|
244 |
+
<div class="form-row con_onboarding_sub_sec">
|
245 |
+
<div class="col-sm-4 pixel-left-sec">
|
246 |
+
<div class="pixel-logo-text-left">
|
247 |
+
<div class="pixel-logo">
|
248 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/events-hit.png'); ?>"/>
|
249 |
+
</div>
|
250 |
+
<div class="pixel-text">
|
251 |
+
<label><?php esc_html_e("Tracking Method:","enhanced-e-commerce-for-woocommerce-store"); ?></label>
|
252 |
+
<small><?php esc_html_e("Recommended : Select GTM for all pixel tracking, accuracy and faster page load.","enhanced-e-commerce-for-woocommerce-store"); ?></small>
|
253 |
+
</div>
|
254 |
+
</div>
|
255 |
+
</div>
|
256 |
+
<div class="col-sm-8 pixel-right-sec">
|
257 |
+
<?php
|
258 |
+
$list = array(
|
259 |
+
"gtag" => "gtag.js",
|
260 |
+
"gtm" => "Google Tag Manager"
|
261 |
+
);?>
|
262 |
+
<select name="tracking_method" id="tracking_method" class="select-lsm css-selector">
|
263 |
+
<?php if(!empty($list)){
|
264 |
+
foreach($list as $key => $val){
|
265 |
+
$selected = ($tracking_method == $key)?"selected":"";
|
266 |
+
?>
|
267 |
+
<option value="<?php echo esc_attr($key);?>" <?php echo $selected; ?>><?php echo esc_attr($val);?></option>
|
268 |
+
<?php
|
269 |
+
}
|
270 |
+
}?>
|
271 |
+
</select>
|
272 |
+
<div class="tvc-tooltip">
|
273 |
+
<span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("We recommend using Google Tag Manager for speed and 95% accuracy.","enhanced-e-commerce-for-woocommerce-store"); ?></span>
|
274 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
275 |
+
</div>
|
276 |
+
</div>
|
277 |
+
</div>
|
278 |
+
<?php }else{ $tracking_method = "gtm"; ?>
|
279 |
+
<input type="hidden" name="tracking_method" id="tracking_method" value="gtm">
|
280 |
+
<?php } ?>
|
281 |
+
<div class="form-row con_onboarding_sub_sec only-for-gtm <?php echo ($tracking_method != "gtm")?"tvc-hide":""; ?>">
|
282 |
+
<div class="col-sm-4 pixel-left-sec">
|
283 |
+
<div class="pixel-logo-text-left">
|
284 |
+
<div class="pixel-logo">
|
285 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/gtm_logo.png'); ?>"/>
|
286 |
+
</div>
|
287 |
+
<div class="pixel-text">
|
288 |
+
<label><?php esc_html_e("Google tag manager container id:","enhanced-e-commerce-for-woocommerce-store"); ?></label>
|
289 |
+
<small><?php esc_html_e("Benefits of using your GTM","enhanced-e-commerce-for-woocommerce-store"); ?><a target="_blank" href="<?php echo esc_url_raw("https://marketingplatform.google.com/about/tag-manager/benefits/"); ?>">click here.</a></small>
|
290 |
+
</div>
|
291 |
+
</div>
|
292 |
+
</div>
|
293 |
+
<div class="col-sm-8 pixel-right-sec">
|
294 |
+
<div class="cstmrdobtn-item">
|
295 |
+
<label for="want_to_use_your_gtm_default">
|
296 |
+
<input type="radio" <?php echo esc_attr($this->is_checked($want_to_use_your_gtm, "0")); ?> name="want_to_use_your_gtm" id="want_to_use_your_gtm_default" value="0">
|
297 |
+
<span class="checkmark"></span>
|
298 |
+
<?php esc_html_e("Default (Conversios container - GTM-K7X94DG)","enhanced-e-commerce-for-woocommerce-store"); ?>
|
299 |
+
</label>
|
300 |
+
</div>
|
301 |
+
<div class="cstmrdobtn-item">
|
302 |
+
<label for="want_to_use_your_gtm_own">
|
303 |
+
<input type="radio" <?php echo esc_attr($this->is_checked($want_to_use_your_gtm, "1")); ?> name="want_to_use_your_gtm" id="want_to_use_your_gtm_own" value="1">
|
304 |
+
<span class="checkmark"></span>
|
305 |
+
<?php esc_html_e("Use your own GTM container","enhanced-e-commerce-for-woocommerce-store"); ?>
|
306 |
+
<?php if($this->plan_id == 1){?>
|
307 |
+
<a target="_blank" href="<?php echo esc_url_raw($this->TVC_Admin_Helper->get_pro_plan_site().'?utm_source=EE+Plugin+User+Interface&utm_medium=Onboarding+upgrading+Pro+to+Use+Own+GTM+Link&utm_campaign=Upsell+at+Conversios'); ?>" class="tvc-pro"> (Upgrade to PRO)</a>
|
308 |
+
<?php }?>
|
309 |
+
</label>
|
310 |
+
<div id="htnl_want_to_use_your_gtm_own" class="slctunivr-filed_gtm pl-2">
|
311 |
+
<?php if($this->plan_id != 1){
|
312 |
+
$use_your_gtm_id = isset($this->ee_options['use_your_gtm_id'])?$this->ee_options['use_your_gtm_id']:"";
|
313 |
+
?>
|
314 |
+
<div class="use_your_gtm_id">
|
315 |
+
<input type="text" class="fromfiled" name="use_your_gtm_id" id="use_your_gtm_id" value="<?php echo esc_attr($use_your_gtm_id); ?>">
|
316 |
+
<p><strong><a href="<?php echo esc_url_raw("https://".TVC_AUTH_CONNECT_URL."/help-center/configure_our_plugin_with_your_gtm.pdf"); ?>" target="_blank">How to import Conversios GTM container?</a></strong></p>
|
317 |
+
</div>
|
318 |
+
<?php } else{?>
|
319 |
+
<a target="_blank" href="<?php echo esc_url_raw($this->TVC_Admin_Helper->get_pro_plan_site().'?utm_source=EE+Plugin+User+Interface&utm_medium=Onboarding+upgrading+Pro+to+Use+Own+GTM+Button&utm_campaign=Upsell+at+Conversios'); ?>" class="upgradebtn"><?php esc_html_e("Upgrade to PRO","enhanced-e-commerce-for-woocommerce-store"); ?></a>
|
320 |
+
<?php
|
321 |
+
}?>
|
322 |
+
</div>
|
323 |
+
</div>
|
324 |
+
</div>
|
325 |
+
</div>
|
326 |
+
</div>
|
327 |
+
<!-- con_google_analytics_sec -->
|
328 |
+
<div class="con_google_analytics_sec">
|
329 |
+
<div class="form-row con_onboarding_sub_sec">
|
330 |
+
<div class="col-sm-4 pixel-left-sec">
|
331 |
+
<div class="pixel-logo-text-left">
|
332 |
+
<div class="pixel-logo">
|
333 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/google_analytics_icon.png'); ?>"/>
|
334 |
+
</div>
|
335 |
+
<div class="pixel-text">
|
336 |
+
<label><?php esc_html_e("Google Analytics account:","enhanced-e-commerce-for-woocommerce-store"); ?></label>
|
337 |
+
<small><?php esc_html_e("Benefits of GA tracking for ecommerce business","enhanced-e-commerce-for-woocommerce-store"); ?><a target="_blank" href="<?php echo esc_url_raw("https://support.google.com/analytics/answer/10089681?hl=en"); ?>">click here.</a></small>
|
338 |
+
</div>
|
339 |
+
</div>
|
340 |
+
</div>
|
341 |
+
<div class="col-sm-8 pixel-right-sec">
|
342 |
+
<!-- UA start-->
|
343 |
+
<div class="cstmrdobtn-item">
|
344 |
+
<label for="univeral">
|
345 |
+
<input type="radio" <?php echo esc_attr($this->is_checked($tracking_option, "UA")); ?> name="analytic_tag_type" id="univeral" value="UA">
|
346 |
+
<span class="checkmark"></span>
|
347 |
+
<?php esc_html_e("Universal Analytics (Google Analytics 3)","enhanced-e-commerce-for-woocommerce-store"); ?>
|
348 |
+
</label>
|
349 |
+
<!-- UA dropdown-->
|
350 |
+
<div id="UA" class="slctunivr-filed">
|
351 |
+
<div class="tvc-multi-dropdown">
|
352 |
+
<div id="tvc-ua-acc-edit_box" class="tvc-dropdown tvc-edit-accounts <?php if( isset($googleDetail->ua_analytic_account_id) && $googleDetail->ua_analytic_account_id){ ?> tvc-disable-edits <?php } ?>">
|
353 |
+
<div class="tvc-dropdown-header" id="ua_account_id_option_val" data-profileid="" data-accountid="<?php if(isset($googleDetail->ua_analytic_account_id) && $googleDetail->ua_analytic_account_id){ echo esc_attr($googleDetail->ua_analytic_account_id); } ?>"><?php if(isset($googleDetail->ua_analytic_account_id) && $googleDetail->ua_analytic_account_id){
|
354 |
+
echo esc_attr($googleDetail->ua_analytic_account_id);
|
355 |
+
}else{?><?php esc_html_e("Select UA Account Id","enhanced-e-commerce-for-woocommerce-store"); ?><?php } ?></div>
|
356 |
+
<div class="tvc-dropdown-content" id="ua_account_id_option">
|
357 |
+
<div class="tvc-select-items"><option data-cat="accounts" value=""><?php esc_html_e("Select UA Account Id","enhanced-e-commerce-for-woocommerce-store"); ?></option></div>
|
358 |
+
<div class="tvc_load_more_acc option"><?php esc_html_e("Load More","enhanced-e-commerce-for-woocommerce-store"); ?></div>
|
359 |
+
</div>
|
360 |
+
</div>
|
361 |
+
<?php if( isset($googleDetail->ua_analytic_account_id) && $googleDetail->ua_analytic_account_id){?>
|
362 |
+
<button id="tvc-ua-acc-edit" class="tvc-onboardEdit tvc-edit-acc_fire"><?php esc_html_e("Edit","enhanced-e-commerce-for-woocommerce-store"); ?></button>
|
363 |
+
<?php } ?>
|
364 |
+
</div>
|
365 |
+
<div class="tvc-multi-dropdown">
|
366 |
+
<div id="tvc-ua-web-edit_box" class="tvc-dropdown <?php if(isset($googleDetail->property_id) && $googleDetail->property_id){ ?> tvc-disable-edits <?php } ?>">
|
367 |
+
<div class="tvc-dropdown-header" id="ua_web_property_id_option_val" data-profileid="" data-accountid="<?php if( isset($googleDetail->ua_analytic_account_id) && $googleDetail->ua_analytic_account_id){ echo esc_attr($googleDetail->ua_analytic_account_id); } ?>" data-val="<?php if(isset($googleDetail->property_id) && $googleDetail->property_id){ echo esc_attr($googleDetail->property_id); } ?>">
|
368 |
+
<?php
|
369 |
+
if( isset($googleDetail->property_id) && $googleDetail->property_id){
|
370 |
+
echo esc_attr($googleDetail->property_id);
|
371 |
+
}else{
|
372 |
+
esc_html_e("Select Property Id","enhanced-e-commerce-for-woocommerce-store");
|
373 |
+
} ?>
|
374 |
+
</div>
|
375 |
+
<div class="tvc-dropdown-content" id="ua_web_property_id_option">
|
376 |
+
<div class="tvc-select-items">
|
377 |
+
<option value=""><?php esc_html_e("Select Property Id","enhanced-e-commerce-for-woocommerce-store"); ?></option>
|
378 |
+
</div>
|
379 |
+
</div>
|
380 |
+
</div>
|
381 |
+
<?php if( isset($googleDetail->ua_analytic_account_id) && $googleDetail->ua_analytic_account_id && $googleDetail->property_id){?>
|
382 |
+
<button id="tvc-ua-web-edit" class="tvc-property-edit-btn tvc-onboardEdit" data-type ="UA" data-accountid="<?php echo esc_attr($googleDetail->ua_analytic_account_id); ?>"><?php esc_html_e("Edit","enhanced-e-commerce-for-woocommerce-store"); ?></button>
|
383 |
+
<?php } ?>
|
384 |
+
</div>
|
385 |
+
</div>
|
386 |
</div>
|
387 |
+
<!-- GA4 start-->
|
388 |
+
<div class="cstmrdobtn-item">
|
389 |
+
<label for="gglanytc">
|
390 |
+
<input type="radio" <?php echo esc_attr($this->is_checked($tracking_option, "GA4")); ?> name="analytic_tag_type" id="gglanytc" value="GA4">
|
391 |
+
<span class="checkmark"></span>
|
392 |
+
<?php esc_html_e("Google Analytics 4","enhanced-e-commerce-for-woocommerce-store"); ?>
|
393 |
+
</label>
|
394 |
+
<!-- GA4 dropdown-->
|
395 |
+
<div id="GA4" class="slctunivr-filed">
|
396 |
+
<div class="tvc-multi-dropdown">
|
397 |
+
<div id="tvc-ga4-acc-edit-acc_box" class="tvc-dropdown tvc-edit-accounts <?php if( isset($googleDetail->ga4_analytic_account_id) && $googleDetail->ga4_analytic_account_id){ ?> tvc-disable-edits <?php } ?>">
|
398 |
+
<div class="tvc-dropdown-header" id="ga4_account_id_option_val" data-profileid="" data-accountid="<?php if(isset($googleDetail->ga4_analytic_account_id) && $googleDetail->ga4_analytic_account_id){ echo esc_attr($googleDetail->ga4_analytic_account_id); } ?>">
|
399 |
+
<?php if( isset($googleDetail->ga4_analytic_account_id) && $googleDetail->ga4_analytic_account_id){
|
400 |
+
echo esc_attr($googleDetail->ga4_analytic_account_id);
|
401 |
+
}else{
|
402 |
+
esc_html_e("Select GA4 Analytics Account","enhanced-e-commerce-for-woocommerce-store");
|
403 |
+
} ?>
|
404 |
+
</div>
|
405 |
+
<div class="tvc-dropdown-content" id="ga4_account_id_option">
|
406 |
+
<div class="tvc-select-items"><option data-cat="accounts" value=""><?php esc_html_e("Select GA4 Analytics Account","enhanced-e-commerce-for-woocommerce-store"); ?></option></div>
|
407 |
+
<div class="tvc_load_more_acc option"><?php esc_html_e("Load More","enhanced-e-commerce-for-woocommerce-store"); ?></div>
|
408 |
+
</div>
|
409 |
+
</div>
|
410 |
+
<?php if(isset($googleDetail->ga4_analytic_account_id) && $googleDetail->ga4_analytic_account_id){?>
|
411 |
+
<button id="tvc-ga4-acc-edit-acc" class="tvc-onboardEdit tvc-edit-acc_fire"><?php esc_html_e("Edit","enhanced-e-commerce-for-woocommerce-store"); ?></button>
|
412 |
+
<?php } ?>
|
413 |
+
</div>
|
414 |
+
<div class="tvc-multi-dropdown">
|
415 |
+
<div id="tvc-ga4-web-edit_box" class="tvc-dropdown <?php if(isset($googleDetail->measurement_id) && $googleDetail->measurement_id){ ?> tvc-disable-edits <?php } ?>">
|
416 |
+
<div class="tvc-dropdown-header" id="ga4_web_measurement_id_option_val" data-profileid="" data-name="" data-accountid="<?php if( isset($googleDetail->ga4_analytic_account_id) && $googleDetail->ga4_analytic_account_id){ echo (isset($googleDetail->ga4_analytic_account_id))?esc_attr($googleDetail->ga4_analytic_account_id):""; } ?>" data-val="<?php if( isset($googleDetail->measurement_id) && $googleDetail->measurement_id){ echo esc_attr($googleDetail->measurement_id); } ?>">
|
417 |
+
<?php if(isset($googleDetail->measurement_id) && $googleDetail->measurement_id){
|
418 |
+
echo esc_attr($googleDetail->measurement_id);
|
419 |
+
}else{
|
420 |
+
esc_html_e("Select Measurement Id","enhanced-e-commerce-for-woocommerce-store");
|
421 |
+
} ?>
|
422 |
+
</div>
|
423 |
+
<div class="tvc-dropdown-content" id="ga4_web_measurement_id_option">
|
424 |
+
<div class="tvc-select-items">
|
425 |
+
<option value=""><?php esc_html_e("Select Measurement Id","enhanced-e-commerce-for-woocommerce-store"); ?></option>
|
426 |
+
</div>
|
427 |
+
</div>
|
428 |
+
</div>
|
429 |
+
<?php if(isset($googleDetail->ga4_analytic_account_id) && $googleDetail->ga4_analytic_account_id && $googleDetail->measurement_id){?>
|
430 |
+
<button id="tvc-ga4-web-edit" data-type ="GA4" data-accountid="<?php echo esc_attr($googleDetail->ga4_analytic_account_id); ?>" class="tvc-property-edit-btn tvc-onboardEdit"><?php esc_html_e("Edit","enhanced-e-commerce-for-woocommerce-store"); ?></button>
|
431 |
+
<?php } ?>
|
432 |
+
</div>
|
433 |
+
</div>
|
434 |
+
</div>
|
435 |
+
<!-- BOTH start-->
|
436 |
<div class="cstmrdobtn-item">
|
437 |
<label for="both">
|
438 |
<input type="radio" <?php echo esc_attr($this->is_checked($tracking_option, "BOTH")); ?> name="analytic_tag_type" id="both" value="BOTH">
|
439 |
<span class="checkmark"></span>
|
440 |
<?php esc_html_e("Both","enhanced-e-commerce-for-woocommerce-store"); ?>
|
441 |
</label>
|
442 |
+
<!-- BOTH dropdown-->
|
443 |
<div id="BOTH" class="slctunivr-filed">
|
444 |
<div class="tvc-multi-dropdown">
|
445 |
+
<div id="both-tvc-ua-acc-edit_box" class="botslectbxitem tvc-edit-accounts <?php if( isset($googleDetail->ua_analytic_account_id) && $googleDetail->ua_analytic_account_id){ ?> tvc-disable-edits <?php } ?>" style="margin: 0px 5px 0px 0px;">
|
446 |
<div class="tvc-dropdown">
|
447 |
+
<div class="tvc-dropdown-header" id="both_ua_account_id_option_val" data-profileid="" data-accountid="<?php if( isset($googleDetail->ua_analytic_account_id) && $googleDetail->ua_analytic_account_id){ echo esc_attr($googleDetail->ua_analytic_account_id); } ?>"><?php if( isset($googleDetail->ua_analytic_account_id) && $googleDetail->ua_analytic_account_id){
|
448 |
echo esc_attr($googleDetail->ua_analytic_account_id);
|
449 |
}else{?><?php esc_html_e("Select UA Account Id","enhanced-e-commerce-for-woocommerce-store"); ?><?php } ?></div>
|
450 |
<div class="tvc-dropdown-content" id="both_ua_account_id_option">
|
451 |
+
<div class="tvc-select-items"><option data-cat="accounts" value=""><?php esc_html_e("Select UA Account Id","enhanced-e-commerce-for-woocommerce-store"); ?></option></div>
|
452 |
<div class="tvc_load_more_acc option"><?php esc_html_e("Load More","enhanced-e-commerce-for-woocommerce-store"); ?></div>
|
453 |
</div>
|
454 |
</div>
|
455 |
</div>
|
456 |
+
<div id="both-tvc-ua-web-edit_box" class="botslectbxitem <?php if( isset($googleDetail->property_id) && $googleDetail->property_id){ ?> tvc-disable-edits <?php } ?>" >
|
457 |
<div class="tvc-dropdown">
|
458 |
+
<div class="tvc-dropdown-header" id="both_ua_web_property_id_option_val" data-profileid="" data-accountid="<?php if( isset($googleDetail->ua_analytic_account_id) && $googleDetail->ua_analytic_account_id){ echo esc_attr($googleDetail->ua_analytic_account_id); } ?>" data-val="<?php if( isset($googleDetail->property_id) && $googleDetail->property_id){ echo esc_attr($googleDetail->property_id); } ?>">
|
459 |
+
<?php if( isset($googleDetail->property_id) && $googleDetail->property_id){
|
460 |
echo esc_attr($googleDetail->property_id);
|
461 |
}else{?><?php esc_html_e("Select Property Id","enhanced-e-commerce-for-woocommerce-store"); ?>
|
462 |
<?php } ?> </div>
|
464 |
<div class="tvc-select-items"><option value=""><?php esc_html_e("Select Property Id","enhanced-e-commerce-for-woocommerce-store"); ?></option></div>
|
465 |
</div>
|
466 |
</div>
|
467 |
+
</div>
|
|
|
468 |
<button id="both-tvc-ua-acc-edit" class="tvc-onboardEdit tvc-edit-acc_fire"><?php esc_html_e("Edit","enhanced-e-commerce-for-woocommerce-store"); ?></button>
|
469 |
</div>
|
470 |
|
471 |
<div class="tvc-multi-dropdown">
|
472 |
+
<div id="both-tvc-ga4-acc-edit_box" class="botslectbxitem tvc-edit-accounts <?php if( isset($googleDetail->ga4_analytic_account_id) && $googleDetail->ga4_analytic_account_id){ ?> tvc-disable-edits <?php } ?>" style="margin: 0px 5px 0px 0px;">
|
473 |
<div class="tvc-dropdown">
|
474 |
+
<div class="tvc-dropdown-header" id="both_ga4_account_id_option_val" data-profileid=""data-accountid="<?php if( isset($googleDetail->ga4_analytic_account_id) && $googleDetail->ga4_analytic_account_id){ echo esc_attr($googleDetail->ga4_analytic_account_id); } ?>"><?php if( isset($googleDetail->ga4_analytic_account_id) && $googleDetail->ga4_analytic_account_id){
|
475 |
echo esc_attr($googleDetail->ga4_analytic_account_id);
|
476 |
}else{?><?php esc_html_e("Select GA4 Account Id","enhanced-e-commerce-for-woocommerce-store"); ?><?php } ?></div>
|
477 |
<div class="tvc-dropdown-content" id="both_ga4_account_id_option">
|
478 |
+
<div class="tvc-select-items"><option data-cat="accounts" value=""><?php esc_html_e("Select GA4 Account Id","enhanced-e-commerce-for-woocommerce-store"); ?></option></div>
|
479 |
<div class="tvc_load_more_acc option"><?php esc_html_e("Load More","enhanced-e-commerce-for-woocommerce-store"); ?></div>
|
480 |
</div>
|
481 |
</div>
|
482 |
</div>
|
483 |
+
<div id="both-tvc-ga4-web-edit_box" class="botslectbxitem <?php if( isset($googleDetail->measurement_id) && $googleDetail->measurement_id){ ?> tvc-disable-edits <?php } ?>">
|
484 |
<div class="tvc-dropdown">
|
485 |
+
<div class="tvc-dropdown-header" id="both_ga4_web_measurement_id_option_val" data-profileid="" data-name="" data-accountid="<?php if(isset($googleDetail->ga4_analytic_account_id) && $googleDetail->ga4_analytic_account_id){ echo esc_attr($googleDetail->ga4_analytic_account_id); } ?>" data-val="<?php if( isset($googleDetail->measurement_id) && $googleDetail->measurement_id){ echo esc_attr($googleDetail->measurement_id); } ?>">
|
486 |
+
<?php if( isset($googleDetail->measurement_id) && $googleDetail->measurement_id){
|
487 |
echo esc_attr($googleDetail->measurement_id);
|
488 |
}else{?><?php esc_html_e("Select Measurement Id","enhanced-e-commerce-for-woocommerce-store"); ?>
|
489 |
<?php } ?> </div>
|
495 |
<button id="both-tvc-ga4-acc-edit" class="tvc-onboardEdit tvc-edit-acc_fire"><?php esc_html_e("Edit","enhanced-e-commerce-for-woocommerce-store"); ?></button>
|
496 |
</div>
|
497 |
|
498 |
+
<div id="old_tracking" data-tracking_option="<?php echo esc_attr($tracking_option); ?>" data-measurement_id="<?php echo isset($googleDetail->measurement_id)?esc_attr($googleDetail->measurement_id):""; ?>" data-property_id="<?php echo isset($googleDetail->property_id)?esc_attr($googleDetail->property_id) :""; ?>"></div>
|
499 |
</div>
|
500 |
</div>
|
501 |
+
</div>
|
502 |
+
</div>
|
503 |
+
<!-- Advance Settings-->
|
504 |
+
<div class="form-row tvc-hide">
|
505 |
+
<h6><?php esc_html_e("Advance Settings (Optional)","enhanced-e-commerce-for-woocommerce-store"); ?></h6>
|
506 |
<div class="chckbxbgbx">
|
507 |
<div class="cstmcheck-item">
|
508 |
<label for="enhanced_e_commerce_tracking">
|
509 |
+
<input type="checkbox" class="custom-control-input" name="enhanced_e_commerce_tracking" id="enhanced_e_commerce_tracking" checked="checked">
|
|
|
|
|
510 |
</label>
|
511 |
</div>
|
512 |
<div class="cstmcheck-item">
|
513 |
<label for="add_gtag_snippet">
|
514 |
+
<input type="checkbox" class="custom-control-input" name="add_gtag_snippe" id="add_gtag_snippet" checked="checked">
|
|
|
|
|
515 |
</label>
|
516 |
</div>
|
517 |
</div>
|
518 |
+
</div>
|
519 |
+
</div>
|
520 |
+
<!-- con_google_ads_sec -->
|
521 |
+
<div class="con_google_ads_sec">
|
522 |
+
<div class="form-row con_onboarding_sub_sec">
|
523 |
+
<div class="col-sm-4 pixel-left-sec">
|
524 |
+
<div class="pixel-logo-text-left">
|
525 |
+
<div class="pixel-logo">
|
526 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/google ads_icon.png'); ?>"/>
|
527 |
+
</div>
|
528 |
+
<div class="pixel-text">
|
529 |
+
<label><?php esc_html_e("Google Ads account:","enhanced-e-commerce-for-woocommerce-store"); ?></label>
|
530 |
+
<small><?php esc_html_e("Benefits of integrating google ads account","enhanced-e-commerce-for-woocommerce-store"); ?><a target="_blank" href="<?php echo esc_url_raw("https://support.google.com/google-ads/answer/3124536?hl=en"); ?>">click here.</a></small>
|
531 |
+
</div>
|
532 |
+
</div>
|
533 |
+
</div>
|
534 |
+
<div class="col-sm-8 pixel-right-sec">
|
535 |
+
<!--Google Ads dropdown-->
|
536 |
+
<div class="selcttopwrap tvc_ads_section" id="tvc_ads_section">
|
537 |
+
<div class="ggladsselectbx">
|
538 |
+
<input type="hidden" id="subscriptionGoogleAdsId" name="subscriptionGoogleAdsId" value="<?php echo property_exists($googleDetail,"google_ads_id")?esc_attr($googleDetail->google_ads_id):""; ?>">
|
539 |
+
<select class="slect2bx google_ads_sel <?php if( isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id){ ?> tvc-disable-edits <?php } ?>" id="ads-account" name="customer_id">
|
540 |
+
<option value=''><?php esc_html_e("Select Google Ads Account","enhanced-e-commerce-for-woocommerce-store"); ?></option>
|
541 |
+
</select>
|
542 |
+
</div>
|
543 |
+
<?php if( isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id){?>
|
544 |
+
<button id="tvc-gaAds-acc-edit" class="tvc-onboardEdit"><?php esc_html_e("Edit","enhanced-e-commerce-for-woocommerce-store"); ?></button><?php } ?>
|
545 |
+
</div>
|
546 |
+
<div class="tvc_ads_section">
|
547 |
+
<div class="orwrp"><?php esc_html_e("OR","enhanced-e-commerce-for-woocommerce-store"); ?></div>
|
548 |
+
<div class="creatnewwrp">
|
549 |
+
<button type="button" class="cretnewbtn tvc-onboardEdit newggladsbtn"><?php esc_html_e("Create New","enhanced-e-commerce-for-woocommerce-store"); ?></button>
|
550 |
+
</div>
|
551 |
+
</div>
|
552 |
+
<!--New Google Ads-->
|
553 |
+
<div class="selcttopwrap">
|
554 |
+
<div class="onbrdpp-body alert alert-primary" style="display:none;" id="new_google_ads_section">
|
555 |
+
<h4><?php esc_html_e("Account Created","enhanced-e-commerce-for-woocommerce-store"); ?></h4>
|
556 |
+
<p><?php esc_html_e("Your Google Ads Account has been created","enhanced-e-commerce-for-woocommerce-store"); ?> <strong>(<b><span id="new_google_ads_id"></span></b>).</strong></p>
|
557 |
+
<h6><?php esc_html_e("Steps to claim your Google Ads Account:","enhanced-e-commerce-for-woocommerce-store"); ?></h6>
|
558 |
+
<ol>
|
559 |
+
<li><?php esc_html_e("Accept invitation mail from Google Ads sent to your email address","enhanced-e-commerce-for-woocommerce-store"); ?> <em><?php echo (isset($this->tvc_data['g_mail']))?esc_attr($this->tvc_data['g_mail']):""; ?></em><span id="invitationLink"><br><em>OR</em> Open
|
560 |
+
<a href="" target="_blank" id="ads_invitationLink">Invitation Link</a></span>
|
561 |
+
</li>
|
562 |
+
<li><?php esc_html_e("Log into your Google Ads account and set up your billing preferences","enhanced-e-commerce-for-woocommerce-store"); ?></li>
|
563 |
+
</ol>
|
564 |
+
</div>
|
565 |
+
</div>
|
566 |
+
<!--Google Ads Advance Settings-->
|
567 |
+
<div class="form-row">
|
568 |
+
<?php
|
569 |
+
$is_r_tags = (property_exists($googleDetail,"remarketing_tags") && $googleDetail->remarketing_tags == 1)?"checked":(($defaulSelection == 1)?"checked":"");
|
570 |
+
$is_l_g_an_w_g_ad = (property_exists($googleDetail,"link_google_analytics_with_google_ads") && $googleDetail->link_google_analytics_with_google_ads == 1)?"checked":(($defaulSelection == 1)?"checked":"");
|
571 |
+
$is_d_r_tags = (property_exists($googleDetail,"dynamic_remarketing_tags") && $googleDetail->dynamic_remarketing_tags == 1)?"checked":(($defaulSelection == 1)?"checked":"");
|
572 |
+
$is_g_ad_c_tracking = (property_exists($googleDetail,"google_ads_conversion_tracking") && $googleDetail->google_ads_conversion_tracking == 1)?"checked":(($defaulSelection == 1)?"checked":"");
|
573 |
+
$ga_EC = get_option("ga_EC");
|
574 |
+
$ga_EC = ($ga_EC == 1)?"checked":(($defaulSelection == 1)?"checked":"");
|
575 |
+
?>
|
576 |
+
<h6><?php esc_html_e("Advance Settings (Optional)","enhanced-e-commerce-for-woocommerce-store"); ?></h6>
|
577 |
+
<div class="chckbxbgbx dsplcolmview">
|
578 |
+
<div class="cstmcheck-item">
|
579 |
+
<label for="remarketing_tag">
|
580 |
+
<input type="checkbox" class="custom-control-input" name="remarketing_tag" id="remarketing_tag" value="1" <?php echo esc_attr($is_r_tags); ?>>
|
581 |
+
<span class="checkmark"></span>
|
582 |
+
<?php esc_html_e("Enable Google Remarketing Tag","enhanced-e-commerce-for-woocommerce-store"); ?>
|
583 |
+
</label>
|
584 |
+
</div>
|
585 |
+
<div class="cstmcheck-item">
|
586 |
+
<label for="dynamic_remarketing_tags">
|
587 |
+
<input type="checkbox" class="custom-control-input" name="dynamic_remarketing_tags" id="dynamic_remarketing_tags" value="1" <?php echo esc_attr($is_d_r_tags); ?>>
|
588 |
+
<span class="checkmark"></span>
|
589 |
+
<?php esc_html_e("Enable Dynamic Remarketing Tag","enhanced-e-commerce-for-woocommerce-store"); ?>
|
590 |
+
</label>
|
591 |
+
</div>
|
592 |
+
<div class="cstmcheck-item <?php if($this->plan_id == 1){?>cstmcheck-item-pro <?php } ?>">
|
593 |
+
<label for="google_ads_conversion_tracking">
|
594 |
+
<?php if($this->plan_id != 1){?>
|
595 |
+
<input type="checkbox" class="custom-control-input" name="google_ads_conversion_tracking" id="google_ads_conversion_tracking" value="1" <?php echo esc_attr($is_g_ad_c_tracking); ?>>
|
596 |
+
<span class="checkmark"></span>
|
597 |
+
<?php esc_html_e("Google Ads conversion tracking","enhanced-e-commerce-for-woocommerce-store"); ?>
|
598 |
+
<?php }else{?>
|
599 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/icon/lock.svg'); ?>"><label><?php esc_html_e("Google Ads conversion tracking","enhanced-e-commerce-for-woocommerce-store"); ?><a target="_blank" href="<?php echo esc_url_raw($this->TVC_Admin_Helper->get_pro_plan_site().'?utm_source=EE+Plugin+User+Interface&utm_medium=Onboarding+upgrading+Pro+to+Use+Google+Ads+conversion+tracking+Link&utm_campaign=Upsell+at+Conversios'); ?>" class="tvc-pro"> (Upgrade to PRO)</a></label>
|
600 |
+
<?php } ?>
|
601 |
+
</label>
|
602 |
+
</div>
|
603 |
+
<div class="cstmcheck-item <?php if($this->plan_id == 1){?>cstmcheck-item-pro <?php } ?>">
|
604 |
+
<label for="ga_EC">
|
605 |
+
<?php if($this->plan_id != 1){?>
|
606 |
+
<input type="checkbox" class="custom-control-input" name="ga_EC" id="ga_EC" value="1" <?php echo esc_attr($ga_EC); ?>>
|
607 |
+
<span class="checkmark"></span>
|
608 |
+
<?php esc_html_e("Enable Google Ads Enhanced Conversion tracking","enhanced-e-commerce-for-woocommerce-store"); ?>
|
609 |
+
<?php }else{?>
|
610 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/icon/lock.svg'); ?>"><label><?php esc_html_e("Enable Google Ads Enhanced Conversion tracking","enhanced-e-commerce-for-woocommerce-store"); ?><a target="_blank" href="<?php echo esc_url_raw($this->TVC_Admin_Helper->get_pro_plan_site().'?utm_source=EE+Plugin+User+Interface&utm_medium=Onboarding+upgrading+Pro+to+Use+Enhanced+Conversion+tracking+Link&utm_campaign=Upsell+at+Conversios'); ?>" class="tvc-pro"> (Upgrade to PRO)</a></label>
|
611 |
+
<?php } ?>
|
612 |
+
</label>
|
613 |
+
</div>
|
614 |
+
<div class="cstmcheck-item">
|
615 |
+
<label for="link_google_analytics_with_google_ads">
|
616 |
+
<input type="checkbox" class="custom-control-input" name="link_google_analytics_with_google_ads" id="link_google_analytics_with_google_ads" value="1" <?php echo esc_attr($is_l_g_an_w_g_ad); ?>>
|
617 |
+
<span class="checkmark"></span>
|
618 |
+
<?php esc_html_e("Link Google Analytics with Google Ads","enhanced-e-commerce-for-woocommerce-store"); ?>
|
619 |
+
</label>
|
620 |
+
</div>
|
621 |
+
</div>
|
622 |
+
</div>
|
623 |
+
</div>
|
624 |
+
|
625 |
+
</div>
|
626 |
+
</div>
|
627 |
+
|
628 |
+
<!-- con_pixels_sec -->
|
629 |
+
<div class="con_pixels_sec">
|
630 |
+
<div class="form-row con_onboarding_sub_sec">
|
631 |
+
<div class="con_pixel_item">
|
632 |
+
<div class="col-sm-4 pixel-left-sec">
|
633 |
+
<div class="pixel-logo-text-left">
|
634 |
+
<div class="pixel-logo">
|
635 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/fb-icon.png'); ?>"/>
|
636 |
+
</div>
|
637 |
+
<div class="pixel-text">
|
638 |
+
<label><?php esc_html_e("Facebook (Meta) Pixel ID:","enhanced-e-commerce-for-woocommerce-store"); ?></label>
|
639 |
+
<small><?php esc_html_e("Benefits of adding FB pixel","enhanced-e-commerce-for-woocommerce-store"); ?><a target="_blank" href="<?php echo esc_url_raw("https://www.facebook.com/business/tools/meta-pixel"); ?>">click here.</a></small>
|
640 |
+
<small><?php esc_html_e("How to find FB pixel ID?","enhanced-e-commerce-for-woocommerce-store"); ?><a target="_blank" href="<?php echo esc_url_raw("https://conversios.io/help-center/meta_pixel.pdf"); ?>">click here.</a></small>
|
641 |
+
</div>
|
642 |
+
</div>
|
643 |
+
</div>
|
644 |
+
<div class="col-sm-8 pixel-right-sec">
|
645 |
+
<?php $fb_pixel_id = isset($this->ee_options['fb_pixel_id'])?$this->ee_options['fb_pixel_id']:""; ?>
|
646 |
+
<input type="text" class="fromfiled only-for-gtm-lock" <?php echo ($tracking_method != "gtm")?"disabled":""; ?> name="fb_pixel_id" id="fb_pixel_id" placeholder="Facebook pixel id looks like this - 518896233175751" value="<?php echo esc_attr($fb_pixel_id); ?>">
|
647 |
+
<div class="tvc-tooltip">
|
648 |
+
<span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("The Facebook pixel ID looks like. 518896233175751","enhanced-e-commerce-for-woocommerce-store"); ?></span>
|
649 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
650 |
+
</div>
|
651 |
+
</div>
|
652 |
+
</div>
|
653 |
+
</div>
|
654 |
+
<div class="form-row con_onboarding_sub_sec">
|
655 |
+
<div class="con_pixel_item">
|
656 |
+
<div class="col-sm-4 pixel-left-sec">
|
657 |
+
<div class="pixel-logo-text-left">
|
658 |
+
<div class="pixel-logo">
|
659 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/bing_icon.png'); ?>"/>
|
660 |
+
</div>
|
661 |
+
<div class="pixel-text">
|
662 |
+
<label><?php esc_html_e("Microsoft Ads (Bing) Pixel ID:","enhanced-e-commerce-for-woocommerce-store"); ?></label>
|
663 |
+
<small><?php esc_html_e("Benefits of adding Microsoft pixel","enhanced-e-commerce-for-woocommerce-store"); ?><a target="_blank" href="<?php echo esc_url_raw("https://help.ads.microsoft.com/#apex/ads/en/56681/2-500"); ?>">click here.</a></small>
|
664 |
+
<small><?php esc_html_e("How to find Bing pixel ID?","enhanced-e-commerce-for-woocommerce-store"); ?><a target="_blank" href="<?php echo esc_url_raw("https://conversios.io/help-center/microsoft_bing_ads_pixel.pdf"); ?>">click here.</a></small>
|
665 |
+
</div>
|
666 |
+
</div>
|
667 |
+
</div>
|
668 |
+
<div class="col-sm-8 pixel-right-sec">
|
669 |
+
<?php $microsoft_ads_pixel_id = isset($this->ee_options['microsoft_ads_pixel_id'])?$this->ee_options['microsoft_ads_pixel_id']:""; ?>
|
670 |
+
<input type="text" class="fromfiled only-for-gtm-lock" <?php echo ($tracking_method != "gtm")?"disabled":""; ?> name="microsoft_ads_pixel_id" id="microsoft_ads_pixel_id" placeholder="Microsoft ads pixel id looks like this - 343003931" value="<?php echo esc_attr($microsoft_ads_pixel_id); ?>">
|
671 |
+
<div class="tvc-tooltip">
|
672 |
+
<span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("Microsoft Ads pixel ID looks like. 343003931 ","enhanced-e-commerce-for-woocommerce-store"); ?></span>
|
673 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
674 |
+
</div>
|
675 |
+
</div>
|
676 |
+
</div>
|
677 |
+
</div>
|
678 |
+
<div class="form-row con_onboarding_sub_sec">
|
679 |
+
<div class="con_pixel_item">
|
680 |
+
<div class="col-sm-4 pixel-left-sec">
|
681 |
+
<div class="pixel-logo-text-left">
|
682 |
+
<div class="pixel-logo">
|
683 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/pinterest_icon.png'); ?>"/>
|
684 |
+
</div>
|
685 |
+
<div class="pixel-text">
|
686 |
+
<label><?php esc_html_e("Pinterest Pixel ID:","enhanced-e-commerce-for-woocommerce-store"); ?></label>
|
687 |
+
<small><?php esc_html_e("Benefits of adding Pinterest pixel","enhanced-e-commerce-for-woocommerce-store"); ?><a target="_blank" href="<?php echo esc_url_raw("https://help.pinterest.com/en/business/article/install-the-pinterest-tag"); ?>">click here.</a></small>
|
688 |
+
<small><?php esc_html_e("How to find Pinterest pixel ID?","enhanced-e-commerce-for-woocommerce-store"); ?><a target="_blank" href="<?php echo esc_url_raw("https://conversios.io/help-center/pinterest _pixel.pdf"); ?>">click here.</a></small>
|
689 |
+
</div>
|
690 |
+
</div>
|
691 |
+
</div>
|
692 |
+
<div class="col-sm-8 pixel-right-sec">
|
693 |
+
<?php $pinterest_ads_pixel_id = isset($this->ee_options['pinterest_ads_pixel_id'])?$this->ee_options['pinterest_ads_pixel_id']:""; ?>
|
694 |
+
<input type="text" class="fromfiled only-for-gtm-lock" <?php echo ($tracking_method != "gtm")?"disabled":""; ?> name="pinterest_ads_pixel_id" id="pinterest_ads_pixel_id" placeholder="Pinterest pixel id looks like this - 2612831678022" value="<?php echo esc_attr($pinterest_ads_pixel_id); ?>">
|
695 |
+
<div class="tvc-tooltip">
|
696 |
+
<span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("The Pinterest Ads pixel ID looks like. 2612831678022","enhanced-e-commerce-for-woocommerce-store"); ?></span>
|
697 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
698 |
+
</div>
|
699 |
+
</div>
|
700 |
+
</div>
|
701 |
+
</div>
|
702 |
+
<div class="form-row con_onboarding_sub_sec">
|
703 |
+
<div class="con_pixel_item">
|
704 |
+
<div class="col-sm-4 pixel-left-sec">
|
705 |
+
<div class="pixel-logo-text-left">
|
706 |
+
<div class="pixel-logo">
|
707 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/snapchat_icon.png'); ?>"/>
|
708 |
+
</div>
|
709 |
+
<div class="pixel-text">
|
710 |
+
<label><?php esc_html_e("Snapchat Pixel ID:","enhanced-e-commerce-for-woocommerce-store"); ?></label>
|
711 |
+
<small><?php esc_html_e("Benefits of adding Snapchat pixel","enhanced-e-commerce-for-woocommerce-store"); ?><a target="_blank" href="<?php echo esc_url_raw("https://forbusiness.snapchat.com/advertising/snap-pixel#:~:text=Having%20a%20Snap%20Pixel%20installed,your%20ad%20to%20their%20actions."); ?>">click here.</a></small>
|
712 |
+
<small><?php esc_html_e("How to find Snapchat pixel ID?","enhanced-e-commerce-for-woocommerce-store"); ?><a target="_blank" href="<?php echo esc_url_raw("https://conversios.io/help-center/snapchat_pixel.pdf"); ?>">click here.</a></small>
|
713 |
+
</div>
|
714 |
+
</div>
|
715 |
+
</div>
|
716 |
+
<div class="col-sm-8 pixel-right-sec">
|
717 |
+
<?php $snapchat_ads_pixel_id = isset($this->ee_options['snapchat_ads_pixel_id'])?$this->ee_options['snapchat_ads_pixel_id']:""; ?>
|
718 |
+
<input type="text" class="fromfiled only-for-gtm-lock" <?php echo ($tracking_method != "gtm")?"disabled":""; ?> name="snapchat_ads_pixel_id" id="snapchat_ads_pixel_id" placeholder="Snapchat pixel id looks like this - 12e1ec0a-90aa-4267-b1a0-182c455711e9" value="<?php echo esc_attr($snapchat_ads_pixel_id); ?>">
|
719 |
+
<div class="tvc-tooltip">
|
720 |
+
<span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("The Snapchat Ads pixel ID looks like. 12e1ec0a-90aa-4267-b1a0-182c455711e9","enhanced-e-commerce-for-woocommerce-store"); ?></span>
|
721 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
722 |
+
</div>
|
723 |
+
</div>
|
724 |
+
</div>
|
725 |
+
</div>
|
726 |
+
<div class="form-row con_onboarding_sub_sec">
|
727 |
+
<div class="con_pixel_item">
|
728 |
+
<div class="col-sm-4 pixel-left-sec">
|
729 |
+
<div class="pixel-logo-text-left">
|
730 |
+
<div class="pixel-logo">
|
731 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/tiKtok_icon.png'); ?>"/>
|
732 |
+
</div>
|
733 |
+
<div class="pixel-text">
|
734 |
+
<label><?php esc_html_e("TiKTok Pixel ID:","enhanced-e-commerce-for-woocommerce-store"); ?></label>
|
735 |
+
<small><?php esc_html_e("Benefits of adding TiKTok pixel","enhanced-e-commerce-for-woocommerce-store"); ?><a target="_blank" href="<?php echo esc_url_raw("https://ads.tiktok.com/help/article?aid=9663&redirected=1"); ?>">click here.</a></small>
|
736 |
+
<small><?php esc_html_e("How to find TiKTok pixel ID?","enhanced-e-commerce-for-woocommerce-store"); ?><a target="_blank" href="<?php echo esc_url_raw("https://conversios.io/help-center/tiktok_pixel.pdf"); ?>">click here.</a></small>
|
737 |
+
</div>
|
738 |
+
</div>
|
739 |
+
</div>
|
740 |
+
<div class="col-sm-8 pixel-right-sec">
|
741 |
+
<?php $tiKtok_ads_pixel_id = isset($this->ee_options['tiKtok_ads_pixel_id'])?$this->ee_options['tiKtok_ads_pixel_id']:""; ?>
|
742 |
+
<input type="text" class="fromfiled only-for-gtm-lock" <?php echo ($tracking_method != "gtm")?"disabled":""; ?> name="tiKtok_ads_pixel_id" id="tiKtok_ads_pixel_id" placeholder="TiKTok pixel id looks like this - CBET743C77U5BM7P178N" value="<?php echo esc_attr($tiKtok_ads_pixel_id); ?>">
|
743 |
+
<div class="tvc-tooltip">
|
744 |
+
<span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("The TiKTok Ads pixel ID looks like. CBET743C77U5BM7P178N","enhanced-e-commerce-for-woocommerce-store"); ?></span>
|
745 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
746 |
+
</div>
|
747 |
+
</div>
|
748 |
+
</div>
|
749 |
+
</div>
|
750 |
+
<div class="form-row con_onboarding_sub_sec">
|
751 |
+
<div class="con_pixel_item">
|
752 |
+
<div class="col-sm-4 pixel-left-sec">
|
753 |
+
<div class="pixel-logo-text-left">
|
754 |
+
<div class="pixel-logo">
|
755 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/twitter_icon.png'); ?>"/>
|
756 |
+
</div>
|
757 |
+
<div class="pixel-text">
|
758 |
+
<label><?php esc_html_e("Twitter Pixel ID:","enhanced-e-commerce-for-woocommerce-store"); ?></label>
|
759 |
+
<small><?php esc_html_e("Benefits of adding Twitter pixel","enhanced-e-commerce-for-woocommerce-store"); ?><a target="_blank" href="<?php echo esc_url_raw("https://business.twitter.com/en/help/campaign-measurement-and-analytics/conversion-tracking-for-websites.html"); ?>">click here.</a></small>
|
760 |
+
<small><?php esc_html_e("How to find Twitter pixel ID?","enhanced-e-commerce-for-woocommerce-store"); ?><a target="_blank" href="<?php echo esc_url_raw("https://conversios.io/help-center/twitter_ads_pixel.pdf"); ?>">click here.</a></small>
|
761 |
+
</div>
|
762 |
+
</div>
|
763 |
+
</div>
|
764 |
+
<div class="col-sm-8 pixel-right-sec">
|
765 |
+
<?php $twitter_ads_pixel_id = isset($this->ee_options['twitter_ads_pixel_id'])?$this->ee_options['twitter_ads_pixel_id']:""; ?>
|
766 |
+
<input type="text" class="fromfiled only-for-gtm-lock" <?php echo ($tracking_method != "gtm")?"disabled":""; ?> name="twitter_ads_pixel_id" id="twitter_ads_pixel_id" placeholder="Twitter pixel if looks like this - ocihb" value="<?php echo esc_attr($twitter_ads_pixel_id); ?>">
|
767 |
+
<div class="tvc-tooltip">
|
768 |
+
<span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("The Twitter Ads pixel ID looks like. ocihb","enhanced-e-commerce-for-woocommerce-store"); ?></span>
|
769 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
770 |
+
</div>
|
771 |
+
</div>
|
772 |
+
</div>
|
773 |
+
</div>
|
774 |
+
|
775 |
+
</div>
|
776 |
+
<!-- Sec -2 save btn -->
|
777 |
+
<div class="stepsbmtbtn">
|
778 |
+
<input type="hidden" id="subscriptionPropertyId" name="subscriptionPropertyId" value="<?php echo (property_exists($googleDetail,"property_id"))?esc_attr($googleDetail->property_id):""; ?>">
|
779 |
+
<input type="hidden" id="subscriptionMeasurementId" name="subscriptionMeasurementId" value="<?php echo (property_exists($googleDetail,"measurement_id"))?esc_attr($googleDetail->measurement_id):""; ?>">
|
780 |
+
<button type="button" id="step_1" class="stepnextbtn stpnxttrgr"><?php esc_html_e("Next","enhanced-e-commerce-for-woocommerce-store"); ?></button>
|
781 |
+
</div>
|
782 |
+
|
783 |
</div>
|
784 |
</div>
|
785 |
+
</div>
|
|
|
|
|
|
|
786 |
<!-- step-1 over -->
|
787 |
<!-- step-2 start -->
|
788 |
+
<div class="onbordording-step onbrdstep-2 gglmrchntstep <?php echo ($complete_step['step-2']==1 && $this->is_refresh_token_expire == false )?'selectedactivestep':''; ?>">
|
789 |
+
<div class="stepdtltop" data-is-done="<?php echo esc_attr($complete_step['step-2']); ?>" id="gmc-account" data-id="step_3">
|
790 |
<div class="stepleftround">
|
791 |
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/check-wbg.png'); ?>" alt="" />
|
792 |
</div>
|
793 |
<div class="stepdetwrap">
|
794 |
+
<h4><?php esc_html_e("Set up product feed for Google Merchant center","enhanced-e-commerce-for-woocommerce-store"); ?></h4>
|
|
|
795 |
</div>
|
796 |
</div>
|
797 |
<div class="stepmoredtlwrp">
|
798 |
<div class="stepmoredtl">
|
799 |
<form action="#">
|
800 |
+
<div class="form-row con_onboarding_sub_sec">
|
801 |
+
<div class="col-sm-4 pixel-left-sec">
|
802 |
+
<div class="pixel-logo-text-left">
|
803 |
+
<div class="pixel-logo">
|
804 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/google_shopping_icon.png'); ?>"/>
|
805 |
+
</div>
|
806 |
+
<div class="pixel-text">
|
807 |
+
<label><?php esc_html_e("Google Merchant Center Account:","enhanced-e-commerce-for-woocommerce-store"); ?></label>
|
808 |
+
<a target="_blank" href="<?php echo esc_url_raw("#"); ?>"><?php esc_html_e("Benefits of integrating google merchant center account","enhanced-e-commerce-for-woocommerce-store"); ?></a>
|
809 |
+
</div>
|
810 |
+
</div>
|
811 |
+
</div>
|
812 |
+
<div class="col-sm-8 pixel-right-sec">
|
813 |
+
<div class="selcttopwrap">
|
814 |
+
<div class="form-group" style="display:none;" id="new_merchant_section">
|
815 |
+
<div class="text-center">
|
816 |
+
<div class="alert alert-primary" style="padding: 10px;" role="alert">
|
817 |
+
<label class="form-label-control font-weight-bold"><?php esc_html_e("New Google Merchant Center with account id: ","enhanced-e-commerce-for-woocommerce-store"); ?><span id="new_merchant_id"></span> <?php esc_html_e('is created successfully. Click on "Save" to finish the configuration.',"enhanced-e-commerce-for-woocommerce-store"); ?></label>
|
818 |
+
</div>
|
819 |
+
</div>
|
820 |
+
</div>
|
821 |
+
<div class="tvc_merchant_section" id="tvc_merchant_section">
|
822 |
+
<div class="ggladsselectbx">
|
823 |
+
<select class="slect2bx " id="google_merchant_center_id" name="google_merchant_center_id">
|
824 |
+
<option value=''><?php esc_html_e("Select Google Merchant Center","enhanced-e-commerce-for-woocommerce-store"); ?></option>
|
825 |
+
</select>
|
826 |
+
</div>
|
827 |
+
<?php if( isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id){?>
|
828 |
+
<button id="tvc-gmc-acc-edit" class="tvc-onboardEdit"><?php esc_html_e("Edit","enhanced-e-commerce-for-woocommerce-store"); ?></button><?php } ?>
|
829 |
+
</div>
|
830 |
+
</div>
|
831 |
+
<div class="tvc_merchant_section">
|
832 |
+
<div class="orwrp"><?php esc_html_e("or","enhanced-e-commerce-for-woocommerce-store"); ?></div>
|
833 |
+
<div class="creatnewwrp">
|
834 |
+
<button type="button" class="cretnewbtn tvc-onboardEdit newmrchntbtn"><?php esc_html_e("Create New","enhanced-e-commerce-for-woocommerce-store"); ?></button>
|
835 |
+
</div>
|
836 |
+
</div>
|
837 |
+
</div>
|
838 |
+
</div>
|
839 |
|
840 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
841 |
<div class="stepsbmtbtn">
|
842 |
+
<button type="button" id="step_3" data-enchanter="finish" class="stepnextbtn finishbtn"><?php esc_html_e("Save & Finish","enhanced-e-commerce-for-woocommerce-store"); ?></button>
|
843 |
<!-- add dslbbtn class for disable button -->
|
844 |
+
</div>
|
|
|
|
|
845 |
<input type="hidden" id="subscriptionMerchantId" name="subscriptionMerchantId" value="<?php echo property_exists($googleDetail,"merchant_id")?esc_attr($googleDetail->merchant_id):""; ?>">
|
846 |
<input type="hidden" id="subscriptionMerchantCenId" name="subscriptionMerchantCenId" value="<?php echo property_exists($googleDetail,"google_merchant_center_id")?esc_attr($googleDetail->google_merchant_center_id):""; ?>">
|
847 |
<input type="hidden" id="loginCustomerId" name="loginCustomerId" value="<?php echo esc_attr($login_customer_id); ?>">
|
853 |
</form>
|
854 |
</div>
|
855 |
<div class="stepnotewrp">
|
856 |
+
<?php printf('%s <a target="_blank" href="%s">here</a>. ',esc_html_e('If you are in the European Economic Area or Switzerland your Merchant Center account must be associated with a Comparison Shopping Service (CSS). Please find more information at Google Merchant Center Help website. If you create a new Merchant Center account through this application, it will be associated with Google Shopping, Google’s CSS, by default. You can change the CSS associated with your account at any time. Please find more information about our CSS Partners ','enhanced-e-commerce-for-woocommerce-store'), esc_url_raw("https://comparisonshoppingpartners.withgoogle.com/"));
|
857 |
+
esc_html_e('Once you have set up your Merchant Center account you can use our onboarding tool regardless of which CSS you use.','enhanced-e-commerce-for-woocommerce-store'); ?>
|
858 |
</div>
|
859 |
</div>
|
860 |
</div>
|
861 |
+
<!-- step-2 over -->
|
862 |
</div>
|
863 |
<!-- onborading left over -->
|
864 |
<!-- onborading right panel start -->
|
879 |
<li><a target="_blank" href="<?php echo esc_url_raw("https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/"); ?>" href=""><?php esc_html_e("FAQ","enhanced-e-commerce-for-woocommerce-store"); ?></a></li>
|
880 |
</ul>
|
881 |
</div>
|
882 |
+
<div class="onbrdr-msg">
|
883 |
<ul>
|
884 |
+
<li><?php esc_html_e('Feel free to contact us ','enhanced-e-commerce-for-woocommerce-store'); ?>
|
885 |
+
<a class="contct-lnk" target="_blank" href="<?php echo esc_url_raw("https://conversios.io/contact-us/?utm_source=app_woo&utm_medium=inapp&utm_campaign=pro_contact"); ?>" href=""><?php esc_html_e("here,","enhanced-e-commerce-for-woocommerce-store"); ?>
|
886 |
+
</a><?php esc_html_e(' if you face any issues in setting up the plugin.','enhanced-e-commerce-for-woocommerce-store'); ?>
|
887 |
</li>
|
888 |
</ul>
|
889 |
</div>
|
897 |
</div>
|
898 |
</div>
|
899 |
</div>
|
900 |
+
<!-- Google signin -->
|
901 |
+
<div class="pp-modal onbrd-popupwrp" id="tvc_google_signin" tabindex="-1" role="dialog">
|
902 |
<div class="onbrdppmain" role="document">
|
903 |
<div class="onbrdnpp-cntner acccretppcntnr">
|
904 |
+
<div class="onbrdnpp-hdr">
|
|
|
905 |
<div class="ppclsbtn clsbtntrgr"><img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/close-icon.png');?>" alt="" /></div>
|
906 |
</div>
|
907 |
<div class="onbrdpp-body">
|
908 |
+
<p>-- We recommend to use Chrome browser to configure the plugin if you face any issues during setup. --</p>
|
909 |
+
<div class="google_signin_sec_left">
|
910 |
+
<?php if(!isset($this->tvc_data['g_mail']) || $this->tvc_data['g_mail'] == "" || $this->subscriptionId == ""){?>
|
911 |
+
<div class="google_connect_url google-btn">
|
912 |
+
<div class="google-icon-wrapper">
|
913 |
+
<img class="google-icon" src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/g-logo.png'); ?>"/>
|
914 |
+
</div>
|
915 |
+
<p class="btn-text"><b><?php esc_html_e("Sign in with google","enhanced-e-commerce-for-woocommerce-store"); ?></b></p>
|
916 |
+
</div>
|
917 |
+
<?php } else{?>
|
918 |
+
<?php if($this->is_refresh_token_expire == true){?>
|
919 |
+
<p class="alert alert-primary"><?php esc_html_e("It seems the token to access your Google accounts is expired. Sign in again to continue.","enhanced-e-commerce-for-woocommerce-store"); ?></p>
|
920 |
+
<div class="google_connect_url google-btn">
|
921 |
+
<div class="google-icon-wrapper">
|
922 |
+
<img class="google-icon" src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/g-logo.png'); ?>"/>
|
923 |
+
</div>
|
924 |
+
<p class="btn-text"><b><?php esc_html_e("Sign in with google","enhanced-e-commerce-for-woocommerce-store"); ?></b></p>
|
925 |
+
</div>
|
926 |
+
<?php } else{ ?>
|
927 |
+
<div class="google_connect_url google-btn">
|
928 |
+
<div class="google-icon-wrapper">
|
929 |
+
<img class="google-icon" src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/g-logo.png'); ?>"/>
|
930 |
+
</div>
|
931 |
+
<p class="btn-text mr-35"><b><?php esc_html_e("Reauthorize","enhanced-e-commerce-for-woocommerce-store"); ?></b></p>
|
932 |
+
</div>
|
933 |
+
<?php } ?>
|
934 |
+
<?php } ?>
|
935 |
+
<p><?php esc_html_e("Make sure you sign in with the google email account that has all privileges to access google analytics, google ads and google merchant center account that you want to configure for your store.","enhanced-e-commerce-for-woocommerce-store"); ?></p>
|
936 |
+
</div>
|
937 |
+
<div class="google_signin_sec_right">
|
938 |
+
<h4><?php esc_html_e("Why do I need to sign in with google?","enhanced-e-commerce-for-woocommerce-store"); ?></h4>
|
939 |
+
<p><?php esc_html_e("When you sign in with Google, we ask for limited programmatic access for your accounts in order to automate below features for you:","enhanced-e-commerce-for-woocommerce-store"); ?></p>
|
940 |
+
<p><strong><?php esc_html_e("1. Google Analytics:","enhanced-e-commerce-for-woocommerce-store"); ?></strong><?php esc_html_e("To give you option to select GA accounts, to show actionable google analytics reports in plugin dashboard and to link your google ads account with google analytics account.","enhanced-e-commerce-for-woocommerce-store"); ?></p>
|
941 |
+
<p><strong><?php esc_html_e("2. Google Ads:","enhanced-e-commerce-for-woocommerce-store"); ?></strong><?php esc_html_e("To automate dynamic remarketing, conversion and enhanced conversion tracking and to create performance campaigns if required.","enhanced-e-commerce-for-woocommerce-store"); ?></p>
|
942 |
+
<p><strong><?php esc_html_e("3. Google Merchant Center:","enhanced-e-commerce-for-woocommerce-store"); ?></strong><?php esc_html_e("To automate product feed using content api and to set up your GMC account.","enhanced-e-commerce-for-woocommerce-store"); ?></p>
|
943 |
+
|
944 |
+
</div>
|
945 |
</div>
|
946 |
</div>
|
947 |
</div>
|
948 |
+
</div>
|
949 |
<!-- google ads poppup -->
|
950 |
<div id="ggladspopup" class="pp-modal onbrd-popupwrp ggladspp">
|
951 |
<div class="onbrdppmain">
|
1058 |
<div class="onbrdppmain">
|
1059 |
<div class="onbrdnpp-cntner congratppcntnr">
|
1060 |
<div class="onbrdnpp-hdr txtcnter">
|
1061 |
+
<h2><?php esc_html_e("All Set..!!","enhanced-e-commerce-for-woocommerce-store"); ?></h2>
|
1062 |
<div class="ppclsbtn clsbtntrgr"><img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/close-icon.png'); ?>" alt="" /></div>
|
1063 |
</div>
|
1064 |
<div class="onbrdpp-body congratppbody">
|
1065 |
+
<p><?php esc_html_e("You have successfully configured all the accounts for your WooCommerce store.","enhanced-e-commerce-for-woocommerce-store"); ?></p>
|
1066 |
+
<div class="congratppdtlwrp">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1067 |
</div>
|
1068 |
</div>
|
1069 |
<div class="ppfooterbtn">
|
1070 |
+
<button type="button" id="confirm_selection_dash" class="ppblubtn btn-w50"><?php esc_html_e("Go to Reporting Dashboard","enhanced-e-commerce-for-woocommerce-store");?> </button>
|
1071 |
+
<button type="button" id="confirm_selection" class="ppblubtn btn-w50"><?php esc_html_e("Sync your product for Google Shopping","enhanced-e-commerce-for-woocommerce-store"); ?></button>
|
1072 |
+
|
1073 |
+
<button type="button" id="confirm_selection_setting" class="ppblubtn btn-w50"><?php esc_html_e("Confirm GA & Pixel settings","enhanced-e-commerce-for-woocommerce-store"); ?></button>
|
1074 |
+
<a class="ppblubtn btn-w50" id="confirm_selection_validate_tracking" target="_blank" href="<?php echo esc_url_raw("https://conversios.io/help-center/how-to-validate-tracking.pdf"); ?>"><?php esc_html_e("See how to validate the tracking","enhanced-e-commerce-for-woocommerce-store"); ?></a>
|
1075 |
</div>
|
1076 |
</div>
|
1077 |
</div>
|
1078 |
</div>
|
1079 |
<?php
|
1080 |
+
$ua_acc_val=1; if(isset($googleDetail->ua_analytic_account_id) && $googleDetail->ua_analytic_account_id){$ua_acc_val=0;}
|
1081 |
+
$ga4_acc_val=1; if(isset($googleDetail->ga4_analytic_account_id) && $googleDetail->ga4_analytic_account_id){$ga4_acc_val=0;}
|
1082 |
+
$propId=1; if(isset($googleDetail->property_id) && $googleDetail->property_id){$propId=0;}
|
1083 |
+
$measurementId=1; if(isset($googleDetail->measurement_id) && $googleDetail->measurement_id){$measurementId=0;}
|
1084 |
+
$googleAds=1; if(isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id){$googleAds=0;}
|
1085 |
+
$gmc_field=1; if(isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id){$gmc_field=0;}
|
1086 |
?>
|
1087 |
<input type="hidden" id="ua_acc_val" value="<?php echo esc_attr($ua_acc_val); ?>">
|
1088 |
<input type="hidden" id="ga4_acc_val" value="<?php echo esc_attr($ga4_acc_val); ?>">
|
1164 |
|
1165 |
//Step-1
|
1166 |
jQuery(document).ready(function() {
|
1167 |
+
//GTM - want_to_use_your_gtm
|
1168 |
+
let want_to_use_your_gtm = jQuery("input[type=radio][name=want_to_use_your_gtm]:checked").attr("id");
|
1169 |
+
if(want_to_use_your_gtm != ""){
|
1170 |
+
jQuery(".slctunivr-filed_gtm").slideUp();
|
1171 |
+
jQuery("#htnl_"+want_to_use_your_gtm).slideDown();
|
1172 |
+
}
|
1173 |
+
jQuery("input[type=radio][name=want_to_use_your_gtm]").on( "change", function() {
|
1174 |
+
let want_to_use_your_gtm = jQuery(this).attr("id");
|
1175 |
+
//console.log(want_to_use_your_gtm);
|
1176 |
+
//is_validate_step("step_1");
|
1177 |
+
jQuery(".slctunivr-filed_gtm").slideUp();
|
1178 |
+
jQuery("#htnl_"+want_to_use_your_gtm).slideDown();
|
1179 |
+
});
|
1180 |
+
|
1181 |
+
|
1182 |
let tracking_option = jQuery('input[type=radio][name=analytic_tag_type]:checked').val();
|
1183 |
if(tracking_option != ""){
|
1184 |
jQuery(".slctunivr-filed").slideUp();
|
1185 |
jQuery("#"+tracking_option).slideDown();
|
1186 |
+
//is_validate_step("step_1");
|
1187 |
}
|
1188 |
let ua_page=2;
|
1189 |
jQuery('.tvc_load_more_acc').click(function(event){
|
1212 |
list_analytics_web_properties(type,tvc_data,account_id);
|
1213 |
}
|
1214 |
});
|
1215 |
+
//Step-2, only call firstime user login
|
1216 |
if(subscription_id != "" && googleAds == 1){
|
1217 |
list_googl_ads_account(tvc_data);
|
1218 |
}
|
|
|
1219 |
/*if(subscription_id != "" && gmc_field == 1 && googleAds == 0){
|
1220 |
list_google_merchant_account(tvc_data);
|
1221 |
}*/
|
1228 |
e.preventDefault();
|
1229 |
create_google_ads_account(tvc_data);
|
1230 |
jQuery('.ggladspp').removeClass('showpopup');
|
1231 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
1232 |
//Step - 3
|
1233 |
|
1234 |
jQuery("#tvc-gmc-acc-edit").on('click', function(e){
|
1242 |
//Click skip merchant center account on popup
|
1243 |
jQuery("#merchant-center-skip-continue").on('click', function(e){
|
1244 |
e.preventDefault();
|
1245 |
+
save_merchant_data("", "", tvc_data, subscription_id, plan_id, true );
|
|
|
|
|
|
|
|
|
1246 |
})
|
1247 |
//Click finish button
|
1248 |
jQuery("#step_3").on('click', function(e){
|
1256 |
if( google_merchant_center_id == null || google_merchant_center_id == "" ){
|
1257 |
jQuery('#tvc_merchant_center_skip_confirm').addClass('showpopup');
|
1258 |
jQuery('body').addClass('scrlnone');
|
1259 |
+
}else{
|
1260 |
+
save_merchant_data(google_merchant_center_id, merchant_id, tvc_data, subscription_id, plan_id, false );
|
|
|
|
|
|
|
|
|
1261 |
}
|
1262 |
+
cov_save_configration();
|
1263 |
})
|
1264 |
//option listner activity added here
|
1265 |
+
jQuery(document.body).on('click', 'option:not(.more)', function(event){
|
1266 |
+
var option_category = jQuery(this).attr('data-cat');
|
1267 |
+
if(option_category == "accounts"){
|
1268 |
+
//append values to parent dropdown
|
1269 |
+
//console.log("option_category",option_category);
|
1270 |
+
var text = jQuery(this).html();
|
1271 |
+
var account_id = jQuery(this).attr("value");
|
1272 |
+
var option_id = jQuery(this).parent().parent().attr("id");
|
1273 |
+
jQuery("#"+option_id+"_val").attr("data-val",account_id);
|
1274 |
+
jQuery("#"+option_id+"_val").attr("data-accountid",account_id);
|
1275 |
+
jQuery("#"+option_id+"_val").html(text);
|
1276 |
+
jQuery(this).parent().parent().toggle();
|
1277 |
+
//event.stopPropagation();
|
1278 |
+
//call second api
|
1279 |
+
var type='';
|
1280 |
+
//console.log("option_id",option_id);
|
1281 |
+
if(option_id == 'ua_account_id_option' || option_id == 'both_ua_account_id_option'){
|
1282 |
+
type="UA";
|
1283 |
+
}else if(option_id == 'ga4_account_id_option' ||option_id == 'both_ga4_account_id_option'){
|
1284 |
+
type="GA4";
|
1285 |
+
}
|
1286 |
+
if(type != "" && account_id != ""){
|
1287 |
+
list_analytics_web_properties(type,tvc_data,account_id);
|
1288 |
+
}
|
1289 |
+
if(account_id == ""){
|
1290 |
+
if(type == "GA4"){
|
1291 |
+
jQuery('#both_ga4_web_measurement_id_option_val').html('Select Measurement Id');
|
1292 |
+
jQuery('#both_ga4_web_measurement_id_option_val').attr("data-val","");
|
1293 |
+
jQuery('#both_ga4_web_measurement_id_option_val').attr("data-name","");
|
1294 |
+
jQuery('#both_ga4_web_measurement_id_option_val').attr("data-accountid","");
|
|
|
1295 |
|
1296 |
+
jQuery('#ga4_web_measurement_id_option_val').html('Select Measurement Id');
|
1297 |
+
jQuery('#ga4_web_measurement_id_option_val').attr("data-val","");
|
1298 |
+
jQuery('#ga4_web_measurement_id_option_val').attr("data-name","");
|
1299 |
+
jQuery('#ga4_web_measurement_id_option_val').attr("data-accountid","");
|
|
|
1300 |
|
1301 |
+
jQuery('#ga4_web_measurement_id_option > .tvc-select-items').html(''); //GA4
|
1302 |
+
jQuery('#both_ga4_web_measurement_id_option > .tvc-select-items').html(''); //Both GA4
|
|
|
|
|
1303 |
|
1304 |
+
jQuery("#both-tvc-ga4-acc-edit").hide();
|
1305 |
+
jQuery("#tvc-ga4-web-edit").hide();
|
1306 |
+
}
|
1307 |
+
if(type == "UA"){
|
1308 |
+
jQuery('#ua_web_property_id_option_val').html('Select Property Id');
|
1309 |
+
jQuery('#ua_web_property_id_option_val').attr("data-val","");
|
1310 |
+
jQuery('#ua_web_property_id_option_val').attr("data-profileid","");
|
1311 |
+
jQuery('#ua_web_property_id_option_val').attr("data-accountid","");
|
1312 |
+
|
1313 |
+
jQuery('#both_ua_web_property_id_option_val').html('Select Property Id');
|
1314 |
+
jQuery('#both_ua_web_property_id_option_val').attr("data-val","");
|
1315 |
+
jQuery('#both_ua_web_property_id_option_val').attr("data-profileid","");
|
1316 |
+
jQuery('#both_ua_web_property_id_option_val').attr("data-accountid","");
|
1317 |
+
|
1318 |
+
jQuery('#ua_web_property_id_option > .tvc-select-items').html(''); //GA3
|
1319 |
+
jQuery('#both_ua_web_property_id_option > .tvc-select-items').html(''); //BOTH GA3
|
1320 |
+
jQuery("#both-tvc-ua-acc-edit").hide();
|
1321 |
+
jQuery("#tvc-ua-web-edit").hide();
|
1322 |
+
}
|
1323 |
+
}
|
1324 |
+
}else if(option_category == "webProperties" || option_category == "dataStreams" ){
|
1325 |
+
var option_id = jQuery(this).parent().parent().attr("id");
|
1326 |
+
var val = jQuery(this).attr("value");
|
1327 |
+
var accountid = jQuery(this).attr("data-accountid");
|
1328 |
+
var text = jQuery(this).html();
|
1329 |
+
let tracking_option = jQuery('input:radio[name=analytic_tag_type]:checked').val();
|
1330 |
+
|
1331 |
+
if(tracking_option == "UA" || (tracking_option == "BOTH" && option_id == "both_ua_web_property_id_option")){
|
1332 |
+
var profileid = jQuery(this).attr("data-profileid");
|
1333 |
+
profileid = (profileid == undefined)?"":profileid;
|
1334 |
+
accountid = (accountid == undefined)?"":accountid;
|
1335 |
+
//console.log(accountid+"="+profileid);
|
1336 |
+
|
1337 |
+
jQuery("#"+option_id+"_val").html(text);
|
1338 |
+
jQuery("#"+option_id+"_val").attr("data-accountid",accountid);
|
1339 |
+
jQuery("#"+option_id+"_val").attr("data-profileid",profileid);
|
1340 |
+
jQuery("#"+option_id+"_val").attr("data-val",val);
|
1341 |
+
|
1342 |
+
}else if(tracking_option == "GA4" || (tracking_option == "BOTH" && option_id == "both_ga4_web_measurement_id_option") ){
|
1343 |
+
var name = jQuery(this).attr("data-name");
|
1344 |
+
name = (name == undefined)?"":name;
|
1345 |
+
accountid = (accountid == undefined)?"":accountid;
|
1346 |
+
jQuery("#"+option_id+"_val").html(text);
|
1347 |
+
jQuery("#"+option_id+"_val").attr("data-accountid",accountid);
|
1348 |
+
jQuery("#"+option_id+"_val").attr("data-name",name);
|
1349 |
+
jQuery("#"+option_id+"_val").attr("data-val",val);
|
1350 |
+
}
|
1351 |
+
jQuery(this).parent().parent().toggle();
|
1352 |
+
validate_google_analytics_sel();
|
1353 |
+
event.stopPropagation();
|
1354 |
+
}
|
1355 |
+
});
|
1356 |
+
//Final save
|
1357 |
+
function cov_save_configration(){
|
1358 |
+
var conversios_onboarding_nonce = jQuery("#conversios_onboarding_nonce").val();
|
1359 |
var tracking_option = jQuery('input[type=radio][name=analytic_tag_type]:checked').val();
|
1360 |
+
|
1361 |
+
//GTM setting
|
1362 |
+
var tracking_method = jQuery("#tracking_method").val();
|
1363 |
+
var want_to_use_your_gtm = jQuery("#want_to_use_your_gtm").val();
|
1364 |
+
var use_your_gtm_id = jQuery("#use_your_gtm_id").val();
|
1365 |
+
|
1366 |
+
//pixel settings
|
1367 |
+
var fb_pixel_id = jQuery("#fb_pixel_id").val();
|
1368 |
+
var microsoft_ads_pixel_id = jQuery("#microsoft_ads_pixel_id").val();
|
1369 |
+
var pinterest_ads_pixel_id = jQuery("#pinterest_ads_pixel_id").val();
|
1370 |
+
var snapchat_ads_pixel_id = jQuery("#snapchat_ads_pixel_id").val();
|
1371 |
+
var tiKtok_ads_pixel_id = jQuery("#tiKtok_ads_pixel_id").val();
|
1372 |
+
var twitter_ads_pixel_id = jQuery("#twitter_ads_pixel_id").val();
|
1373 |
+
|
1374 |
+
var ga_ec = jQuery("#ga_EC").val();
|
1375 |
+
|
1376 |
var view_id = "";
|
1377 |
add_message("warning","Processing... Do not refresh.",false);
|
1378 |
if(tracking_option == "UA"){
|
1384 |
type: "POST",
|
1385 |
dataType: "json",
|
1386 |
url: tvc_ajax_url,
|
1387 |
+
data: {action: "update_setup_time_to_subscription", tvc_data:tvc_data, subscription_id:subscription_id, ga_view_id:ga_view_id, ga_ec:ga_ec, tracking_method:tracking_method, want_to_use_your_gtm:want_to_use_your_gtm, use_your_gtm_id:use_your_gtm_id, fb_pixel_id:fb_pixel_id, microsoft_ads_pixel_id:microsoft_ads_pixel_id, pinterest_ads_pixel_id:pinterest_ads_pixel_id, snapchat_ads_pixel_id:snapchat_ads_pixel_id, tiKtok_ads_pixel_id:tiKtok_ads_pixel_id, twitter_ads_pixel_id:twitter_ads_pixel_id, conversios_onboarding_nonce:conversios_onboarding_nonce},
|
1388 |
beforeSend: function () {
|
1389 |
loaderSection(true);
|
1390 |
},
|
1391 |
success: function (response) {
|
1392 |
+
show_conform_popup();
|
1393 |
//console.log(response);
|
1394 |
+
/*if (response.error === false) {
|
1395 |
+
//var error_msg = 'null';
|
1396 |
+
|
|
|
|
|
|
|
|
|
|
|
1397 |
//user_tracking_data('complate_onboard', error_msg,'conversios_onboarding','Confirm_to_Finish_the_Onboarding_process');
|
1398 |
}else{
|
1399 |
//user_tracking_data('complate_onboard', response.errors,'conversios_onboarding','Confirm_to_Finish_the_Onboarding_process');
|
1400 |
+
|
1401 |
+
}*/
|
1402 |
+
loaderSection(false);
|
1403 |
}
|
1404 |
});
|
1405 |
+
}
|
1406 |
+
//Click confirm button on confirm popup
|
1407 |
+
jQuery('#confirm_selection, #confirm_selection_dash, #confirm_selection_setting, #confirm_selection_validate_tracking').on('click', function(e){
|
1408 |
+
var this_id = jQuery(this).attr("id");
|
1409 |
+
if(this_id == "confirm_selection_dash"){
|
1410 |
+
location.replace( "admin.php?page=conversios");
|
1411 |
+
}else if(this_id == "confirm_selection_setting"){
|
1412 |
+
location.replace( "admin.php?page=conversios-google-analytics");
|
1413 |
+
}else if(this_id == "confirm_selection"){
|
1414 |
+
location.replace( "admin.php?page=conversios-google-shopping-feed");
|
1415 |
}else{
|
1416 |
+
location.replace( "admin.php?page=conversios-google-analytics");
|
1417 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1418 |
});
|
|
|
1419 |
/**
|
1420 |
* Convesios defoult html script
|
1421 |
*/
|
1441 |
jQuery(this).on("click", function(event){
|
1442 |
var step =jQuery(this).attr("id");
|
1443 |
//step 1 next button call
|
1444 |
+
if(step == "step_1"){
|
1445 |
+
let tracking_option = jQuery('input[type=radio][name=analytic_tag_type]:checked').val();
|
1446 |
+
/*Google analytics - Google Ads save*/
|
1447 |
+
let google_ads_id = jQuery("#new_google_ads_id").text();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1448 |
if(google_ads_id ==null || google_ads_id ==""){
|
1449 |
google_ads_id = jQuery('#ads-account').val();
|
1450 |
}
|
1451 |
+
|
1452 |
+
if(save_google_ga_ads_data(google_ads_id, tvc_data, subscription_id, tracking_option )){
|
1453 |
go_next(this);
|
1454 |
+
}
|
1455 |
+
|
1456 |
+
list_google_merchant_account(tvc_data);
|
1457 |
+
}
|
1458 |
});
|
1459 |
});
|
1460 |
|
1461 |
});
|
1462 |
jQuery('.slctunivr-filed').slideUp();
|
1463 |
+
|
|
|
1464 |
function go_next(next_this){
|
1465 |
jQuery(next_this).closest('.onbordording.-step').find('.stepdtltop').attr("data-is-done","1");
|
1466 |
jQuery(next_this).closest('.onbordording-step').addClass('selectedactivestep');
|
1467 |
jQuery(next_this).closest('.onbordording-step').removeClass('activestep');
|
1468 |
jQuery( next_this ).closest('.onbordording-step').next('.onbordording-step').addClass('activestep');
|
1469 |
+
$('html, body').animate({
|
1470 |
+
scrollTop: jQuery( next_this ).closest('.onbordording-step').next('.onbordording-step').offset().top-80
|
1471 |
+
}, 2000);
|
1472 |
}
|
1473 |
</script>
|
1474 |
<script>
|
1479 |
<!-- popup script -->
|
1480 |
<script>
|
1481 |
jQuery(document).ready(function() {
|
1482 |
+
|
1483 |
+
//open new google ads account popup
|
1484 |
jQuery(".newggladsbtn").on( "click", function() {
|
1485 |
jQuery('.ggladspp').addClass('showpopup');
|
1486 |
jQuery('body').addClass('scrlnone');
|
1488 |
|
1489 |
//close any poup whie click on out side
|
1490 |
jQuery('body').click(function(evt){
|
1491 |
+
if(jQuery(evt.target).closest('#step_2, .cretnewbtn, .finishbtn, .onbrdnpp-cntner, .crtemrchntpp .onbrdppmain, .tvc_google_signinbtn').length){
|
1492 |
+
return;
|
1493 |
+
}
|
1494 |
jQuery('.onbrd-popupwrp').removeClass('showpopup');
|
1495 |
jQuery('body').removeClass('scrlnone');
|
1496 |
});
|
1499 |
jQuery(this).closest('.onbrd-popupwrp').removeClass('showpopup');
|
1500 |
jQuery('body').removeClass('scrlnone');
|
1501 |
});
|
1502 |
+
//open google signin popup
|
1503 |
+
jQuery(".tvc_google_signinbtn").on( "click", function() {
|
1504 |
+
jQuery('#tvc_google_signin').addClass('showpopup');
|
1505 |
+
jQuery('body').addClass('scrlnone');
|
1506 |
+
});
|
1507 |
+
jQuery(document).on('change','#tracking_method',function(event){
|
1508 |
+
if(jQuery(this).val() != "gtm"){
|
1509 |
+
jQuery(".only-for-gtm").addClass("tvc-hide");
|
1510 |
+
jQuery(".only-for-gtm-lock").val("");
|
1511 |
+
jQuery(".only-for-gtm-lock").prop('disabled', true);
|
1512 |
+
}else{
|
1513 |
+
jQuery(".only-for-gtm").removeClass("tvc-hide");
|
1514 |
+
jQuery(".only-for-gtm-lock").prop('disabled', false);
|
1515 |
+
}
|
1516 |
+
});
|
1517 |
/*
|
1518 |
jQuery(".sndinvitebtn").on( "click", function() {
|
1519 |
|
admin/class-enhanced-ecommerce-google-analytics-admin.php
CHANGED
@@ -48,104 +48,6 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
|
|
48 |
$this->version = $version;
|
49 |
$this->google_detail = $this->get_ee_options_data();
|
50 |
}
|
51 |
-
public function tvc_admin_notice(){
|
52 |
-
// add fixed message notification
|
53 |
-
//$this->add_tvc_fixed_nofification();
|
54 |
-
$ee_settings = unserialize(get_option('ee_options'));
|
55 |
-
$ee_additional_data = $this->get_ee_additional_data();
|
56 |
-
if(isset($ee_additional_data['dismissed_ee_adimin_notic_a']) && $ee_additional_data['dismissed_ee_adimin_notic_a'] == 1){
|
57 |
-
}else{
|
58 |
-
if(!$this->get_subscriptionId()){
|
59 |
-
echo '<div class="notice notice-info is-dismissible con-admn-notice" data-id="ee_adimin_notic_a">
|
60 |
-
<p>'. esc_html__("Tatvic EE plugin is now fully compatible with Google Analytics 4. Also, explore the new features of Google Shopping and Dynamic remarketing to reach million of shoppers across Google and scale your eCommerce business faster.","enhanced-e-commerce-for-woocommerce-store").' <a href="'.esc_url_raw('admin.php?page=conversios').'"><b><u>'. esc_html__("CONFIGURE NOW","enhanced-e-commerce-for-woocommerce-store").'</u></b></a></p>
|
61 |
-
</div>';
|
62 |
-
}
|
63 |
-
}
|
64 |
-
if(isset($ee_additional_data['dismissed_ee_adimin_notic_b']) && $ee_additional_data['dismissed_ee_adimin_notic_b'] == 1){
|
65 |
-
}else{
|
66 |
-
$google_detail = $this->get_ee_options_data();
|
67 |
-
if(isset($google_detail['setting']) && $google_detail['setting']){
|
68 |
-
$googleDetail = $google_detail['setting'];
|
69 |
-
if(isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id =="" && $this->subscriptionId != "" ){
|
70 |
-
echo '<div class="notice notice-info is-dismissible con-admn-notice" data-id="ee_adimin_notic_b">
|
71 |
-
<p>'. esc_html__("Leverage the power of Google Shopping to reach out millions of shoppers across Google. Automate entire Google Shopping and get eligible for free listing when user searches on Google for products similar to your eCommerce business.","enhanced-e-commerce-for-woocommerce-store").' <a href="'.esc_url_raw('admin.php?page=conversios').'"><b><u>'. esc_html__("Automate now","enhanced-e-commerce-for-woocommerce-store").'</u></b></a></p>
|
72 |
-
</div>';
|
73 |
-
|
74 |
-
}
|
75 |
-
}
|
76 |
-
}
|
77 |
-
if(isset($ee_additional_data['dismissed_ee_adimin_notic_c']) && $ee_additional_data['dismissed_ee_adimin_notic_c'] == 1){
|
78 |
-
}else{
|
79 |
-
echo '<div class="notice notice-info is-dismissible con-admn-notice" data-id="ee_adimin_notic_c">
|
80 |
-
<p>'. esc_html__("Now access important eCommerce KPIs and Google Ads campaign performance data directly in your wordpress backend to improve your marketing ROI.","enhanced-e-commerce-for-woocommerce-store").' <a href="'.esc_url_raw('admin.php?page=conversios').'"><b><u>'. esc_html__("View it from here.","enhanced-e-commerce-for-woocommerce-store").'</u></b></a></p>
|
81 |
-
</div>';
|
82 |
-
|
83 |
-
}
|
84 |
-
$fb_pixel_id = isset($ee_settings['fb_pixel_id'])?$ee_settings['fb_pixel_id']:"";
|
85 |
-
if(isset($ee_additional_data['dismissed_ee_adimin_notic_d']) && $ee_additional_data['dismissed_ee_adimin_notic_d'] == 1){
|
86 |
-
|
87 |
-
}else{
|
88 |
-
|
89 |
-
if($fb_pixel_id == ""){
|
90 |
-
echo '<div class="notice notice-info is-dismissible con-admn-notice" data-id="ee_adimin_notic_d">
|
91 |
-
<img style="float: left; height: 45px;" src="'.esc_url_raw(ENHANCAD_PLUGIN_URL . "/admin/images/fb-pixel.jpg").'" ><p style="line-height: 28px; margin-left: 5px; display: inline-block;">'. esc_html__("Introducing the all-new Facebook Pixel Tracking in Conversios today!","enhanced-e-commerce-for-woocommerce-store").' <a href="'.esc_url_raw('admin.php?page=conversios-google-analytics#fb_pixel_id').'"><b><u>'. esc_html__(" Check it out for yourself.","enhanced-e-commerce-for-woocommerce-store").'</u></b></a></p>
|
92 |
-
</div>';
|
93 |
-
}
|
94 |
-
}
|
95 |
-
|
96 |
-
if(isset($ee_additional_data['dismissed_ee_adimin_notic_e']) && $ee_additional_data['dismissed_ee_adimin_notic_e'] == 1){
|
97 |
-
}else if(( isset($ee_additional_data['dismissed_ee_adimin_notic_d']) && $ee_additional_data['dismissed_ee_adimin_notic_d'] == 1) || $fb_pixel_id != ""){
|
98 |
-
$gm_id = isset($ee_settings['gm_id'])?$ee_settings['gm_id']:"";
|
99 |
-
if($gm_id != ""){
|
100 |
-
echo '<div class="notice notice-info is-dismissible con-admn-notice" data-id="ee_adimin_notic_e">
|
101 |
-
<img style="float: left; height: 45px;" src="'.esc_url_raw(ENHANCAD_PLUGIN_URL . "/admin/images/icon-dashboard.jpg").'" ><p style="line-height: 28px; margin-left: 5px; display: inline-block;">'. esc_html__("Your GA4 Dashboard is just a click away !","enhanced-e-commerce-for-woocommerce-store").' <a href="'.esc_url_raw('admin.php?page=conversios&ga_type=ga4').'"><b><u>'. esc_html__(" Go to GA4 Dashboard.","enhanced-e-commerce-for-woocommerce-store").'</u></b></a></p>
|
102 |
-
</div>';
|
103 |
-
}
|
104 |
-
}
|
105 |
-
|
106 |
-
if(isset($ee_additional_data['dismissed_ee_adimin_notic_f']) && $ee_additional_data['dismissed_ee_adimin_notic_f'] == 1){
|
107 |
-
}else {
|
108 |
-
echo '<div class="notice notice-info is-dismissible con-admn-notice" data-id="ee_adimin_notic_f"><p style="line-height: 28px; margin-left: 5px; display: inline-block;">'. esc_html__("Grow your business with Performance Max Campaigns. You can create a campaign through our plugin with just a few clicks, and promote products across Google Platforms,","enhanced-e-commerce-for-woocommerce-store").' <a href="'.esc_url_raw('admin.php?page=conversios-pmax').'"><b><u>'. esc_html__(" Try now.","enhanced-e-commerce-for-woocommerce-store").'</u></b></a></p>
|
109 |
-
</div>';
|
110 |
-
|
111 |
-
}
|
112 |
-
?>
|
113 |
-
<script>
|
114 |
-
var tvc_ajax_url = '<?php echo esc_url_raw(admin_url( 'admin-ajax.php' )); ?>';
|
115 |
-
(function( $ ) {
|
116 |
-
jQuery( function() {
|
117 |
-
jQuery( '.notice.con-admn-notice' ).on( 'click', '.notice-dismiss', function( event, el ) {
|
118 |
-
var ee_notice_dismiss_id = jQuery(this).parent('.is-dismissible').attr("data-id");
|
119 |
-
jQuery.post(tvc_ajax_url,{
|
120 |
-
action: "tvc_call_notice_dismiss",
|
121 |
-
data:{ee_notice_dismiss_id:ee_notice_dismiss_id},
|
122 |
-
dataType: "json"
|
123 |
-
},function( response ){
|
124 |
-
});
|
125 |
-
});
|
126 |
-
});
|
127 |
-
})( jQuery );
|
128 |
-
</script>
|
129 |
-
|
130 |
-
<script>
|
131 |
-
var tvc_ajax_url = '<?php echo esc_url_raw(admin_url( 'admin-ajax.php' )); ?>';
|
132 |
-
(function( $ ) {
|
133 |
-
jQuery( function() {
|
134 |
-
jQuery( '.notice-dismiss_trigger' ).on( 'click', '.notice-dismiss', function( event, el ) {
|
135 |
-
var ee_notice_dismiss_id_trigger = jQuery(this).parent('.is-dismissible').attr("data-id");
|
136 |
-
jQuery.post(tvc_ajax_url,{
|
137 |
-
action: "tvc_call_notice_dismiss_trigger",
|
138 |
-
data:{ee_notice_dismiss_id_trigger:ee_notice_dismiss_id_trigger},
|
139 |
-
dataType: "json"
|
140 |
-
},function( response ){
|
141 |
-
});
|
142 |
-
});
|
143 |
-
});
|
144 |
-
})( jQuery );
|
145 |
-
</script>
|
146 |
-
<?php
|
147 |
-
}
|
148 |
-
|
149 |
|
150 |
/**
|
151 |
* Register the stylesheets for the admin area.
|
48 |
$this->version = $version;
|
49 |
$this->google_detail = $this->get_ee_options_data();
|
50 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
/**
|
53 |
* Register the stylesheets for the admin area.
|
admin/class-tvc-admin-helper.php
CHANGED
@@ -56,11 +56,8 @@ Class TVC_Admin_Helper{
|
|
56 |
add_filter('sanitize_option_tvc_tracked_refund', array($this, 'sanitize_option_ee_general'), 10, 2);
|
57 |
}
|
58 |
|
59 |
-
public function sanitize_meta_ee_number($value){
|
60 |
$value = (int) $value;
|
61 |
-
if ( empty( $value ) ) {
|
62 |
-
$value = 1;
|
63 |
-
}
|
64 |
if ( $value < -1 ) {
|
65 |
$value = abs( $value );
|
66 |
}
|
@@ -257,11 +254,8 @@ Class TVC_Admin_Helper{
|
|
257 |
}
|
258 |
}
|
259 |
$syncProductStat = array("total" =>0, "approved" => 0, "disapproved" => 0, "pending" => 0 );
|
260 |
-
$google_detail_t = $this->get_ee_options_data();
|
261 |
-
//print_r($google_detail_t);
|
262 |
$prod_sync_status = isset($google_detail_t["prod_sync_status"])?$google_detail_t["prod_sync_status"]:$syncProductStat;
|
263 |
-
//print_r($prod_sync_status);
|
264 |
-
//exit;
|
265 |
$this->set_ee_options_data(array("setting" => $googleDetail, "prod_sync_status" => (object) $prod_sync_status, "campaigns_list"=>$campaigns_list, "sync_time"=>current_time( 'timestamp' )));
|
266 |
return array("error"=>false, "message"=>esc_html__("Details updated successfully.","enhanced-e-commerce-for-woocommerce-store"));
|
267 |
}
|
@@ -1060,6 +1054,15 @@ Class TVC_Admin_Helper{
|
|
1060 |
return "https://conversios.io/";
|
1061 |
}
|
1062 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1063 |
public function is_ga_property(){
|
1064 |
$data = $this->get_ee_options_settings();
|
1065 |
$is_connected = false;
|
@@ -1115,48 +1118,113 @@ Class TVC_Admin_Helper{
|
|
1115 |
|
1116 |
public function tvc_display_admin_notices(){
|
1117 |
$ee_additional_data = $this->get_ee_additional_data();
|
1118 |
-
if(isset($ee_additional_data['admin_notices'])&& !empty($ee_additional_data['admin_notices'])){
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1123 |
</div>';
|
|
|
1124 |
}
|
1125 |
}
|
1126 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1127 |
}
|
1128 |
//tvc_add_data_admin_notice function for adding the admin notices
|
1129 |
-
public function tvc_add_admin_notice($slug, $
|
1130 |
$ee_additional_data = $this->get_ee_additional_data();
|
1131 |
if(!isset($ee_additional_data['admin_notices'][$slug])){
|
1132 |
-
$ee_additional_data['admin_notices'][$slug] = array("link_title"=>$link_title,"content"=>$content,"status"=> $status,"title"=>$title, "value"=> $value,"link"=>$link );
|
1133 |
$this->set_ee_additional_data($ee_additional_data);
|
1134 |
}
|
1135 |
}
|
1136 |
//tvc_dismiss_admin_notice function for dismissing the admin notices
|
1137 |
-
public function tvc_dismiss_admin_notice($slug, $
|
1138 |
$ee_additional_data = $this->get_ee_additional_data();
|
1139 |
-
if(isset($ee_additional_data['admin_notices'][$slug])){
|
1140 |
$ee_additional_data['admin_notices'][$slug] = array("title"=>$title,"content"=>$content,"status"=> $status, "value"=> $value);
|
1141 |
$this->set_ee_additional_data($ee_additional_data);
|
1142 |
}
|
1143 |
}
|
1144 |
public function tvc_add_data_admin_notice(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1145 |
$tvc_add_data_admin_notice = $this->get_ee_options_settings();
|
1146 |
$con_subscription_id = $this->get_subscriptionId();
|
1147 |
-
//when user google signed in
|
1148 |
/*GTM release notice*/
|
1149 |
$link_title = "Set it up in a single click..!!!!";
|
1150 |
$link = "admin.php?page=conversios_onboarding";
|
1151 |
$content = "NEW FEATURE - Now automate Facebook, Snapchat, Tiktok, Pinterest, Microsoft Ads, Google Ads pixels using Conversios's faster and accurate Google Tag Manager implementation.";
|
1152 |
$status = "1";
|
1153 |
-
$this->tvc_add_admin_notice("implementation_gatm_tracking", $
|
1154 |
-
|
1155 |
if($con_subscription_id != "" && $con_subscription_id != null ){
|
1156 |
$link_title = "User Manual Guide";
|
1157 |
$content = "You have not linked Google Analytics, Google Ads and Google Merchant Center accounts with Conversios plugin. Set up the conversios plugin now and boost your sales. Refer User Manual guide to get started,";
|
1158 |
$status = "0";
|
1159 |
-
$this->tvc_dismiss_admin_notice("no_google_signin"
|
1160 |
//getting the review from user.
|
1161 |
if(!isset($_POST['conversios_onboarding_nonce'])){
|
1162 |
$ee_additional_data = $this->get_ee_additional_data();
|
@@ -1171,7 +1239,7 @@ Class TVC_Admin_Helper{
|
|
1171 |
$content = "You have successfully started recording all the important ecommerce events in Google Analytics account using Conversios plugin. Let us know your experience by sharing your";
|
1172 |
$status = "1";
|
1173 |
$link = "https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/#reviews";
|
1174 |
-
$this->tvc_add_admin_notice("review_for_days" , $
|
1175 |
}else if(isset($ee_additional_data['con_created_at']) && $ee_additional_data['con_created_at'] != ''){
|
1176 |
//existing user if created date is available
|
1177 |
$current_date = date('Y-m-d');
|
@@ -1184,7 +1252,7 @@ Class TVC_Admin_Helper{
|
|
1184 |
$content = "You have successfully started recording all the important ecommerce events in Google Analytics account using Conversios plugin. Let us know your experience by sharing your";
|
1185 |
$status = "1";
|
1186 |
$link = "https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/#reviews";
|
1187 |
-
$this->tvc_add_admin_notice("review_for_days" , $
|
1188 |
}
|
1189 |
}
|
1190 |
}
|
@@ -1193,12 +1261,14 @@ Class TVC_Admin_Helper{
|
|
1193 |
$link_title = "Link Google Merchant account";
|
1194 |
$content = "You have not linked Google Merchant Account account with conversios plugin yet. Increase your sales by linking the Google Merchant Account, Refer the user manual to link the account";
|
1195 |
$status = "1";
|
1196 |
-
$
|
|
|
1197 |
}else{
|
1198 |
$link_title = "Link Google Merchant account";
|
1199 |
$content = "You have not linked Google Merchant Account account with conversios plugin yet. Increase your sales by linking the Google Merchant Account, Refer the user manual to link the account";
|
1200 |
$status = "0";
|
1201 |
-
$
|
|
|
1202 |
}
|
1203 |
//if user has not selected Google Ads account.
|
1204 |
if(!isset($tvc_add_data_admin_notice['google_ads_id']) || (isset($tvc_add_data_admin_notice['google_ads_id']) && $tvc_add_data_admin_notice['google_ads_id'] == '')){
|
@@ -1206,48 +1276,36 @@ Class TVC_Admin_Helper{
|
|
1206 |
$content = "You have not linked Google Ads account with conversios plugin yet. Increase your sales by linking the Google Ads account, Refer the user manual to link the account";
|
1207 |
$status = "1";
|
1208 |
$link = "admin.php?page=conversios_onboarding";
|
1209 |
-
$this->tvc_add_admin_notice("no_google_ads_account" , $
|
1210 |
}else{
|
1211 |
$link_title = "Link Google Ads account";
|
1212 |
$content = "You have not linked Google Ads account with conversios plugin yet. Increase your sales by linking the Google Ads account, Refer the user manual to link the account";
|
1213 |
$status = "0";
|
1214 |
-
$this->tvc_dismiss_admin_notice("no_google_ads_account"
|
1215 |
-
}
|
1216 |
-
//if user has not selected GA4 account.
|
1217 |
-
if(!isset($tvc_add_data_admin_notice['gm_id']) || (isset($tvc_add_data_admin_notice['gm_id']) && $tvc_add_data_admin_notice['gm_id'] == '')){
|
1218 |
-
$link_title = "Link Google Analytics 4 account";
|
1219 |
-
$content = "You have not linked Google Analytics 4 account with conversios plugin yet. Increase your sales by linking the Google Analytics 4 account, Refer the user manual to link the account";
|
1220 |
-
$status = "1";
|
1221 |
-
$link = "admin.php?page=conversios_onboarding";
|
1222 |
-
$this->tvc_add_admin_notice("no_ga4_account" , $link_title , $content, $status, $link);
|
1223 |
-
}else{
|
1224 |
-
$link_title = "Link Google Analytics 4 account";
|
1225 |
-
$content = "You have not linked Google Analytics 4 account with conversios plugin yet. Increase your sales by linking the Google Analytics 4 account, Refer the user manual to link the account";
|
1226 |
-
$status = "0";
|
1227 |
-
$this->tvc_dismiss_admin_notice("no_ga4_account", $link_title, $content, $status);
|
1228 |
}
|
1229 |
-
//if user has not selected
|
1230 |
-
if(!isset($tvc_add_data_admin_notice['ga_id']) || (isset($tvc_add_data_admin_notice['ga_id']) && $tvc_add_data_admin_notice['ga_id'] == '')){
|
1231 |
$link_title = "Link Google Analytics account";
|
1232 |
$content = "You have not linked Google Analytics account with conversios plugin yet. Increase your sales by linking the Google Analytics account, Refer the user manual to link the account";
|
1233 |
$status = "1";
|
1234 |
$link = "admin.php?page=conversios_onboarding";
|
1235 |
-
$this->tvc_add_admin_notice("no_ga_account" , $
|
1236 |
}else{
|
1237 |
-
|
1238 |
$content = "You have not linked Google Analytics account with conversios plugin yet. Increase your sales by linking the Google Analytics account, Refer the user manual to link the account";
|
1239 |
$status = "0";
|
1240 |
-
$this->tvc_dismiss_admin_notice("no_ga_account", $
|
1241 |
}
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
}
|
|
|
1251 |
/*
|
1252 |
* conver curency code to currency symbols
|
1253 |
*/
|
56 |
add_filter('sanitize_option_tvc_tracked_refund', array($this, 'sanitize_option_ee_general'), 10, 2);
|
57 |
}
|
58 |
|
59 |
+
public function sanitize_meta_ee_number($value){
|
60 |
$value = (int) $value;
|
|
|
|
|
|
|
61 |
if ( $value < -1 ) {
|
62 |
$value = abs( $value );
|
63 |
}
|
254 |
}
|
255 |
}
|
256 |
$syncProductStat = array("total" =>0, "approved" => 0, "disapproved" => 0, "pending" => 0 );
|
257 |
+
$google_detail_t = $this->get_ee_options_data();
|
|
|
258 |
$prod_sync_status = isset($google_detail_t["prod_sync_status"])?$google_detail_t["prod_sync_status"]:$syncProductStat;
|
|
|
|
|
259 |
$this->set_ee_options_data(array("setting" => $googleDetail, "prod_sync_status" => (object) $prod_sync_status, "campaigns_list"=>$campaigns_list, "sync_time"=>current_time( 'timestamp' )));
|
260 |
return array("error"=>false, "message"=>esc_html__("Details updated successfully.","enhanced-e-commerce-for-woocommerce-store"));
|
261 |
}
|
1054 |
return "https://conversios.io/";
|
1055 |
}
|
1056 |
|
1057 |
+
public function is_show_tracking_method_options($subscription_id = 0){
|
1058 |
+
if($subscription_id > 0 && $subscription_id <= 31200){
|
1059 |
+
return true;
|
1060 |
+
}else{
|
1061 |
+
return false;
|
1062 |
+
}
|
1063 |
+
|
1064 |
+
}
|
1065 |
+
|
1066 |
public function is_ga_property(){
|
1067 |
$data = $this->get_ee_options_settings();
|
1068 |
$is_connected = false;
|
1118 |
|
1119 |
public function tvc_display_admin_notices(){
|
1120 |
$ee_additional_data = $this->get_ee_additional_data();
|
1121 |
+
if(isset($ee_additional_data['admin_notices']) && !empty($ee_additional_data['admin_notices'])){
|
1122 |
+
$static_notice_priority = array("no_google_signin"=>"1","no_ga_account"=>"2","no_google_ads_account"=>"3","review_for_days"=>"4","no_merchant_account"=>"5","created_googleads_account"=>"6","created_merchant_account"=>"7","implementation_gatm_tracking"=>"8");
|
1123 |
+
$display_arr = array();
|
1124 |
+
foreach($ee_additional_data['admin_notices'] as $key => $admin_notice){
|
1125 |
+
if(!isset($admin_notice["key"])){
|
1126 |
+
$admin_notice["key"] = $key;
|
1127 |
+
}
|
1128 |
+
if(!empty($admin_notice['link_title']) && !empty($admin_notice['status']) && $admin_notice['status'] = "1"){
|
1129 |
+
if((!isset($admin_notice['priority']) || $admin_notice['priority'] == "") ){
|
1130 |
+
if(isset($static_notice_priority[$key])){
|
1131 |
+
$admin_notice["priority"] = $static_notice_priority[$key];
|
1132 |
+
$display_arr[$admin_notice["priority"]] = $admin_notice;
|
1133 |
+
}
|
1134 |
+
}else{
|
1135 |
+
//after priority setting
|
1136 |
+
$display_arr[$admin_notice["priority"]] = $admin_notice;
|
1137 |
+
}
|
1138 |
+
}
|
1139 |
+
}
|
1140 |
+
//display - sorting ascending - slice 2
|
1141 |
+
usort($display_arr, function($a, $b) {
|
1142 |
+
return $a['priority'] - $b['priority'];
|
1143 |
+
});
|
1144 |
+
//setting the limit 2 admin notices at a time.
|
1145 |
+
$admin_notice_display_arr_limit = array_slice($display_arr, 0, 2);
|
1146 |
+
if(isset($admin_notice_display_arr_limit) && !empty($admin_notice_display_arr_limit)){
|
1147 |
+
foreach ($admin_notice_display_arr_limit as $con_display_admin_notice) {
|
1148 |
+
if(!empty($con_display_admin_notice['link_title']) && !empty($con_display_admin_notice['status']) && $con_display_admin_notice['status'] = "1"){
|
1149 |
+
?>
|
1150 |
+
<div class="notice notice-info notice-dismiss_trigger is-dismissible" data-id='<?php echo esc_attr($con_display_admin_notice['key']); ?>'>
|
1151 |
+
<?php echo '<p>'. esc_html__($con_display_admin_notice['content'],"enhanced-e-commerce-for-woocommerce-store").' <a href="'.esc_url_raw($con_display_admin_notice["link"]).'" target="_blank" ><b><u>'. esc_html__($con_display_admin_notice['link_title'],"enhanced-e-commerce-for-woocommerce-store").'</u></b></a></p>
|
1152 |
</div>';
|
1153 |
+
}
|
1154 |
}
|
1155 |
}
|
1156 |
+
}
|
1157 |
+
?>
|
1158 |
+
<script>
|
1159 |
+
var tvc_ajax_url = '<?php echo esc_url_raw(admin_url( 'admin-ajax.php' )); ?>';
|
1160 |
+
(function( $ ) {
|
1161 |
+
jQuery( function() {
|
1162 |
+
jQuery( '.notice-dismiss_trigger' ).on( 'click', '.notice-dismiss', function( event, el ) {
|
1163 |
+
var ee_notice_dismiss_id_trigger = jQuery(this).parent('.is-dismissible').attr("data-id");
|
1164 |
+
jQuery.post(tvc_ajax_url,{
|
1165 |
+
action: "tvc_call_notice_dismiss_trigger",
|
1166 |
+
data:{ee_notice_dismiss_id_trigger:ee_notice_dismiss_id_trigger},
|
1167 |
+
dataType: "json"
|
1168 |
+
},function( response ){
|
1169 |
+
});
|
1170 |
+
});
|
1171 |
+
});
|
1172 |
+
})( jQuery );
|
1173 |
+
</script>
|
1174 |
+
<?php
|
1175 |
}
|
1176 |
//tvc_add_data_admin_notice function for adding the admin notices
|
1177 |
+
public function tvc_add_admin_notice($slug, $content, $status, $link_title = null, $link = null, $value = null, $title = null,$priority = "", $key = "" ){
|
1178 |
$ee_additional_data = $this->get_ee_additional_data();
|
1179 |
if(!isset($ee_additional_data['admin_notices'][$slug])){
|
1180 |
+
$ee_additional_data['admin_notices'][$slug] = array("link_title"=>$link_title,"content"=>$content,"status"=> $status,"title"=>$title, "value"=> $value,"link"=>$link, "priority"=>$priority, "key"=>$key );
|
1181 |
$this->set_ee_additional_data($ee_additional_data);
|
1182 |
}
|
1183 |
}
|
1184 |
//tvc_dismiss_admin_notice function for dismissing the admin notices
|
1185 |
+
public function tvc_dismiss_admin_notice($slug,$content, $status, $title = null, $value = null){
|
1186 |
$ee_additional_data = $this->get_ee_additional_data();
|
1187 |
+
if(isset($ee_additional_data['admin_notices'][$slug])){
|
1188 |
$ee_additional_data['admin_notices'][$slug] = array("title"=>$title,"content"=>$content,"status"=> $status, "value"=> $value);
|
1189 |
$this->set_ee_additional_data($ee_additional_data);
|
1190 |
}
|
1191 |
}
|
1192 |
public function tvc_add_data_admin_notice(){
|
1193 |
+
/* $google_detail = $this->get_ee_options_data();
|
1194 |
+
if(isset($google_detail["setting"])){
|
1195 |
+
$googleDetail = $google_detail["setting"];
|
1196 |
+
//when google ads id selected but no campaign active.
|
1197 |
+
if(isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != ""){
|
1198 |
+
$shopping_api = new ShoppingApi();
|
1199 |
+
$campaigns_list_res = $shopping_api->getCampaigns();
|
1200 |
+
if(empty($campaigns_list_res)){
|
1201 |
+
$link_title = "User Manual Guide";
|
1202 |
+
$content = "no campaign,";
|
1203 |
+
$status = "1";
|
1204 |
+
$link = "https://conversios.io/help-center/Installation-Manual.pdf";
|
1205 |
+
$this->tvc_add_admin_notice("no_campaign",$content, $status, $link_title, $link);
|
1206 |
+
}else{
|
1207 |
+
$link_title = "User Manual Guide";
|
1208 |
+
$content = "no campaign,";
|
1209 |
+
$status = "0";
|
1210 |
+
$this->tvc_dismiss_admin_notice("no_campaign",$content, $status,$link_title);
|
1211 |
+
}
|
1212 |
+
}
|
1213 |
+
}*/
|
1214 |
$tvc_add_data_admin_notice = $this->get_ee_options_settings();
|
1215 |
$con_subscription_id = $this->get_subscriptionId();
|
|
|
1216 |
/*GTM release notice*/
|
1217 |
$link_title = "Set it up in a single click..!!!!";
|
1218 |
$link = "admin.php?page=conversios_onboarding";
|
1219 |
$content = "NEW FEATURE - Now automate Facebook, Snapchat, Tiktok, Pinterest, Microsoft Ads, Google Ads pixels using Conversios's faster and accurate Google Tag Manager implementation.";
|
1220 |
$status = "1";
|
1221 |
+
$this->tvc_add_admin_notice("implementation_gatm_tracking",$content, $status, $link_title, $link,"","","8","implementation_gatm_tracking");
|
1222 |
+
//when user google signed in
|
1223 |
if($con_subscription_id != "" && $con_subscription_id != null ){
|
1224 |
$link_title = "User Manual Guide";
|
1225 |
$content = "You have not linked Google Analytics, Google Ads and Google Merchant Center accounts with Conversios plugin. Set up the conversios plugin now and boost your sales. Refer User Manual guide to get started,";
|
1226 |
$status = "0";
|
1227 |
+
$this->tvc_dismiss_admin_notice("no_google_signin",$content, $status,$link_title);
|
1228 |
//getting the review from user.
|
1229 |
if(!isset($_POST['conversios_onboarding_nonce'])){
|
1230 |
$ee_additional_data = $this->get_ee_additional_data();
|
1239 |
$content = "You have successfully started recording all the important ecommerce events in Google Analytics account using Conversios plugin. Let us know your experience by sharing your";
|
1240 |
$status = "1";
|
1241 |
$link = "https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/#reviews";
|
1242 |
+
$this->tvc_add_admin_notice("review_for_days" , $content, $status,$link_title, $link,"","","4","review_for_days" );
|
1243 |
}else if(isset($ee_additional_data['con_created_at']) && $ee_additional_data['con_created_at'] != ''){
|
1244 |
//existing user if created date is available
|
1245 |
$current_date = date('Y-m-d');
|
1252 |
$content = "You have successfully started recording all the important ecommerce events in Google Analytics account using Conversios plugin. Let us know your experience by sharing your";
|
1253 |
$status = "1";
|
1254 |
$link = "https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/#reviews";
|
1255 |
+
$this->tvc_add_admin_notice("review_for_days" , $content, $status,$link_title, $link,"","","4","review_for_days");
|
1256 |
}
|
1257 |
}
|
1258 |
}
|
1261 |
$link_title = "Link Google Merchant account";
|
1262 |
$content = "You have not linked Google Merchant Account account with conversios plugin yet. Increase your sales by linking the Google Merchant Account, Refer the user manual to link the account";
|
1263 |
$status = "1";
|
1264 |
+
$link = "admin.php?page=conversios_onboarding";
|
1265 |
+
$this->tvc_add_admin_notice("no_merchant_account", $content, $status,$link_title, $link,"","","5","no_merchant_account");
|
1266 |
}else{
|
1267 |
$link_title = "Link Google Merchant account";
|
1268 |
$content = "You have not linked Google Merchant Account account with conversios plugin yet. Increase your sales by linking the Google Merchant Account, Refer the user manual to link the account";
|
1269 |
$status = "0";
|
1270 |
+
$link = "admin.php?page=conversios_onboarding";
|
1271 |
+
$this->tvc_dismiss_admin_notice("no_merchant_account", $content, $status,$link_title, $link);
|
1272 |
}
|
1273 |
//if user has not selected Google Ads account.
|
1274 |
if(!isset($tvc_add_data_admin_notice['google_ads_id']) || (isset($tvc_add_data_admin_notice['google_ads_id']) && $tvc_add_data_admin_notice['google_ads_id'] == '')){
|
1276 |
$content = "You have not linked Google Ads account with conversios plugin yet. Increase your sales by linking the Google Ads account, Refer the user manual to link the account";
|
1277 |
$status = "1";
|
1278 |
$link = "admin.php?page=conversios_onboarding";
|
1279 |
+
$this->tvc_add_admin_notice("no_google_ads_account" , $content, $status, $link_title, $link,"","","3","no_google_ads_account");
|
1280 |
}else{
|
1281 |
$link_title = "Link Google Ads account";
|
1282 |
$content = "You have not linked Google Ads account with conversios plugin yet. Increase your sales by linking the Google Ads account, Refer the user manual to link the account";
|
1283 |
$status = "0";
|
1284 |
+
$this->tvc_dismiss_admin_notice("no_google_ads_account",$content, $status,$link_title);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1285 |
}
|
1286 |
+
//if user has not selected any of google analytics account.
|
1287 |
+
if((!isset($tvc_add_data_admin_notice['gm_id']) || (isset($tvc_add_data_admin_notice['gm_id']) && $tvc_add_data_admin_notice['gm_id'] == '')) && (!isset($tvc_add_data_admin_notice['ga_id']) || (isset($tvc_add_data_admin_notice['ga_id']) && $tvc_add_data_admin_notice['ga_id'] == ''))){
|
1288 |
$link_title = "Link Google Analytics account";
|
1289 |
$content = "You have not linked Google Analytics account with conversios plugin yet. Increase your sales by linking the Google Analytics account, Refer the user manual to link the account";
|
1290 |
$status = "1";
|
1291 |
$link = "admin.php?page=conversios_onboarding";
|
1292 |
+
$this->tvc_add_admin_notice("no_ga_account" , $content, $status, $link_title, $link,"","","2","no_ga_account");
|
1293 |
}else{
|
1294 |
+
$link_title = "Link Google Analytics account";
|
1295 |
$content = "You have not linked Google Analytics account with conversios plugin yet. Increase your sales by linking the Google Analytics account, Refer the user manual to link the account";
|
1296 |
$status = "0";
|
1297 |
+
$this->tvc_dismiss_admin_notice("no_ga_account", $content, $status,$link_title);
|
1298 |
}
|
1299 |
+
|
1300 |
+
}else{
|
1301 |
+
//when user will not do google sign in
|
1302 |
+
$link_title = " User Manual Guide";
|
1303 |
+
$content = "You have not linked Google Analytics, Google Ads and Google Merchant Center accounts with Conversios plugin. Set up the conversios plugin now and boost your sales. Refer User Manual guide to get started,";
|
1304 |
+
$status = "1";
|
1305 |
+
$link = "https://conversios.io/help-center/Installation-Manual.pdf";
|
1306 |
+
$this->tvc_add_admin_notice("no_google_signin", $content, $status, $link_title, $link,"","","1","no_google_signin");
|
1307 |
+
}
|
1308 |
+
}
|
1309 |
/*
|
1310 |
* conver curency code to currency symbols
|
1311 |
*/
|
admin/css/custom-style.css
CHANGED
@@ -1110,63 +1110,63 @@ textarea.form-control, .select2.select2-container--default textarea.select2-sele
|
|
1110 |
background-color: transparent !important;
|
1111 |
}
|
1112 |
|
1113 |
-
.tab-content {
|
1114 |
margin-top: 15px;
|
1115 |
padding-bottom: 15px;
|
1116 |
}
|
1117 |
|
1118 |
-
.tab-content .tab-card {
|
1119 |
background: #ffffff;
|
1120 |
padding: 30px;
|
1121 |
border-radius: 15px;
|
1122 |
}
|
1123 |
|
1124 |
-
.tab-content .tab-card.bg-none {
|
1125 |
background: none;
|
1126 |
border: 0;
|
1127 |
padding: 0;
|
1128 |
}
|
1129 |
|
1130 |
-
.tab-content .tab-card .text-header {
|
1131 |
font-size: 20px;
|
1132 |
font-weight: 700;
|
1133 |
margin-bottom: 1.5rem;
|
1134 |
}
|
1135 |
|
1136 |
-
.tab-content .tab-card .working {
|
1137 |
max-width: 100%;
|
1138 |
text-align: center;
|
1139 |
}
|
1140 |
|
1141 |
-
.tab-content .tab-card .working img {
|
1142 |
max-width: 100%;
|
1143 |
margin: 0 auto;
|
1144 |
}
|
1145 |
|
1146 |
-
.tab-content .tab-card .db-btn {
|
1147 |
margin-top: 30px;
|
1148 |
}
|
1149 |
|
1150 |
-
.tab-content .tab-card .db-btn .btn {
|
1151 |
margin-right: 30px;
|
1152 |
}
|
1153 |
|
1154 |
-
.tab-content .tab-card .custom-control-label {
|
1155 |
font-size: 14px;
|
1156 |
}
|
1157 |
|
1158 |
-
.tab-content .white-box {
|
1159 |
background-color: #FFFFFF;
|
1160 |
border: 1px solid #d1d1d1;
|
1161 |
padding: 10px;
|
1162 |
margin-bottom: 15px;
|
1163 |
}
|
1164 |
|
1165 |
-
.tab-content .white-box:last-child {
|
1166 |
margin-bottom: 0;
|
1167 |
}
|
1168 |
|
1169 |
-
.tab-content .text-m {
|
1170 |
display: block;
|
1171 |
margin-bottom: 0.35rem;
|
1172 |
font-size: 14px;
|
1110 |
background-color: transparent !important;
|
1111 |
}
|
1112 |
|
1113 |
+
.con-tab-content {
|
1114 |
margin-top: 15px;
|
1115 |
padding-bottom: 15px;
|
1116 |
}
|
1117 |
|
1118 |
+
.con-tab-content .tab-card {
|
1119 |
background: #ffffff;
|
1120 |
padding: 30px;
|
1121 |
border-radius: 15px;
|
1122 |
}
|
1123 |
|
1124 |
+
.con-tab-content .tab-card.bg-none {
|
1125 |
background: none;
|
1126 |
border: 0;
|
1127 |
padding: 0;
|
1128 |
}
|
1129 |
|
1130 |
+
.con-tab-content .tab-card .text-header {
|
1131 |
font-size: 20px;
|
1132 |
font-weight: 700;
|
1133 |
margin-bottom: 1.5rem;
|
1134 |
}
|
1135 |
|
1136 |
+
.con-tab-content .tab-card .working {
|
1137 |
max-width: 100%;
|
1138 |
text-align: center;
|
1139 |
}
|
1140 |
|
1141 |
+
.con-tab-content .tab-card .working img {
|
1142 |
max-width: 100%;
|
1143 |
margin: 0 auto;
|
1144 |
}
|
1145 |
|
1146 |
+
.con-tab-content .tab-card .db-btn {
|
1147 |
margin-top: 30px;
|
1148 |
}
|
1149 |
|
1150 |
+
.con-tab-content .tab-card .db-btn .btn {
|
1151 |
margin-right: 30px;
|
1152 |
}
|
1153 |
|
1154 |
+
.con-tab-content .tab-card .custom-control-label {
|
1155 |
font-size: 14px;
|
1156 |
}
|
1157 |
|
1158 |
+
.con-tab-content .white-box {
|
1159 |
background-color: #FFFFFF;
|
1160 |
border: 1px solid #d1d1d1;
|
1161 |
padding: 10px;
|
1162 |
margin-bottom: 15px;
|
1163 |
}
|
1164 |
|
1165 |
+
.con-tab-content .white-box:last-child {
|
1166 |
margin-bottom: 0;
|
1167 |
}
|
1168 |
|
1169 |
+
.con-tab-content .text-m {
|
1170 |
display: block;
|
1171 |
margin-bottom: 0.35rem;
|
1172 |
font-size: 14px;
|
admin/css/style.css
CHANGED
@@ -31,14 +31,14 @@
|
|
31 |
.rate_us img{max-width: 120px;}
|
32 |
/*dasboard*/
|
33 |
#ee_plugin_form select.data_collection_method{
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
}
|
43 |
.btn-11 {
|
44 |
overflow: hidden;
|
@@ -202,6 +202,8 @@
|
|
202 |
.site-header{left: 160px !important;}
|
203 |
button:disabled,button[disabled], button:disabled:hover,button[disabled]:hover{background-color:#CCCCCC;color:#ffffff;}
|
204 |
#tvc_merchant_section{display: flex; align-items: center;}
|
|
|
|
|
205 |
/*google button*/
|
206 |
.google-btn {
|
207 |
margin: 0 auto;
|
@@ -213,7 +215,8 @@ button:disabled,button[disabled], button:disabled:hover,button[disabled]:hover{b
|
|
213 |
margin-bottom: 15px;
|
214 |
}
|
215 |
.google-btn .google-icon-wrapper {
|
216 |
-
position:
|
|
|
217 |
margin-top: 1px;
|
218 |
margin-left: 1px;
|
219 |
width: 40px;
|
@@ -392,7 +395,7 @@ button:disabled,button[disabled], button:disabled:hover,button[disabled]:hover{b
|
|
392 |
cursor: pointer;
|
393 |
display: block;
|
394 |
line-height: 16px;
|
395 |
-
height:
|
396 |
user-select: none;
|
397 |
-webkit-user-select: none;
|
398 |
top: 50%;
|
@@ -414,7 +417,7 @@ button:disabled,button[disabled], button:disabled:hover,button[disabled]:hover{b
|
|
414 |
background-size: 100%;
|
415 |
position: absolute;
|
416 |
right: 10px;
|
417 |
-
top:
|
418 |
transform: translateY(-50%);
|
419 |
}
|
420 |
/*end onboarding page*/
|
@@ -484,11 +487,11 @@ image-rendering: crisp-edges;-ms-interpolation-mode: nearest-neighbor;
|
|
484 |
.brand img{max-width:138px;}
|
485 |
/*---- onborading style ------*/
|
486 |
.onbording-wrapper{padding:30px 0;}
|
487 |
-
.smallcontainer{max-width:881px;margin:0 0 0 auto;}
|
488 |
-
.onbordingtop{max-width:
|
489 |
.onbordingtop h2{line-height:35px;margin-bottom:10px;}
|
490 |
.onbordingtop p{font-size:16px;line-height:24px;margin-bottom:0px;}
|
491 |
-
.onboardingstepwrap{max-width:622px;width:100%;flex:1;padding:0 15px}
|
492 |
.onbordording-step{border:1px solid #E9E9E9;border-radius:6px;margin-bottom:15px;box-shadow:0px 3px 9px rgba(0, 0, 0, 0.06);}
|
493 |
.selectedactivestep{border:2px solid #2FBB0E;}
|
494 |
.stepleftround{max-width:42px;height:42px;display:flex;justify-content:center;align-items:center;border:1px dashed #C6C6C6;border-radius:100%;flex:0 0 42px;margin-right:24px;}
|
@@ -501,14 +504,14 @@ image-rendering: crisp-edges;-ms-interpolation-mode: nearest-neighbor;
|
|
501 |
.stepdtltop:before{content:"";background-image:url(../images/step-down-arrow.png);width:24px;height:24px;background-repeat:no-repeat;background-size:100%;position:absolute;right:30px;top:50%;transform:translateY(-50%);}
|
502 |
.stepdetwrap p{margin-bottom:0px;}
|
503 |
.stepdtltop h4{line-height:24px;font-weight:500;margin-bottom:8px;}
|
504 |
-
.stepmoredtlwrp{height:0;opacity:0;overflow:hidden;visibility:hidden;padding-left:
|
505 |
.stepmoredtl{padding-top:24px;padding-bottom:24px;border-top:1px solid #E9E9E9;}
|
506 |
.activestep .stepmoredtlwrp{height:auto;opacity:1;visibility:visible;}
|
507 |
.activestep .stepdtltop:before{background-image:url(../images/step-up-arrow.png);}
|
508 |
.stepmoredtl h5{font-weight:500;margin-bottom:12px;}
|
509 |
input[type="radio"], input[type="checkbox"]{margin:0;}
|
510 |
/*----custom radio -----*/
|
511 |
-
|
512 |
.cstmrdobtn-item label{display:inline-block;position:relative;padding-left:25px;margin-bottom:0px;cursor:pointer;font-size:14px;line-height:22px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
513 |
.cstmrdobtn-item input[type="radio"]{position:absolute;opacity:0;cursor:pointer;height:0;width:0;}
|
514 |
.cstmrdobtn-item .checkmark:before{content:"";position:absolute;top:3px;left:0;height:16px;width:16px;border:1px solid #C6C6C6;border-radius:100%;background-color:transparent;}
|
@@ -532,15 +535,15 @@ input[type="radio"], input[type="checkbox"]{margin:0;}
|
|
532 |
.slect2bx{border:1px solid #C6C6C6;width:258px;height:42px;}
|
533 |
.botslectbxitem{margin-bottom:9px;}
|
534 |
.botslectbxitem:last-child{margin-bottom:0px;}
|
535 |
-
.selcttopwrap{display:flex;align-items:center;
|
536 |
-
.orwrp{padding:
|
537 |
-
.cretnewbtn{
|
538 |
.cretnewbtn:hover{color:#000000;}
|
539 |
.cretnewbtn:hover img{filter:grayscale(1);-webkit-filter:grayscale(1);}
|
540 |
.dsplcolmview{flex-direction:column;}
|
541 |
.dsplcolmview .cstmcheck-item{margin-bottom:9px;}
|
542 |
.dsplcolmview .cstmcheck-item:last-child{margin-bottom:0px;}
|
543 |
-
.stepnotewrp{margin-bottom:24px;color:#515151;
|
544 |
.onbording-right{max-width:289px;flex:1;padding:0 15px;}
|
545 |
.sidebrcontainer{position:sticky;top:84px;}
|
546 |
.onbrd-rdmbx{background-color:#FBF7EE;padding:22px 24px;border-radius:6px;margin-bottom:24px;}
|
@@ -558,10 +561,12 @@ input[type="radio"], input[type="checkbox"]{margin:0;}
|
|
558 |
.onbrdppmain{display:flex;width:100%;height:100%;padding:30px 15px;justify-content:center;align-items:center;background-color:rgba(0,0,0,0.6);}
|
559 |
.onbrdnpp-cntner{background-color:#ffffff;border-radius:6px;box-shadow:0px 3px 9px rgba(0, 0, 0, 0.06);max-height:100%;overflow:auto;}
|
560 |
.onbrdnpp-hdr{padding:15px 40px 15px 15px;border-bottom:1px solid #E9E9E9;position:relative;}
|
|
|
561 |
.onbrdnpp-hdr h4{margin-bottom:0px;font-weight:500;}
|
562 |
.onbrdpp-body{padding:15px;font-size:14px;line-height:24px;color:#515151;}
|
563 |
.onbrdpp-body p{line-height:24px;}
|
564 |
.onbrdpp-body p:last-child{margin-bottom:0px; padding-left:1rem; }
|
|
|
565 |
.onbrdpp-body p strong{color:#1e1e1e;}
|
566 |
.onbrdpp-body h5{margin-bottom:15px;}
|
567 |
.onbrdpp-body ul,.onbrdpp-body ol{padding:0;margin:0;}
|
@@ -579,6 +584,7 @@ input[type="radio"], input[type="checkbox"]{margin:0;}
|
|
579 |
.scrlnone{overflow:hidden;}
|
580 |
.acccretppcntnr{width:100%;max-width:592px;}
|
581 |
.congratppcntnr{width:100%;max-width:592px;}
|
|
|
582 |
.cngrtppdtl-item{display:flex;justify-content:space-between;margin-bottom:9px;color:#515151;font-size:14px;line-height:22px;}
|
583 |
.congratppbody{max-width:454px;margin:0 auto;text-align:center;}
|
584 |
.cngtrpplft{position:relative;padding-left:22px;}
|
@@ -625,7 +631,7 @@ input[type="radio"], input[type="checkbox"]{margin:0;}
|
|
625 |
.cvrs-btn{border-radius:100px;border:none;box-shadow:none;padding:9px 24px;font-weight:500;}
|
626 |
.greenbtn{background-color:#CAF8BF;color:#2FBB0E;}
|
627 |
.greenbtn:hover{background-color:#2FBB0E;color:#ffffff;}
|
628 |
-
.upgradebtn{background-color:#FBC53B;border-radius:6px;color:#1E1E1E;padding:9px 24px;border:none;line-height:24px;height:42px;font-size:16px;font-weight:500;text-align:center;}
|
629 |
.upgradebtn:hover{background-color:#1E1E1E;color:#ffffff;}
|
630 |
.bodyrightpart{padding:20px;background-color:#f1f1f1;}
|
631 |
|
@@ -1383,17 +1389,17 @@ img.img-upload {
|
|
1383 |
width:20px;
|
1384 |
height:20px;
|
1385 |
}
|
1386 |
-
.onbrdr-msg{ background-color: #
|
1387 |
.contct-lnk{ color: blue; }
|
1388 |
#wpfooter {
|
1389 |
position: relative;
|
1390 |
}
|
1391 |
.tvc-onboardEdit{display: inline-block;height: fit-content;padding: 12px;margin: 0px 5px;}
|
1392 |
.tvc-onboardEdit:hover {color:#fff;}
|
1393 |
-
.tvc-onboardEdit{border:none; box-shadow: none; background-color: #002BFC; color: #ffffff; font-weight: 700; font-size: 16px; line-height:
|
1394 |
.tvc-onboardEdit:hover{background-color: #135e96;}
|
1395 |
.tvc-multi-dropdown{display:flex;flex-direction: row;margin: 10px 0px;}
|
1396 |
-
.tvc-disable-edits * {pointer-events: none;background: #CCCCCC;}
|
1397 |
.tvc-disable-edits{cursor: not-allowed;}
|
1398 |
.configuration-section .confg-card .card .card-body .list-unstyled li .list-image img {
|
1399 |
max-width: 18px;
|
@@ -1461,4 +1467,73 @@ site-verified-pos{
|
|
1461 |
.tvc-price-table-features .column .tvc_if_pay_yearly{font-size: 10px; text-align: center;}
|
1462 |
.tvc-price-table-features .column .current_active_plan{margin-top: 62px; background-color: #2FBB0E !important;}
|
1463 |
.tvc-price-table-features .column .tvc-tooltip{ position: absolute; top: 3px; margin-left: 2px;}
|
1464 |
-
.tvc-price-table-features .column .tvc-tooltip .tvc-tooltiptext{ left: 21px;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
.rate_us img{max-width: 120px;}
|
32 |
/*dasboard*/
|
33 |
#ee_plugin_form select.data_collection_method{
|
34 |
+
border: 1px solid #C6C6C6;
|
35 |
+
border-radius: 6px;
|
36 |
+
box-sizing: border-box;
|
37 |
+
cursor: pointer;
|
38 |
+
-webkit-user-select: none;
|
39 |
+
padding-right: 30px;
|
40 |
+
min-width: 450px;
|
41 |
+
max-width: 450px;
|
42 |
}
|
43 |
.btn-11 {
|
44 |
overflow: hidden;
|
202 |
.site-header{left: 160px !important;}
|
203 |
button:disabled,button[disabled], button:disabled:hover,button[disabled]:hover{background-color:#CCCCCC;color:#ffffff;}
|
204 |
#tvc_merchant_section{display: flex; align-items: center;}
|
205 |
+
.google_signin_sec_left{ width: 40%; display: inline-block; padding-top: 130px; vertical-align: top;}
|
206 |
+
.google_signin_sec_right{width: 59%; display: inline-block; border-left: 1px dashed; padding-left: 20px;}
|
207 |
/*google button*/
|
208 |
.google-btn {
|
209 |
margin: 0 auto;
|
215 |
margin-bottom: 15px;
|
216 |
}
|
217 |
.google-btn .google-icon-wrapper {
|
218 |
+
position: relative;
|
219 |
+
display: inline-block;
|
220 |
margin-top: 1px;
|
221 |
margin-left: 1px;
|
222 |
width: 40px;
|
395 |
cursor: pointer;
|
396 |
display: block;
|
397 |
line-height: 16px;
|
398 |
+
height: 36px;
|
399 |
user-select: none;
|
400 |
-webkit-user-select: none;
|
401 |
top: 50%;
|
417 |
background-size: 100%;
|
418 |
position: absolute;
|
419 |
right: 10px;
|
420 |
+
top: 18px;
|
421 |
transform: translateY(-50%);
|
422 |
}
|
423 |
/*end onboarding page*/
|
487 |
.brand img{max-width:138px;}
|
488 |
/*---- onborading style ------*/
|
489 |
.onbording-wrapper{padding:30px 0;}
|
490 |
+
.smallcontainer{/*max-width:881px;*/max-width:1050px;margin:0 0 0 auto;}
|
491 |
+
.onbordingtop{max-width:760px;padding:0 35px;text-align:center;margin-bottom:24px;}
|
492 |
.onbordingtop h2{line-height:35px;margin-bottom:10px;}
|
493 |
.onbordingtop p{font-size:16px;line-height:24px;margin-bottom:0px;}
|
494 |
+
.onboardingstepwrap{/*max-width:622px;*/max-width:785px;width:100%;flex:1;padding:0 15px}
|
495 |
.onbordording-step{border:1px solid #E9E9E9;border-radius:6px;margin-bottom:15px;box-shadow:0px 3px 9px rgba(0, 0, 0, 0.06);}
|
496 |
.selectedactivestep{border:2px solid #2FBB0E;}
|
497 |
.stepleftround{max-width:42px;height:42px;display:flex;justify-content:center;align-items:center;border:1px dashed #C6C6C6;border-radius:100%;flex:0 0 42px;margin-right:24px;}
|
504 |
.stepdtltop:before{content:"";background-image:url(../images/step-down-arrow.png);width:24px;height:24px;background-repeat:no-repeat;background-size:100%;position:absolute;right:30px;top:50%;transform:translateY(-50%);}
|
505 |
.stepdetwrap p{margin-bottom:0px;}
|
506 |
.stepdtltop h4{line-height:24px;font-weight:500;margin-bottom:8px;}
|
507 |
+
.stepmoredtlwrp{height:0;opacity:0;overflow:hidden;visibility:hidden;padding-left:60px;padding-right:60px;transition:all 0.5s ease-in-out 0s;-moz-transition:all 0.5s ease-in-out 0s;-webkit-transition:all 0.5s ease-in-out 0s;-o-transition:all 0.5s ease-in-out 0s;}
|
508 |
.stepmoredtl{padding-top:24px;padding-bottom:24px;border-top:1px solid #E9E9E9;}
|
509 |
.activestep .stepmoredtlwrp{height:auto;opacity:1;visibility:visible;}
|
510 |
.activestep .stepdtltop:before{background-image:url(../images/step-up-arrow.png);}
|
511 |
.stepmoredtl h5{font-weight:500;margin-bottom:12px;}
|
512 |
input[type="radio"], input[type="checkbox"]{margin:0;}
|
513 |
/*----custom radio -----*/
|
514 |
+
/*.cstmrdobtn-item{margin-bottom:10px;}*/
|
515 |
.cstmrdobtn-item label{display:inline-block;position:relative;padding-left:25px;margin-bottom:0px;cursor:pointer;font-size:14px;line-height:22px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
516 |
.cstmrdobtn-item input[type="radio"]{position:absolute;opacity:0;cursor:pointer;height:0;width:0;}
|
517 |
.cstmrdobtn-item .checkmark:before{content:"";position:absolute;top:3px;left:0;height:16px;width:16px;border:1px solid #C6C6C6;border-radius:100%;background-color:transparent;}
|
535 |
.slect2bx{border:1px solid #C6C6C6;width:258px;height:42px;}
|
536 |
.botslectbxitem{margin-bottom:9px;}
|
537 |
.botslectbxitem:last-child{margin-bottom:0px;}
|
538 |
+
.selcttopwrap{display:flex;align-items:center;}
|
539 |
+
.orwrp{padding:15px 18px;font-size:16px;line-height:24px;color:#515151; font-weight: 500;}
|
540 |
+
.cretnewbtn.tvc-onboardEdit{cursor:pointer; margin: 0 auto; display: block;}
|
541 |
.cretnewbtn:hover{color:#000000;}
|
542 |
.cretnewbtn:hover img{filter:grayscale(1);-webkit-filter:grayscale(1);}
|
543 |
.dsplcolmview{flex-direction:column;}
|
544 |
.dsplcolmview .cstmcheck-item{margin-bottom:9px;}
|
545 |
.dsplcolmview .cstmcheck-item:last-child{margin-bottom:0px;}
|
546 |
+
.stepnotewrp{margin-bottom:24px;color:#515151;padding-top:15px;border-top:1px solid #E9E9E9;font-size:10px;line-height:16px;}
|
547 |
.onbording-right{max-width:289px;flex:1;padding:0 15px;}
|
548 |
.sidebrcontainer{position:sticky;top:84px;}
|
549 |
.onbrd-rdmbx{background-color:#FBF7EE;padding:22px 24px;border-radius:6px;margin-bottom:24px;}
|
561 |
.onbrdppmain{display:flex;width:100%;height:100%;padding:30px 15px;justify-content:center;align-items:center;background-color:rgba(0,0,0,0.6);}
|
562 |
.onbrdnpp-cntner{background-color:#ffffff;border-radius:6px;box-shadow:0px 3px 9px rgba(0, 0, 0, 0.06);max-height:100%;overflow:auto;}
|
563 |
.onbrdnpp-hdr{padding:15px 40px 15px 15px;border-bottom:1px solid #E9E9E9;position:relative;}
|
564 |
+
#tvc_google_signin .onbrdnpp-hdr{border-bottom:none;}
|
565 |
.onbrdnpp-hdr h4{margin-bottom:0px;font-weight:500;}
|
566 |
.onbrdpp-body{padding:15px;font-size:14px;line-height:24px;color:#515151;}
|
567 |
.onbrdpp-body p{line-height:24px;}
|
568 |
.onbrdpp-body p:last-child{margin-bottom:0px; padding-left:1rem; }
|
569 |
+
#tvc_google_signin .onbrdpp-body p:last-child{padding-left:0; }
|
570 |
.onbrdpp-body p strong{color:#1e1e1e;}
|
571 |
.onbrdpp-body h5{margin-bottom:15px;}
|
572 |
.onbrdpp-body ul,.onbrdpp-body ol{padding:0;margin:0;}
|
584 |
.scrlnone{overflow:hidden;}
|
585 |
.acccretppcntnr{width:100%;max-width:592px;}
|
586 |
.congratppcntnr{width:100%;max-width:592px;}
|
587 |
+
#tvc_google_signin .acccretppcntnr{max-width: 700px; padding: 0 20px 20px 20px;}
|
588 |
.cngrtppdtl-item{display:flex;justify-content:space-between;margin-bottom:9px;color:#515151;font-size:14px;line-height:22px;}
|
589 |
.congratppbody{max-width:454px;margin:0 auto;text-align:center;}
|
590 |
.cngtrpplft{position:relative;padding-left:22px;}
|
631 |
.cvrs-btn{border-radius:100px;border:none;box-shadow:none;padding:9px 24px;font-weight:500;}
|
632 |
.greenbtn{background-color:#CAF8BF;color:#2FBB0E;}
|
633 |
.greenbtn:hover{background-color:#2FBB0E;color:#ffffff;}
|
634 |
+
.upgradebtn{display: inline-block; background-color:#FBC53B;border-radius:6px;color:#1E1E1E;padding:9px 24px;border:none;line-height:24px;height:42px;font-size:16px;font-weight:500;text-align:center;}
|
635 |
.upgradebtn:hover{background-color:#1E1E1E;color:#ffffff;}
|
636 |
.bodyrightpart{padding:20px;background-color:#f1f1f1;}
|
637 |
|
1389 |
width:20px;
|
1390 |
height:20px;
|
1391 |
}
|
1392 |
+
.onbrdr-msg{ background-color: #efe3c8; font-weight: bold; border: 2px dashed #A9A9A9; color: #1E1E1E; border-radius: 15px; padding: 15px; }
|
1393 |
.contct-lnk{ color: blue; }
|
1394 |
#wpfooter {
|
1395 |
position: relative;
|
1396 |
}
|
1397 |
.tvc-onboardEdit{display: inline-block;height: fit-content;padding: 12px;margin: 0px 5px;}
|
1398 |
.tvc-onboardEdit:hover {color:#fff;}
|
1399 |
+
.tvc-onboardEdit{border:none; box-shadow: none; background-color: #002BFC; color: #ffffff; font-weight: 700; font-size: 16px; line-height: 11px;border-radius: 6px;text-align: center;}
|
1400 |
.tvc-onboardEdit:hover{background-color: #135e96;}
|
1401 |
.tvc-multi-dropdown{display:flex;flex-direction: row;margin: 10px 0px;}
|
1402 |
+
.tvc-disable-edits * {pointer-events: none;background: #CCCCCC; border-radius: 6px;}
|
1403 |
.tvc-disable-edits{cursor: not-allowed;}
|
1404 |
.configuration-section .confg-card .card .card-body .list-unstyled li .list-image img {
|
1405 |
max-width: 18px;
|
1467 |
.tvc-price-table-features .column .tvc_if_pay_yearly{font-size: 10px; text-align: center;}
|
1468 |
.tvc-price-table-features .column .current_active_plan{margin-top: 62px; background-color: #2FBB0E !important;}
|
1469 |
.tvc-price-table-features .column .tvc-tooltip{ position: absolute; top: 3px; margin-left: 2px;}
|
1470 |
+
.tvc-price-table-features .column .tvc-tooltip .tvc-tooltiptext{ left: 21px;}
|
1471 |
+
.con_onboarding_sub_sec{}
|
1472 |
+
.con_onboarding_sub_title{ color: #002BFC; opacity: 0.6;}
|
1473 |
+
.con_pixels_sec .ga-title{ display: inline-block; width: 200px;}
|
1474 |
+
.onbordording-step input[type=text]{ height: 32px; margin-bottom: 5px; max-width: calc(100% - 30px);}
|
1475 |
+
.onbordording-step .select2-container--default.select2-container--disabled .select2-selection--single{background-color: #CCCCCC;}
|
1476 |
+
.onbordording-step .tvc-tooltip { position: absolute; display: inline-block; width: auto;}
|
1477 |
+
.onbordording-step .tvc-tooltip .tvc-tooltiptext {
|
1478 |
+
font-weight: normal;
|
1479 |
+
font-size: 14px;
|
1480 |
+
visibility: hidden;
|
1481 |
+
position: absolute;
|
1482 |
+
min-width: 400px;
|
1483 |
+
background-color: #000338;
|
1484 |
+
color: #fff;
|
1485 |
+
text-align: left;
|
1486 |
+
padding: 5px 6px;
|
1487 |
+
border-radius: 15px 50px 30px 5px;
|
1488 |
+
z-index: 999;
|
1489 |
+
transition: opacity .6s;
|
1490 |
+
cursor: auto;
|
1491 |
+
left: 12px;
|
1492 |
+
bottom: 15px;
|
1493 |
+
}
|
1494 |
+
.onbordording-step .tvc-tooltip:hover .tvc-tooltiptext {
|
1495 |
+
visibility: visible;
|
1496 |
+
opacity: 1;
|
1497 |
+
z-index: 999;
|
1498 |
+
}
|
1499 |
+
.onbordording-step .tvc-tooltip-right::after {
|
1500 |
+
content: "";
|
1501 |
+
position: absolute;
|
1502 |
+
top: 83%;
|
1503 |
+
right: 100%;
|
1504 |
+
margin-top: -5px;
|
1505 |
+
border-width: 5px;
|
1506 |
+
border-style: solid;
|
1507 |
+
border-color: transparent #000338 transparent transparent;
|
1508 |
+
}
|
1509 |
+
.onbordording-step .tvc-custom-checkbox{display: inline-block;}
|
1510 |
+
.onbordording-step .tvc-hide {
|
1511 |
+
display: none;
|
1512 |
+
}
|
1513 |
+
.onbordording-step .col-sm-4{width: 35%; display: inline-block; vertical-align: top;}
|
1514 |
+
.onbordording-step .col-sm-8{width: 64%; display: inline-block; vertical-align: top; padding-left: 20px;}
|
1515 |
+
.pixel-logo-text-left .pixel-logo{max-width: 40px; float: left; display: inline-block; padding-right: 5px;}
|
1516 |
+
.pixel-logo-text-left .pixel-text{width: calc(100% - 40px); float: left; display: inline-block; padding-left: 5px;}
|
1517 |
+
.pixel-logo-text-left .pixel-text label{display: block;}
|
1518 |
+
.onbordording-step .pl-2{padding-left: 25px;}
|
1519 |
+
.pixel-logo-text-left .pixel-text a{font-size: 10px; display: inline-block; margin-left: 2px;}
|
1520 |
+
.pixel-logo-text-left .pixel-text small{font-size: 10px;}
|
1521 |
+
.onbordording-step input[type=text].fromfiled::-webkit-input-placeholder{
|
1522 |
+
font-size: 11px;
|
1523 |
+
}
|
1524 |
+
.onbordording-step input[type=text].fromfiled:-moz-placeholder {
|
1525 |
+
font-size: 11px;
|
1526 |
+
}
|
1527 |
+
.onbordording-step .stepsbmtbtn:first-child{text-align: center;}
|
1528 |
+
.onbordording-step .stepsbmtbtn{text-align: end;}
|
1529 |
+
#ee_plugin_form .use_your_gtm_id p{ margin:0;}
|
1530 |
+
|
1531 |
+
.onbordording-step input[disabled] {background-color: #CCCCCC;}
|
1532 |
+
|
1533 |
+
#ee_plugin_form input[disabled] {background-color: #CCCCCC;}
|
1534 |
+
.onbordording-step .creatnewwrp{float: left; display: block; width: 100%;}
|
1535 |
+
.onbordording-step .creatnewwrp button{float: left; }
|
1536 |
+
.onbordording-step .newggladsbtn{margin-bottom: 5px;}
|
1537 |
+
#tvc_confirm_submite .ppblubtn.btn-w50{align-items: baseline;margin-bottom: 10px; margin-left: 8px; width: 48%; font-size: 12px;}
|
1538 |
+
#tvc_confirm_submite .onbrdpp-body p{ font-size: 18px;}
|
1539 |
+
#tvc_confirm_submite .ppblubtn.btn-w50:hover{color: #fff;}
|
admin/helper/class-onboarding-helper.php
CHANGED
@@ -310,7 +310,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
|
|
310 |
$data = isset($_POST['tvc_data'])?sanitize_text_field($_POST['tvc_data']):"";
|
311 |
$tvc_data = json_decode(str_replace(""", "\"", $data));
|
312 |
$api_obj = new Conversios_Onboarding_ApiCall(sanitize_text_field($tvc_data->access_token), sanitize_text_field($tvc_data->refresh_token));
|
313 |
-
$return_url = $this->save_wp_setting_from_subscription_api($api_obj, $tvc_data, sanitize_text_field($_POST['subscription_id']) );
|
314 |
$return_rs = $api_obj->updateSetupTimeToSubscription($_POST);
|
315 |
$return_rs->return_url = $return_url;
|
316 |
echo json_encode($return_rs);
|
@@ -324,7 +324,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
|
|
324 |
* save wp setting from subscription api
|
325 |
* @since 4.0.2
|
326 |
*/
|
327 |
-
public function save_wp_setting_from_subscription_api($api_obj, $tvc_data, $subscription_id){
|
328 |
$old_setting = unserialize(get_option('ee_options'));
|
329 |
$TVC_Admin_Helper = new TVC_Admin_Helper();
|
330 |
$google_detail = $api_obj->getSubscriptionDetails($tvc_data, $subscription_id);
|
@@ -343,9 +343,9 @@ if(!class_exists('Conversios_Onboarding_Helper')):
|
|
343 |
/**
|
344 |
* for site verifecation
|
345 |
*/
|
346 |
-
if(isset($googleDetail->google_merchant_center_id) && sanitize_text_field($googleDetail->google_merchant_center_id)){
|
347 |
$this->site_verification_and_domain_claim($googleDetail);
|
348 |
-
}
|
349 |
|
350 |
$settings['subscription_id'] = sanitize_text_field($googleDetail->id);
|
351 |
$settings['ga_eeT'] = (isset($googleDetail->enhanced_e_commerce_tracking) && sanitize_text_field($googleDetail->enhanced_e_commerce_tracking) == "1") ? "on" : "";
|
@@ -361,16 +361,29 @@ if(!class_exists('Conversios_Onboarding_Helper')):
|
|
361 |
$settings['ga_IPA'] = 'on';
|
362 |
//$settings['ga_OPTOUT'] = 'on';
|
363 |
$settings['ga_PrivacyPolicy'] = 'on';
|
364 |
-
$settings['google-analytic'] = '';
|
365 |
-
$settings['fb_pixel_id'] = isset($old_setting['fb_pixel_id'])?$old_setting['fb_pixel_id']:"";
|
366 |
$settings['ga4_api_secret'] = isset($old_setting['ga4_api_secret'])?$old_setting['ga4_api_secret']:"";
|
367 |
$settings['ga_CG'] = isset($old_setting['ga_CG'])?$old_setting['ga_CG']:"";
|
368 |
$settings['ga_optimize_id'] = isset($old_setting['ga_optimize_id'])?$old_setting['ga_optimize_id']:"";
|
369 |
|
370 |
-
$tracking_integration = array("tracking_method", "
|
371 |
foreach($tracking_integration as $val){
|
372 |
$settings[$val] = isset($old_setting[$val])?sanitize_text_field($old_setting[$val]):"";
|
373 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
//update option in wordpress local database
|
375 |
update_option('google_ads_conversion_tracking', $googleDetail->google_ads_conversion_tracking);
|
376 |
update_option('ads_tracking_id', $googleDetail->google_ads_id);
|
@@ -399,7 +412,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
|
|
399 |
* save gmail and view ID in WP DB
|
400 |
*/
|
401 |
if(property_exists($tvc_data,"g_mail") && sanitize_email($tvc_data->g_mail)){
|
402 |
-
update_option('ee_customer_gmail', $tvc_data->g_mail);
|
403 |
}
|
404 |
//is not work for existing user && $ee_additional_data['con_created_at'] != ""
|
405 |
if(isset($ee_additional_data['con_created_at'])){
|
@@ -758,7 +771,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
|
|
758 |
$status = "1";
|
759 |
$link = "admin.php?page=conversios-pmax";
|
760 |
$created_google_ads_id = $result->data->adwords_id;
|
761 |
-
$TVC_Admin_Helper->tvc_add_admin_notice("created_googleads_account", $
|
762 |
return $return;
|
763 |
}else{
|
764 |
$return->error = true;
|
@@ -819,7 +832,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
|
|
819 |
$status = "1";
|
820 |
$created_merchant_id = $response_body->account->id;
|
821 |
$link = "admin.php?page=conversios-pmax";
|
822 |
-
$TVC_Admin_Helper->tvc_add_admin_notice("created_merchant_account", $
|
823 |
return $response_body;
|
824 |
} else {
|
825 |
$return = new \stdClass();
|
@@ -852,13 +865,13 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
|
|
852 |
'client_id_tracking' => sanitize_text_field((isset($postData['client_id_tracking']) && $postData['client_id_tracking']=='true')?1:0),
|
853 |
'exception_tracking' => sanitize_text_field((isset($postData['exception_tracking']) && $postData['exception_tracking']=='true')?1:0),
|
854 |
'enhanced_link_attribution_tracking' => sanitize_text_field((isset($postData['enhanced_link_attribution_tracking']) && $postData['enhanced_link_attribution_tracking'] == 'true')? 1 : 0)
|
855 |
-
);
|
856 |
$args = array(
|
857 |
'headers' =>$header,
|
858 |
'method' => 'POST',
|
859 |
'body' => wp_json_encode($data)
|
860 |
-
);
|
861 |
-
$result = $this->tc_wp_remot_call_post(esc_url_raw($url), $args);
|
862 |
$return = new \stdClass();
|
863 |
if($result->status == 200){
|
864 |
$return->status = $result->status;
|
@@ -881,34 +894,68 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
|
|
881 |
try {
|
882 |
$url = $this->apiDomain . '/customer-subscriptions/update-detail';
|
883 |
$header = array("Authorization: Bearer MTIzNA==", "Content-Type" => "application/json");
|
884 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
885 |
'subscription_id' => sanitize_text_field((isset($postData['subscription_id']))?$postData['subscription_id'] : ''),
|
886 |
-
'google_ads_id' =>
|
887 |
'remarketing_tags' => sanitize_text_field((isset($postData['remarketing_tags']) && $postData['remarketing_tags'] == 'true') ? 1 : 0),
|
888 |
'dynamic_remarketing_tags' => sanitize_text_field((isset($postData['dynamic_remarketing_tags']) && $postData['dynamic_remarketing_tags'] == 'true') ? 1 : 0),
|
889 |
'google_ads_conversion_tracking' => sanitize_text_field((isset($postData['google_ads_conversion_tracking']) && $postData['google_ads_conversion_tracking'] == 'true') ? 1 : 0),
|
890 |
'link_google_analytics_with_google_ads' => sanitize_text_field((isset($postData['link_google_analytics_with_google_ads']) && $postData['link_google_analytics_with_google_ads'] == 'true') ? 1 : 0)
|
891 |
-
|
892 |
-
$args = array(
|
893 |
-
'timeout' => 10000,
|
894 |
-
'headers' =>$header,
|
895 |
-
'method' => 'POST',
|
896 |
-
'body' => wp_json_encode($data)
|
897 |
-
);
|
898 |
-
$result = $this->tc_wp_remot_call_post(esc_url_raw($url), $args);
|
899 |
-
$return = new \stdClass();
|
900 |
-
if($result->status == 200){
|
901 |
-
$return->status = $result->status;
|
902 |
-
$return->data = $result->data;
|
903 |
-
$return->error = false;
|
904 |
-
return $return;
|
905 |
-
}else{
|
906 |
-
$return->error = true;
|
907 |
-
$return->data = $result->data;
|
908 |
-
$return->status = $result->status;
|
909 |
-
$return->errors = json_encode($result->errors);
|
910 |
-
return $return;
|
911 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
912 |
} catch (Exception $e) {
|
913 |
return $e->getMessage();
|
914 |
}
|
310 |
$data = isset($_POST['tvc_data'])?sanitize_text_field($_POST['tvc_data']):"";
|
311 |
$tvc_data = json_decode(str_replace(""", "\"", $data));
|
312 |
$api_obj = new Conversios_Onboarding_ApiCall(sanitize_text_field($tvc_data->access_token), sanitize_text_field($tvc_data->refresh_token));
|
313 |
+
$return_url = $this->save_wp_setting_from_subscription_api($api_obj, $tvc_data, sanitize_text_field($_POST['subscription_id']) , $_POST);
|
314 |
$return_rs = $api_obj->updateSetupTimeToSubscription($_POST);
|
315 |
$return_rs->return_url = $return_url;
|
316 |
echo json_encode($return_rs);
|
324 |
* save wp setting from subscription api
|
325 |
* @since 4.0.2
|
326 |
*/
|
327 |
+
public function save_wp_setting_from_subscription_api($api_obj, $tvc_data, $subscription_id, $data){
|
328 |
$old_setting = unserialize(get_option('ee_options'));
|
329 |
$TVC_Admin_Helper = new TVC_Admin_Helper();
|
330 |
$google_detail = $api_obj->getSubscriptionDetails($tvc_data, $subscription_id);
|
343 |
/**
|
344 |
* for site verifecation
|
345 |
*/
|
346 |
+
/*if(isset($googleDetail->google_merchant_center_id) && sanitize_text_field($googleDetail->google_merchant_center_id)){
|
347 |
$this->site_verification_and_domain_claim($googleDetail);
|
348 |
+
}*/
|
349 |
|
350 |
$settings['subscription_id'] = sanitize_text_field($googleDetail->id);
|
351 |
$settings['ga_eeT'] = (isset($googleDetail->enhanced_e_commerce_tracking) && sanitize_text_field($googleDetail->enhanced_e_commerce_tracking) == "1") ? "on" : "";
|
361 |
$settings['ga_IPA'] = 'on';
|
362 |
//$settings['ga_OPTOUT'] = 'on';
|
363 |
$settings['ga_PrivacyPolicy'] = 'on';
|
364 |
+
$settings['google-analytic'] = '';
|
|
|
365 |
$settings['ga4_api_secret'] = isset($old_setting['ga4_api_secret'])?$old_setting['ga4_api_secret']:"";
|
366 |
$settings['ga_CG'] = isset($old_setting['ga_CG'])?$old_setting['ga_CG']:"";
|
367 |
$settings['ga_optimize_id'] = isset($old_setting['ga_optimize_id'])?$old_setting['ga_optimize_id']:"";
|
368 |
|
369 |
+
$tracking_integration = array("tracking_method", "tvc_product_list_data_collection_method", "tvc_product_detail_data_collection_method", "tvc_checkout_data_collection_method", "tvc_thankyou_data_collection_method", "tvc_product_detail_addtocart_selector", "tvc_product_detail_addtocart_selector_type", "tvc_product_detail_addtocart_selector_val", "tvc_checkout_step_2_selector", "tvc_checkout_step_2_selector_type", "tvc_checkout_step_2_selector_val", "tvc_checkout_step_3_selector", "tvc_checkout_step_3_selector_type", "tvc_checkout_step_3_selector_val");
|
370 |
foreach($tracking_integration as $val){
|
371 |
$settings[$val] = isset($old_setting[$val])?sanitize_text_field($old_setting[$val]):"";
|
372 |
}
|
373 |
+
|
374 |
+
$ga_ec = (isset($data["ga_ec"]) && $data["ga_ec"] == "1")?1:0;
|
375 |
+
update_option('ga_EC', sanitize_text_field($ga_ec) );
|
376 |
+
|
377 |
+
//onboarding settings
|
378 |
+
$setting_integration = array("tracking_method", "want_to_use_your_gtm", "use_your_gtm_id", "fb_pixel_id", "microsoft_ads_pixel_id", "twitter_ads_pixel_id", "pinterest_ads_pixel_id", "snapchat_ads_pixel_id", "tiKtok_ads_pixel_id");
|
379 |
+
foreach($setting_integration as $val){
|
380 |
+
$settings[$val] = isset($data[$val])?sanitize_text_field($data[$val]):"";
|
381 |
+
}
|
382 |
+
|
383 |
+
if( $googleDetail->plan_id == 1 ){
|
384 |
+
$settings['want_to_use_your_gtm'] = 0;
|
385 |
+
}
|
386 |
+
|
387 |
//update option in wordpress local database
|
388 |
update_option('google_ads_conversion_tracking', $googleDetail->google_ads_conversion_tracking);
|
389 |
update_option('ads_tracking_id', $googleDetail->google_ads_id);
|
412 |
* save gmail and view ID in WP DB
|
413 |
*/
|
414 |
if(property_exists($tvc_data,"g_mail") && sanitize_email($tvc_data->g_mail)){
|
415 |
+
update_option('ee_customer_gmail', $tvc_data->g_mail);
|
416 |
}
|
417 |
//is not work for existing user && $ee_additional_data['con_created_at'] != ""
|
418 |
if(isset($ee_additional_data['con_created_at'])){
|
771 |
$status = "1";
|
772 |
$link = "admin.php?page=conversios-pmax";
|
773 |
$created_google_ads_id = $result->data->adwords_id;
|
774 |
+
$TVC_Admin_Helper->tvc_add_admin_notice("created_googleads_account", $content, $status, $link_title, $link, $created_google_ads_id,"","6","created_googleads_account");
|
775 |
return $return;
|
776 |
}else{
|
777 |
$return->error = true;
|
832 |
$status = "1";
|
833 |
$created_merchant_id = $response_body->account->id;
|
834 |
$link = "admin.php?page=conversios-pmax";
|
835 |
+
$TVC_Admin_Helper->tvc_add_admin_notice("created_merchant_account", $content, $status, $link_title, $link, $created_merchant_id,"","7","created_merchant_account");
|
836 |
return $response_body;
|
837 |
} else {
|
838 |
$return = new \stdClass();
|
865 |
'client_id_tracking' => sanitize_text_field((isset($postData['client_id_tracking']) && $postData['client_id_tracking']=='true')?1:0),
|
866 |
'exception_tracking' => sanitize_text_field((isset($postData['exception_tracking']) && $postData['exception_tracking']=='true')?1:0),
|
867 |
'enhanced_link_attribution_tracking' => sanitize_text_field((isset($postData['enhanced_link_attribution_tracking']) && $postData['enhanced_link_attribution_tracking'] == 'true')? 1 : 0)
|
868 |
+
);
|
869 |
$args = array(
|
870 |
'headers' =>$header,
|
871 |
'method' => 'POST',
|
872 |
'body' => wp_json_encode($data)
|
873 |
+
);
|
874 |
+
$result = $this->tc_wp_remot_call_post(esc_url_raw($url), $args);
|
875 |
$return = new \stdClass();
|
876 |
if($result->status == 200){
|
877 |
$return->status = $result->status;
|
894 |
try {
|
895 |
$url = $this->apiDomain . '/customer-subscriptions/update-detail';
|
896 |
$header = array("Authorization: Bearer MTIzNA==", "Content-Type" => "application/json");
|
897 |
+
|
898 |
+
$google_ads_id = sanitize_text_field((isset($postData['google_ads_id']))? $postData['google_ads_id'] : '');
|
899 |
+
$measurement_id = sanitize_text_field((isset($postData['web_measurement_id']))?$postData['web_measurement_id'] : '');
|
900 |
+
$property_id = sanitize_text_field((isset($postData['web_property_id'])) ? $postData['web_property_id'] : '');
|
901 |
+
$data = array();
|
902 |
+
$data_ga = array(); $data_ads = array();
|
903 |
+
if($measurement_id != ""|| $property_id != ""){
|
904 |
+
$data_ga = array(
|
905 |
+
'subscription_id' => sanitize_text_field((isset($postData['subscription_id']))?$postData['subscription_id'] : ''),
|
906 |
+
'tracking_option' => sanitize_text_field((isset($postData['tracking_option']))?$postData['tracking_option'] : ''),
|
907 |
+
'measurement_id' => sanitize_text_field((isset($postData['web_measurement_id']))?$postData['web_measurement_id'] : ''),
|
908 |
+
'ga4_analytic_account_id' => sanitize_text_field((isset($postData['ga4_account_id']))?$postData['ga4_account_id'] : ''),
|
909 |
+
'property_id' => sanitize_text_field((isset($postData['web_property_id'])) ? $postData['web_property_id'] : ''),
|
910 |
+
'ua_analytic_account_id' => sanitize_text_field((isset($postData['ua_account_id'])) ? $postData['ua_account_id'] : ''),
|
911 |
+
'enhanced_e_commerce_tracking' => sanitize_text_field((isset($postData['enhanced_e_commerce_tracking']) && $postData['enhanced_e_commerce_tracking'] == 'true') ? 1 : 0),
|
912 |
+
'user_time_tracking' => sanitize_text_field((isset($postData['user_time_tracking']) && $postData['user_time_tracking']=='true')?1:0),
|
913 |
+
'add_gtag_snippet' => sanitize_text_field((isset($postData['add_gtag_snippet']) && $postData['add_gtag_snippet'] == 'true')? 1:0),
|
914 |
+
'client_id_tracking' => sanitize_text_field((isset($postData['client_id_tracking']) && $postData['client_id_tracking']=='true')?1:0),
|
915 |
+
'exception_tracking' => sanitize_text_field((isset($postData['exception_tracking']) && $postData['exception_tracking']=='true')?1:0),
|
916 |
+
'enhanced_link_attribution_tracking' => sanitize_text_field((isset($postData['enhanced_link_attribution_tracking']) && $postData['enhanced_link_attribution_tracking'] == 'true')? 1 : 0)
|
917 |
+
);
|
918 |
+
}
|
919 |
+
if($google_ads_id){
|
920 |
+
$data_ads = [
|
921 |
'subscription_id' => sanitize_text_field((isset($postData['subscription_id']))?$postData['subscription_id'] : ''),
|
922 |
+
'google_ads_id' => $google_ads_id,
|
923 |
'remarketing_tags' => sanitize_text_field((isset($postData['remarketing_tags']) && $postData['remarketing_tags'] == 'true') ? 1 : 0),
|
924 |
'dynamic_remarketing_tags' => sanitize_text_field((isset($postData['dynamic_remarketing_tags']) && $postData['dynamic_remarketing_tags'] == 'true') ? 1 : 0),
|
925 |
'google_ads_conversion_tracking' => sanitize_text_field((isset($postData['google_ads_conversion_tracking']) && $postData['google_ads_conversion_tracking'] == 'true') ? 1 : 0),
|
926 |
'link_google_analytics_with_google_ads' => sanitize_text_field((isset($postData['link_google_analytics_with_google_ads']) && $postData['link_google_analytics_with_google_ads'] == 'true') ? 1 : 0)
|
927 |
+
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
928 |
}
|
929 |
+
if(!empty($data_ga) && !empty($data_ads)){
|
930 |
+
$data = array_merge($data_ga,$data_ads);
|
931 |
+
}else if(!empty($data_ga) ){
|
932 |
+
$data = $data_ga;
|
933 |
+
}else if(!empty($data_ads) ){
|
934 |
+
$data = $data_ads;
|
935 |
+
}
|
936 |
+
if(!empty($data)){
|
937 |
+
$args = array(
|
938 |
+
'timeout' => 10000,
|
939 |
+
'headers' =>$header,
|
940 |
+
'method' => 'POST',
|
941 |
+
'body' => wp_json_encode($data)
|
942 |
+
);
|
943 |
+
$result = $this->tc_wp_remot_call_post(esc_url_raw($url), $args);
|
944 |
+
$return = new \stdClass();
|
945 |
+
if($result->status == 200){
|
946 |
+
$return->status = $result->status;
|
947 |
+
$return->data = $result->data;
|
948 |
+
$return->error = false;
|
949 |
+
return $return;
|
950 |
+
}else{
|
951 |
+
$return->error = true;
|
952 |
+
$return->data = $result->data;
|
953 |
+
$return->status = $result->status;
|
954 |
+
$return->errors = json_encode($result->errors);
|
955 |
+
return $return;
|
956 |
+
}
|
957 |
+
}
|
958 |
+
|
959 |
} catch (Exception $e) {
|
960 |
return $e->getMessage();
|
961 |
}
|
admin/images/events-hit.png
ADDED
Binary file
|
admin/images/google ads_icon.png
ADDED
Binary file
|
admin/images/google_analytics_icon.png
ADDED
Binary file
|
admin/images/google_shopping_icon.png
ADDED
Binary file
|
admin/images/gtm_logo.png
ADDED
Binary file
|
admin/js/onboarding-custom.js
CHANGED
@@ -105,7 +105,7 @@ jQuery(document).ready(function () {
|
|
105 |
jQuery("[data-id=step_3]").attr("data-is-done",0);
|
106 |
}); */
|
107 |
//step-2
|
108 |
-
jQuery(".google_ads_sel").on( "change", function() {
|
109 |
is_validate_step("step_2");
|
110 |
//jQuery(".onbrdstep-1").removeClass('selectedactivestep');
|
111 |
jQuery(".onbrdstep-3").removeClass('selectedactivestep');
|
@@ -113,7 +113,7 @@ jQuery(document).ready(function () {
|
|
113 |
//jQuery("[data-id=step_1]").attr("data-is-done",0);
|
114 |
jQuery("[data-id=step_2]").attr("data-is-done",0);
|
115 |
jQuery("[data-id=step_3]").attr("data-is-done",0);
|
116 |
-
});
|
117 |
jQuery('input[type=checkbox]:not(#adult_content, #terms_conditions)').change(function() {
|
118 |
//jQuery(".onbrdstep-1").removeClass('selectedactivestep');
|
119 |
jQuery(".onbrdstep-3").removeClass('selectedactivestep');
|
@@ -131,7 +131,7 @@ jQuery(document).ready(function () {
|
|
131 |
});
|
132 |
});
|
133 |
function validate_google_analytics_sel(){
|
134 |
-
is_validate_step("step_1");
|
135 |
jQuery(".onbrdstep-1").removeClass('selectedactivestep');
|
136 |
jQuery(".onbrdstep-3").removeClass('selectedactivestep');
|
137 |
jQuery(".onbrdstep-2").removeClass('selectedactivestep');
|
@@ -139,44 +139,11 @@ function validate_google_analytics_sel(){
|
|
139 |
jQuery("[data-id=step_2]").attr("data-is-done",0);
|
140 |
jQuery("[data-id=step_3]").attr("data-is-done",0);
|
141 |
}
|
142 |
-
|
143 |
-
function
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
return true;
|
148 |
-
}else if(tracking_option == "UA"){
|
149 |
-
let web_property_id = jQuery('#ua_web_property_id_option_val').attr("data-val");
|
150 |
-
let old_web_property_id = jQuery('#old_tracking').attr("data-property_id");
|
151 |
-
if(web_property_id != old_web_property_id){
|
152 |
-
return true;
|
153 |
-
}else{
|
154 |
-
return false;
|
155 |
-
}
|
156 |
-
}else if(tracking_option == "GA4"){
|
157 |
-
let web_measurement_id = jQuery('#ga4_web_measurement_id_option_val').attr("data-val");
|
158 |
-
let old_web_measurement_id = jQuery('#old_tracking').attr("data-measurement_id");
|
159 |
-
if(web_measurement_id != old_web_measurement_id){
|
160 |
-
return true;
|
161 |
-
}else{
|
162 |
-
return false;
|
163 |
-
}
|
164 |
-
}else if(tracking_option == "BOTH"){
|
165 |
-
let web_property_id = jQuery('#both_ua_web_property_id_option_val').attr("data-val");
|
166 |
-
let web_measurement_id = jQuery('#both_ga4_web_measurement_id_option_val').attr("data-val");
|
167 |
-
let old_web_property_id = jQuery('#old_tracking').attr("data-property_id");
|
168 |
-
let old_web_measurement_id = jQuery('#old_tracking').attr("data-measurement_id");
|
169 |
-
if(web_measurement_id != old_web_measurement_id || web_property_id != old_web_property_id){
|
170 |
-
return true;
|
171 |
-
}else{
|
172 |
-
return false;
|
173 |
-
}
|
174 |
-
}
|
175 |
-
}
|
176 |
-
//save nalytics web properties while next button click
|
177 |
-
function save_analytics_web_properties(tracking_option, tvc_data, subscription_id){
|
178 |
-
|
179 |
-
if(subscription_id != "" && is_change_analytics_account()){
|
180 |
var web_measurement_id = "";
|
181 |
var web_property_id = "";
|
182 |
var ga4_account_id = "";
|
@@ -185,266 +152,234 @@ function save_analytics_web_properties(tracking_option, tvc_data, subscription_i
|
|
185 |
var msg ="";
|
186 |
if(tracking_option == "UA"){
|
187 |
web_property_id = jQuery('#ua_web_property_id_option_val').attr("data-val");
|
188 |
-
ua_account_id = jQuery("#ua_web_property_id_option_val").attr('data-accountid');
|
189 |
-
if(web_property_id == ""){
|
190 |
-
is_valide = false;
|
191 |
-
msg = "Please select web property id.";
|
192 |
-
}
|
193 |
}else if(tracking_option == "GA4"){
|
194 |
web_measurement_id = jQuery('#ga4_web_measurement_id_option_val').attr("data-val");
|
195 |
-
ga4_account_id = jQuery("#ga4_web_measurement_id_option_val").attr('data-accountid');
|
196 |
-
|
197 |
-
is_valide = false;
|
198 |
-
msg = "Please select measurement id.";
|
199 |
-
}
|
200 |
-
}else{
|
201 |
web_property_id = jQuery('#both_ua_web_property_id_option_val').attr("data-val");
|
202 |
ua_account_id = jQuery("#both_ua_web_property_id_option_val").attr('data-accountid');
|
203 |
web_measurement_id = jQuery('#both_ga4_web_measurement_id_option_val').attr("data-val");
|
204 |
ga4_account_id = jQuery("#both_ga4_web_measurement_id_option_val").attr('data-accountid');
|
205 |
-
|
206 |
if(web_property_id == "" || web_measurement_id == ""){
|
207 |
is_valide = false;
|
208 |
msg = "Please select property/measurement id.";
|
209 |
}
|
210 |
}
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
jQuery.ajax({
|
232 |
type: "POST",
|
233 |
dataType: "json",
|
234 |
url: tvc_ajax_url,
|
235 |
data: data,
|
236 |
-
beforeSend: function(){
|
237 |
-
loaderSection(true);
|
238 |
},
|
239 |
-
success: function(response){
|
240 |
-
|
241 |
-
|
242 |
-
// user tracking code
|
243 |
-
if (response.error === false) {
|
244 |
-
add_message("success","Google Analytics successfully updated.");
|
245 |
var error_msg = 'null';
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
var
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
link_google_analytics_with_google_ads: jQuery("#link_google_analytics_with_google_ads").is(':checked'),
|
281 |
-
tvc_data:tvc_data,
|
282 |
-
conversios_onboarding_nonce:conversios_onboarding_nonce
|
283 |
-
};
|
284 |
-
jQuery.ajax({
|
285 |
-
type: "POST",
|
286 |
-
dataType: "json",
|
287 |
-
url: tvc_ajax_url,
|
288 |
-
data: data,
|
289 |
-
beforeSend: function () {
|
290 |
-
},
|
291 |
-
success: function (response) {
|
292 |
-
var btn_cam = 'save_ads';
|
293 |
-
if(response.error === false) {
|
294 |
-
var error_msg = 'null';
|
295 |
-
//user_tracking_data(btn_cam, error_msg, 'conversios_onboarding','Save_Google_Ads_account');
|
296 |
-
add_message("success","Google Ads successfully updated.");
|
297 |
-
let tracking_option = jQuery('input:radio[name=analytic_tag_type]:checked').val();
|
298 |
-
var s_tracking_option = tracking_option.toLowerCase();
|
299 |
-
|
300 |
-
if (jQuery("#link_google_analytics_with_google_ads").is(':checked')) {
|
301 |
-
if(tracking_option == "UA" || tracking_option == "BOTH"){
|
302 |
-
if(tracking_option == "BOTH"){
|
303 |
-
s_tracking_option = "both_ua";
|
304 |
-
}
|
305 |
-
var profile_id = jQuery("#"+s_tracking_option+"_web_property_id_option_val").attr('data-profileid');
|
306 |
-
var UalinkData = {
|
307 |
action: "link_analytic_to_ads_account",
|
308 |
-
type: "
|
309 |
ads_customer_id: google_ads_id,
|
310 |
-
|
311 |
-
|
312 |
-
profile_id: profile_id,
|
313 |
tvc_data:tvc_data,
|
314 |
conversios_onboarding_nonce:conversios_onboarding_nonce
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
/* start GA4 */
|
336 |
-
if(tracking_option == "GA4" || tracking_option == "BOTH"){
|
337 |
-
if(tracking_option == "BOTH"){
|
338 |
-
s_tracking_option = "both_ga4";
|
339 |
-
}
|
340 |
-
var web_property = jQuery("#"+s_tracking_option+"_web_measurement_id_option_val").attr('data-name');
|
341 |
-
var Ga4linkData = {
|
342 |
-
action: "link_analytic_to_ads_account",
|
343 |
-
type: "GA4",
|
344 |
-
ads_customer_id: google_ads_id,
|
345 |
-
web_property_id: jQuery("#"+s_tracking_option+"_web_measurement_id_option_val").attr("data-val"),
|
346 |
-
web_property: web_property,
|
347 |
-
tvc_data:tvc_data,
|
348 |
-
conversios_onboarding_nonce:conversios_onboarding_nonce
|
349 |
-
};
|
350 |
-
//console.log("web_property"+web_property);
|
351 |
-
if(google_ads_id != "" && web_property != undefined){
|
352 |
-
//setTimeout(function(){
|
353 |
-
//console.log("cal GA4 link");
|
354 |
-
//link_analytic_to_ads_account(Ga4linkData);
|
355 |
-
jQuery.ajax({
|
356 |
-
type: "POST",
|
357 |
-
dataType: "json",
|
358 |
-
url: tvc_ajax_url,
|
359 |
-
data: Ga4linkData,
|
360 |
-
success: function (response) {
|
361 |
-
//console.log(response);
|
362 |
-
clearTimeout(tvc_time_out);
|
363 |
-
if(response.error === false){
|
364 |
-
add_message("success","Google ananlytics and google ads linked successfully.");
|
365 |
-
}else{
|
366 |
-
//const errors = JSON.parse(response?.errors[0]);
|
367 |
-
//add_message("error",errors?.message);
|
368 |
-
}
|
369 |
-
}
|
370 |
-
});
|
371 |
-
//}, 1000);
|
372 |
}
|
373 |
}
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
}, 1000);
|
379 |
}
|
380 |
|
381 |
-
|
382 |
-
if(tracking_option == "BOTH"){
|
383 |
-
s_tracking_option = "both_ga4";
|
384 |
-
}
|
385 |
-
var web_property = jQuery("#"+s_tracking_option+"_web_measurement_id_option_val").attr('data-name');
|
386 |
-
var Ga4linkData = {
|
387 |
-
action: "link_analytic_to_ads_account",
|
388 |
-
type: "GA4",
|
389 |
-
ads_customer_id: google_ads_id,
|
390 |
-
web_property_id: jQuery("#"+s_tracking_option+"_web_measurement_id_option_val").attr("data-val"),
|
391 |
-
web_property: web_property,
|
392 |
-
tvc_data:tvc_data,
|
393 |
-
conversios_onboarding_nonce:conversios_onboarding_nonce
|
394 |
-
};
|
395 |
-
//console.log("web_property"+web_property);
|
396 |
-
if(google_ads_id != "" && web_property != undefined){
|
397 |
setTimeout(function(){
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
}else{
|
411 |
-
//const errors = JSON.parse(response?.errors[0]);
|
412 |
-
//add_message("error",errors?.message);
|
413 |
-
}
|
414 |
-
}
|
415 |
-
});
|
416 |
-
}, 1000);
|
417 |
-
}
|
418 |
-
/* end GA4 */
|
419 |
-
}
|
420 |
-
|
421 |
-
if(plan_id != 1){
|
422 |
-
setTimeout(function(){
|
423 |
-
check_oradd_conversion_list(google_ads_id, tvc_data);
|
424 |
-
}, 3500);
|
425 |
-
}
|
426 |
-
loaderSection(false);
|
427 |
-
return true;
|
428 |
-
}
|
429 |
-
|
430 |
-
}else{
|
431 |
-
var error_msg = response.errors;
|
432 |
-
//user_tracking_data(btn_cam, error_msg, 'conversios_onboarding','Save_Google_Ads_account');
|
433 |
-
add_message("error","Error while updating Google Ads.");
|
434 |
}
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
}else{
|
442 |
//jQuery('#tvc_ads_skip_confirm').addClass('showpopup');
|
443 |
//jQuery('body').addClass('scrlnone');
|
444 |
//jQuery('#tvc_ads_skip_confirm').modal('show');
|
445 |
-
is_validate_step("step_2");
|
446 |
return false;
|
447 |
}
|
|
|
448 |
}
|
449 |
function save_merchant_data(google_merchant_center_id, merchant_id, tvc_data, subscription_id, plan_id, is_skip=fals){
|
450 |
if(google_merchant_center_id || is_skip == true){
|
@@ -478,7 +413,7 @@ function save_merchant_data(google_merchant_center_id, merchant_id, tvc_data, su
|
|
478 |
|
479 |
if (response.error === false) {
|
480 |
var error_msg = 'null';
|
481 |
-
add_message("success","Google
|
482 |
//clearTimeout(tvc_time_out);
|
483 |
var link_data = {
|
484 |
action: "link_google_ads_to_merchant_center",
|
@@ -491,18 +426,19 @@ function save_merchant_data(google_merchant_center_id, merchant_id, tvc_data, su
|
|
491 |
if(google_merchant_center_id != "" && google_ads_id != ""){
|
492 |
link_google_Ads_to_merchant_center(link_data, tvc_data, subscription_id);
|
493 |
}else{
|
494 |
-
|
|
|
495 |
}
|
496 |
} else {
|
497 |
var error_msg = response.errors;
|
498 |
-
add_message("error","Error while updating Google
|
499 |
}
|
500 |
//user_tracking_data(btn_cam, error_msg,'conversios_onboarding','Save_Google_Merchant_account');
|
501 |
//loaderSection(false);
|
502 |
}
|
503 |
});
|
504 |
}else{
|
505 |
-
add_message("warning","Missing Google
|
506 |
}
|
507 |
}
|
508 |
|
@@ -580,11 +516,17 @@ function link_google_Ads_to_merchant_center(link_data, tvc_data, subscription_id
|
|
580 |
}else{
|
581 |
add_message("error","There was an error while link account");
|
582 |
}
|
583 |
-
get_subscription_details(tvc_data, subscription_id);
|
|
|
584 |
//loaderSection(false);
|
585 |
}
|
586 |
});
|
587 |
}
|
|
|
|
|
|
|
|
|
|
|
588 |
/* get subscription details */
|
589 |
function get_subscription_details(tvc_data, subscription_id) {
|
590 |
var conversios_onboarding_nonce = jQuery("#conversios_onboarding_nonce").val();
|
@@ -802,6 +744,7 @@ function list_googl_ads_account(tvc_data) {
|
|
802 |
add_message("warning","There are no Google ads accounts associated with email.");
|
803 |
} else {
|
804 |
if(response.data.length > 0){
|
|
|
805 |
jQuery.each(response.data, function (key, value) {
|
806 |
if (selectedValue == value) {
|
807 |
jQuery('#ads-account').append(jQuery('<option>', { value: value, text: value,selected: "selected"}));
|
@@ -837,7 +780,7 @@ function call_list_google_merchant_account(tvc_data){
|
|
837 |
//}
|
838 |
}
|
839 |
function list_google_merchant_account(tvc_data){
|
840 |
-
loaderSection(true);
|
841 |
var selectedValue = jQuery("#subscriptionMerchantCenId").val();
|
842 |
var conversios_onboarding_nonce = jQuery("#conversios_onboarding_nonce").val();
|
843 |
jQuery.ajax({
|
@@ -875,8 +818,10 @@ function list_google_merchant_account(tvc_data){
|
|
875 |
}
|
876 |
/*setTimeout(function(){
|
877 |
user_tracking_data(btn_cam, error_msg,'conversios_onboarding','Get_Google_Merchant_account_list');
|
878 |
-
}, 10000); */
|
879 |
-
|
|
|
|
|
880 |
$('#google_merchant_center_id').prop('disabled', false);
|
881 |
}
|
882 |
});
|
@@ -913,7 +858,7 @@ function create_google_ads_account(tvc_data){
|
|
913 |
jQuery("#invitationLink").html("");
|
914 |
}
|
915 |
|
916 |
-
jQuery("
|
917 |
jQuery("#new_google_ads_section").slideDown();
|
918 |
//localStorage.setItem("new_google_ads_id", response.data.adwords_id);
|
919 |
//listGoogleAdsAccount();
|
@@ -988,7 +933,7 @@ function create_google_merchant_center_account(tvc_data){
|
|
988 |
if (response.error === false || response.merchant_id != undefined) {
|
989 |
add_message("success","New merchant center created successfully.");
|
990 |
jQuery("#new_merchant_id").text(response.account.id);
|
991 |
-
jQuery("
|
992 |
jQuery("#new_merchant_section").slideDown();
|
993 |
} else if (response.error === true) {
|
994 |
const errors = JSON.parse(response.errors[0]);
|
105 |
jQuery("[data-id=step_3]").attr("data-is-done",0);
|
106 |
}); */
|
107 |
//step-2
|
108 |
+
/*jQuery(".google_ads_sel").on( "change", function() {
|
109 |
is_validate_step("step_2");
|
110 |
//jQuery(".onbrdstep-1").removeClass('selectedactivestep');
|
111 |
jQuery(".onbrdstep-3").removeClass('selectedactivestep');
|
113 |
//jQuery("[data-id=step_1]").attr("data-is-done",0);
|
114 |
jQuery("[data-id=step_2]").attr("data-is-done",0);
|
115 |
jQuery("[data-id=step_3]").attr("data-is-done",0);
|
116 |
+
}); */
|
117 |
jQuery('input[type=checkbox]:not(#adult_content, #terms_conditions)').change(function() {
|
118 |
//jQuery(".onbrdstep-1").removeClass('selectedactivestep');
|
119 |
jQuery(".onbrdstep-3").removeClass('selectedactivestep');
|
131 |
});
|
132 |
});
|
133 |
function validate_google_analytics_sel(){
|
134 |
+
//is_validate_step("step_1");
|
135 |
jQuery(".onbrdstep-1").removeClass('selectedactivestep');
|
136 |
jQuery(".onbrdstep-3").removeClass('selectedactivestep');
|
137 |
jQuery(".onbrdstep-2").removeClass('selectedactivestep');
|
139 |
jQuery("[data-id=step_2]").attr("data-is-done",0);
|
140 |
jQuery("[data-id=step_3]").attr("data-is-done",0);
|
141 |
}
|
142 |
+
//save analytics web properties and ads account while next button click
|
143 |
+
function save_google_ga_ads_data(google_ads_id, tvc_data, subscription_id, tracking_option){
|
144 |
+
var conversios_onboarding_nonce = jQuery("#conversios_onboarding_nonce").val();
|
145 |
+
if(subscription_id ){
|
146 |
+
//GA start
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
var web_measurement_id = "";
|
148 |
var web_property_id = "";
|
149 |
var ga4_account_id = "";
|
152 |
var msg ="";
|
153 |
if(tracking_option == "UA"){
|
154 |
web_property_id = jQuery('#ua_web_property_id_option_val').attr("data-val");
|
155 |
+
ua_account_id = jQuery("#ua_web_property_id_option_val").attr('data-accountid');
|
|
|
|
|
|
|
|
|
156 |
}else if(tracking_option == "GA4"){
|
157 |
web_measurement_id = jQuery('#ga4_web_measurement_id_option_val').attr("data-val");
|
158 |
+
ga4_account_id = jQuery("#ga4_web_measurement_id_option_val").attr('data-accountid');
|
159 |
+
}else if(tracking_option == "BOTH"){
|
|
|
|
|
|
|
|
|
160 |
web_property_id = jQuery('#both_ua_web_property_id_option_val').attr("data-val");
|
161 |
ua_account_id = jQuery("#both_ua_web_property_id_option_val").attr('data-accountid');
|
162 |
web_measurement_id = jQuery('#both_ga4_web_measurement_id_option_val').attr("data-val");
|
163 |
ga4_account_id = jQuery("#both_ga4_web_measurement_id_option_val").attr('data-accountid');
|
|
|
164 |
if(web_property_id == "" || web_measurement_id == ""){
|
165 |
is_valide = false;
|
166 |
msg = "Please select property/measurement id.";
|
167 |
}
|
168 |
}
|
169 |
+
loaderSection(true);
|
170 |
+
if(is_valide != true){
|
171 |
+
add_message("warning",msg);
|
172 |
+
loaderSection(false);
|
173 |
+
return false;
|
174 |
+
}else if(google_ads_id || web_property_id || web_measurement_id){
|
175 |
+
var data_ga =[]; data_ads = [];
|
176 |
+
if(web_property_id || web_measurement_id){
|
177 |
+
data_ga = {
|
178 |
+
action: "save_analytics_data",
|
179 |
+
subscription_id:subscription_id,
|
180 |
+
tracking_option: tracking_option,
|
181 |
+
web_measurement_id: web_measurement_id,
|
182 |
+
web_property_id: web_property_id,
|
183 |
+
ga4_account_id: ga4_account_id,
|
184 |
+
ua_account_id: ua_account_id,
|
185 |
+
enhanced_e_commerce_tracking: jQuery('#enhanced_e_commerce_tracking').is(':checked'),
|
186 |
+
user_time_tracking: jQuery('#user_time_tracking').is(':checked'),
|
187 |
+
add_gtag_snippet: jQuery('#add_gtag_snippet').is(':checked'),
|
188 |
+
client_id_tracking: jQuery('#client_id_tracking').is(':checked'),
|
189 |
+
exception_tracking: jQuery('#exception_tracking').is(':checked'),
|
190 |
+
enhanced_link_attribution_tracking: jQuery('#enhanced_link_attribution_tracking').is(':checked'),
|
191 |
+
tvc_data:tvc_data,
|
192 |
+
conversios_onboarding_nonce:conversios_onboarding_nonce
|
193 |
+
};
|
194 |
+
}
|
195 |
+
if(google_ads_id){
|
196 |
+
data_ads = {
|
197 |
+
action: "save_google_ads_data",
|
198 |
+
subscription_id:subscription_id,
|
199 |
+
google_ads_id: google_ads_id,
|
200 |
+
remarketing_tags: jQuery('#remarketing_tag').is(':checked'),
|
201 |
+
dynamic_remarketing_tags: jQuery('#dynamic_remarketing_tags').is(':checked'),
|
202 |
+
google_ads_conversion_tracking: jQuery("#google_ads_conversion_tracking").is(':checked'),
|
203 |
+
link_google_analytics_with_google_ads: jQuery("#link_google_analytics_with_google_ads").is(':checked'),
|
204 |
+
tvc_data:tvc_data,
|
205 |
+
conversios_onboarding_nonce:conversios_onboarding_nonce
|
206 |
+
};
|
207 |
+
}
|
208 |
+
var data = [];
|
209 |
+
if(Object.keys(data_ga).length > 0 && Object.keys(data_ads).length > 0 ){
|
210 |
+
data = Object.assign({},data_ga,data_ads);
|
211 |
+
}else if(Object.keys(data_ga).length > 0){
|
212 |
+
data = data_ga;
|
213 |
+
}else if(Object.keys(data_ads).length > 0){
|
214 |
+
data = data_ads;
|
215 |
+
}
|
216 |
+
//console.log("data",data);
|
217 |
jQuery.ajax({
|
218 |
type: "POST",
|
219 |
dataType: "json",
|
220 |
url: tvc_ajax_url,
|
221 |
data: data,
|
222 |
+
beforeSend: function () {
|
|
|
223 |
},
|
224 |
+
success: function (response) {
|
225 |
+
var btn_cam = 'save_ads';
|
226 |
+
if(response.error === false) {
|
|
|
|
|
|
|
227 |
var error_msg = 'null';
|
228 |
+
//user_tracking_data(btn_cam, error_msg, 'conversios_onboarding','Save_Google_Ads_account');
|
229 |
+
add_message("success","Google Analytics and Pixels successfully updated.");
|
230 |
+
let tracking_option = jQuery('input:radio[name=analytic_tag_type]:checked').val();
|
231 |
+
var s_tracking_option = tracking_option.toLowerCase();
|
232 |
+
|
233 |
+
if (jQuery("#link_google_analytics_with_google_ads").is(':checked')) {
|
234 |
+
if(tracking_option == "UA" || tracking_option == "BOTH"){
|
235 |
+
if(tracking_option == "BOTH"){
|
236 |
+
s_tracking_option = "both_ua";
|
237 |
+
}
|
238 |
+
var profile_id = jQuery("#"+s_tracking_option+"_web_property_id_option_val").attr('data-profileid');
|
239 |
+
var UalinkData = {
|
240 |
+
action: "link_analytic_to_ads_account",
|
241 |
+
type: "UA",
|
242 |
+
ads_customer_id: google_ads_id,
|
243 |
+
analytics_id: jQuery("#"+s_tracking_option+"_web_property_id_option_val").attr('data-accountid'),
|
244 |
+
web_property_id: jQuery("#"+s_tracking_option+"_web_property_id_option_val").attr("data-val"),
|
245 |
+
profile_id: profile_id,
|
246 |
+
tvc_data:tvc_data,
|
247 |
+
conversios_onboarding_nonce:conversios_onboarding_nonce
|
248 |
+
};
|
249 |
+
//console.log("google_ads_id"+google_ads_id+"profile_id"+profile_id);
|
250 |
+
//console.log(UalinkData);
|
251 |
+
if(google_ads_id != "" && profile_id != undefined){
|
252 |
+
setTimeout(function(){
|
253 |
+
//link_analytic_to_ads_account(UalinkData);
|
254 |
+
jQuery.ajax({
|
255 |
+
type: "POST",
|
256 |
+
dataType: "json",
|
257 |
+
url: tvc_ajax_url,
|
258 |
+
data: UalinkData,
|
259 |
+
success: function (response) {
|
260 |
+
clearTimeout(tvc_time_out);
|
261 |
+
if(response.error === false){
|
262 |
+
add_message("success","Google Ananlytics and Google Ads linked successfully.");
|
263 |
+
}else{
|
264 |
+
//const errors = JSON.parse(response?.errors[0]);
|
265 |
+
//add_message("error",errors?.message);
|
266 |
+
}
|
267 |
|
268 |
+
/* start GA4 */
|
269 |
+
if(tracking_option == "GA4" || tracking_option == "BOTH"){
|
270 |
+
if(tracking_option == "BOTH"){
|
271 |
+
s_tracking_option = "both_ga4";
|
272 |
+
}
|
273 |
+
var web_property = jQuery("#"+s_tracking_option+"_web_measurement_id_option_val").attr('data-name');
|
274 |
+
var Ga4linkData = {
|
275 |
+
action: "link_analytic_to_ads_account",
|
276 |
+
type: "GA4",
|
277 |
+
ads_customer_id: google_ads_id,
|
278 |
+
web_property_id: jQuery("#"+s_tracking_option+"_web_measurement_id_option_val").attr("data-val"),
|
279 |
+
web_property: web_property,
|
280 |
+
tvc_data:tvc_data,
|
281 |
+
conversios_onboarding_nonce:conversios_onboarding_nonce
|
282 |
+
};
|
283 |
+
//console.log("web_property"+web_property);
|
284 |
+
if(google_ads_id != "" && web_property != undefined){
|
285 |
+
//setTimeout(function(){
|
286 |
+
//console.log("cal GA4 link");
|
287 |
+
//link_analytic_to_ads_account(Ga4linkData);
|
288 |
+
jQuery.ajax({
|
289 |
+
type: "POST",
|
290 |
+
dataType: "json",
|
291 |
+
url: tvc_ajax_url,
|
292 |
+
data: Ga4linkData,
|
293 |
+
success: function (response) {
|
294 |
+
//console.log(response);
|
295 |
+
clearTimeout(tvc_time_out);
|
296 |
+
if(response.error === false){
|
297 |
+
add_message("success","Google ananlytics and google ads linked successfully.");
|
298 |
+
}else{
|
299 |
+
//const errors = JSON.parse(response?.errors[0]);
|
300 |
+
//add_message("error",errors?.message);
|
301 |
+
}
|
302 |
+
}
|
303 |
+
});
|
304 |
+
//}, 1000);
|
305 |
+
}
|
306 |
+
}
|
307 |
+
/* end GA4 */
|
308 |
|
309 |
+
}
|
310 |
+
});
|
311 |
+
}, 1000);
|
312 |
+
}
|
313 |
+
|
314 |
+
}else if(tracking_option == "GA4" || tracking_option == "BOTH"){
|
315 |
+
if(tracking_option == "BOTH"){
|
316 |
+
s_tracking_option = "both_ga4";
|
317 |
+
}
|
318 |
+
var web_property = jQuery("#"+s_tracking_option+"_web_measurement_id_option_val").attr('data-name');
|
319 |
+
var Ga4linkData = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
action: "link_analytic_to_ads_account",
|
321 |
+
type: "GA4",
|
322 |
ads_customer_id: google_ads_id,
|
323 |
+
web_property_id: jQuery("#"+s_tracking_option+"_web_measurement_id_option_val").attr("data-val"),
|
324 |
+
web_property: web_property,
|
|
|
325 |
tvc_data:tvc_data,
|
326 |
conversios_onboarding_nonce:conversios_onboarding_nonce
|
327 |
+
};
|
328 |
+
//console.log("web_property"+web_property);
|
329 |
+
if(google_ads_id != "" && web_property != undefined){
|
330 |
+
setTimeout(function(){
|
331 |
+
//console.log("cal GA4 link");
|
332 |
+
//link_analytic_to_ads_account(Ga4linkData);
|
333 |
+
jQuery.ajax({
|
334 |
+
type: "POST",
|
335 |
+
dataType: "json",
|
336 |
+
url: tvc_ajax_url,
|
337 |
+
data: Ga4linkData,
|
338 |
+
success: function (response) {
|
339 |
+
//console.log(response);
|
340 |
+
clearTimeout(tvc_time_out);
|
341 |
+
if(response.error === false){
|
342 |
+
add_message("success","Google Ananlytics and Google Ads linked successfully.");
|
343 |
+
}else{
|
344 |
+
//const errors = JSON.parse(response?.errors[0]);
|
345 |
+
//add_message("error",errors?.message);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
}
|
347 |
}
|
348 |
+
});
|
349 |
+
}, 1000);
|
350 |
+
}
|
351 |
+
/* end GA4 */
|
|
|
352 |
}
|
353 |
|
354 |
+
if(plan_id != 1){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
355 |
setTimeout(function(){
|
356 |
+
check_oradd_conversion_list(google_ads_id, tvc_data);
|
357 |
+
}, 3500);
|
358 |
+
}
|
359 |
+
loaderSection(false);
|
360 |
+
return true;
|
361 |
+
}
|
362 |
+
}else{
|
363 |
+
var error_msg = response.errors;
|
364 |
+
//user_tracking_data(btn_cam, error_msg, 'conversios_onboarding','Save_Google_Ads_account');
|
365 |
+
add_message("error","Error while updating Google Ads.");
|
366 |
+
}
|
367 |
+
//loaderSection(false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
368 |
}
|
369 |
+
});
|
370 |
+
return true;
|
371 |
+
}else{
|
372 |
+
// no any data need to save
|
373 |
+
return true;
|
374 |
+
}
|
375 |
}else{
|
376 |
//jQuery('#tvc_ads_skip_confirm').addClass('showpopup');
|
377 |
//jQuery('body').addClass('scrlnone');
|
378 |
//jQuery('#tvc_ads_skip_confirm').modal('show');
|
379 |
+
//is_validate_step("step_2");
|
380 |
return false;
|
381 |
}
|
382 |
+
return true;
|
383 |
}
|
384 |
function save_merchant_data(google_merchant_center_id, merchant_id, tvc_data, subscription_id, plan_id, is_skip=fals){
|
385 |
if(google_merchant_center_id || is_skip == true){
|
413 |
|
414 |
if (response.error === false) {
|
415 |
var error_msg = 'null';
|
416 |
+
add_message("success","Google Merchant Center account successfully updated.");
|
417 |
//clearTimeout(tvc_time_out);
|
418 |
var link_data = {
|
419 |
action: "link_google_ads_to_merchant_center",
|
426 |
if(google_merchant_center_id != "" && google_ads_id != ""){
|
427 |
link_google_Ads_to_merchant_center(link_data, tvc_data, subscription_id);
|
428 |
}else{
|
429 |
+
//show_conform_popup();
|
430 |
+
//get_subscription_details(tvc_data, subscription_id);
|
431 |
}
|
432 |
} else {
|
433 |
var error_msg = response.errors;
|
434 |
+
add_message("error","Error while updating Google Merchant Center.");
|
435 |
}
|
436 |
//user_tracking_data(btn_cam, error_msg,'conversios_onboarding','Save_Google_Merchant_account');
|
437 |
//loaderSection(false);
|
438 |
}
|
439 |
});
|
440 |
}else{
|
441 |
+
add_message("warning","Missing Google Merchant Center account.");
|
442 |
}
|
443 |
}
|
444 |
|
516 |
}else{
|
517 |
add_message("error","There was an error while link account");
|
518 |
}
|
519 |
+
//get_subscription_details(tvc_data, subscription_id);
|
520 |
+
//show_conform_popup();
|
521 |
//loaderSection(false);
|
522 |
}
|
523 |
});
|
524 |
}
|
525 |
+
function show_conform_popup(){
|
526 |
+
loaderSection(false);
|
527 |
+
jQuery('#tvc_confirm_submite').addClass('showpopup');
|
528 |
+
jQuery('body').addClass('scrlnone');
|
529 |
+
}
|
530 |
/* get subscription details */
|
531 |
function get_subscription_details(tvc_data, subscription_id) {
|
532 |
var conversios_onboarding_nonce = jQuery("#conversios_onboarding_nonce").val();
|
744 |
add_message("warning","There are no Google ads accounts associated with email.");
|
745 |
} else {
|
746 |
if(response.data.length > 0){
|
747 |
+
jQuery('#ads-account').append(jQuery('<option>', { value: '', text: 'Select Google Ads Account',}));
|
748 |
jQuery.each(response.data, function (key, value) {
|
749 |
if (selectedValue == value) {
|
750 |
jQuery('#ads-account').append(jQuery('<option>', { value: value, text: value,selected: "selected"}));
|
780 |
//}
|
781 |
}
|
782 |
function list_google_merchant_account(tvc_data){
|
783 |
+
//loaderSection(true);
|
784 |
var selectedValue = jQuery("#subscriptionMerchantCenId").val();
|
785 |
var conversios_onboarding_nonce = jQuery("#conversios_onboarding_nonce").val();
|
786 |
jQuery.ajax({
|
818 |
}
|
819 |
/*setTimeout(function(){
|
820 |
user_tracking_data(btn_cam, error_msg,'conversios_onboarding','Get_Google_Merchant_account_list');
|
821 |
+
}, 10000); */
|
822 |
+
setTimeout(function(){
|
823 |
+
loaderSection(false);
|
824 |
+
}, 2000);
|
825 |
$('#google_merchant_center_id').prop('disabled', false);
|
826 |
}
|
827 |
});
|
858 |
jQuery("#invitationLink").html("");
|
859 |
}
|
860 |
|
861 |
+
jQuery(".tvc_ads_section").slideUp();
|
862 |
jQuery("#new_google_ads_section").slideDown();
|
863 |
//localStorage.setItem("new_google_ads_id", response.data.adwords_id);
|
864 |
//listGoogleAdsAccount();
|
933 |
if (response.error === false || response.merchant_id != undefined) {
|
934 |
add_message("success","New merchant center created successfully.");
|
935 |
jQuery("#new_merchant_id").text(response.account.id);
|
936 |
+
jQuery(".tvc_merchant_section").slideUp();
|
937 |
jQuery("#new_merchant_section").slideDown();
|
938 |
} else if (response.error === true) {
|
939 |
const errors = JSON.parse(response.errors[0]);
|
admin/partials/general-fields.php
CHANGED
@@ -48,6 +48,10 @@ if(isset($_POST['ee_submit_plugin'])){
|
|
48 |
foreach($tracking_integration as $val){
|
49 |
$settings[$val] = isset($_POST[$val])?sanitize_text_field($_POST[$val]):"";
|
50 |
}
|
|
|
|
|
|
|
|
|
51 |
|
52 |
$settings['fb_pixel_id'] = isset($_POST["fb_pixel_id"])?sanitize_text_field($_POST["fb_pixel_id"]):"";
|
53 |
$settings['ga4_api_secret'] = isset($_POST["ga4_api_secret"])?sanitize_text_field($_POST["ga4_api_secret"]):"";
|
@@ -108,12 +112,17 @@ if(isset($_POST['ee_submit_plugin'])){
|
|
108 |
$data = unserialize(get_option('ee_options'));
|
109 |
$this->current_customer_id = $TVC_Admin_Helper->get_currentCustomerId();
|
110 |
$subscription_id = $TVC_Admin_Helper->get_subscriptionId();
|
|
|
|
|
|
|
|
|
111 |
$TVC_Admin_Helper->add_spinner_html();
|
|
|
112 |
|
113 |
//$googleDetail = "";
|
114 |
|
115 |
?>
|
116 |
-
<div class="tab-content">
|
117 |
<?php
|
118 |
if(!empty($validate_pixels)){
|
119 |
foreach($validate_pixels as $erkey => $erval){
|
@@ -152,13 +161,17 @@ $TVC_Admin_Helper->add_spinner_html();
|
|
152 |
<div class="con-setting-container">
|
153 |
<table class="table">
|
154 |
<tbody>
|
|
|
|
|
|
|
155 |
<tr>
|
156 |
<th width="155px">
|
157 |
<label class="ga-title align-middle" for="tracking_method"><?php esc_html_e("Tracking Method","enhanced-e-commerce-for-woocommerce-store"); ?></label><span class="con_new_features">New</span>
|
|
|
158 |
</th>
|
159 |
<td>
|
160 |
<label class="align-middle">
|
161 |
-
<?php
|
162 |
$list = array(
|
163 |
"gtag" => "gtag.js",
|
164 |
"gtm" => "Google Tag Manager"
|
@@ -178,40 +191,48 @@ $TVC_Admin_Helper->add_spinner_html();
|
|
178 |
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
179 |
</div>
|
180 |
</label>
|
|
|
181 |
</td>
|
182 |
</tr>
|
183 |
-
|
|
|
|
|
|
|
|
|
184 |
<tr class="only-for-gtm <?php echo ($tracking_method != "gtm")?"tvc-hide":""; ?>">
|
185 |
<th>
|
186 |
-
<label class="ga-title align-middle"><?php esc_html_e("
|
187 |
</th>
|
188 |
<td>
|
189 |
-
<?php
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
<div class="tvc-custom-control tvc-custom-checkbox">
|
196 |
-
<input type="checkbox" class="tvc-custom-control-input" id="want_to_use_your_gtm" name="want_to_use_your_gtm" value="1"<?php echo (esc_attr($want_to_use_your_gtm) == 1) ? 'checked="checked"' : ''; ?>>
|
197 |
-
<label class="custom-control-label" for="want_to_use_your_gtm"><?php esc_html_e("Add Your GTM ID","enhanced-e-commerce-for-woocommerce-store"); ?>
|
198 |
-
</label>
|
199 |
-
</div>
|
200 |
</label>
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
</div>
|
209 |
-
|
210 |
-
<?php }else{
|
211 |
-
?>
|
212 |
-
<a target="_blank" href="<?php echo esc_url_raw($this->get_pro_plan_site().'?utm_source=EE+Plugin+User+Interface&utm_medium=Pixel+Settings+upgrading+Pro+to+Use+Own+GTM&utm_campaign=Upsell+at+Conversios'); ?>" class="upgradebtn">Upgrade PRO to Use Your Own GTM</a>
|
213 |
-
<?php
|
214 |
-
}?>
|
215 |
</td>
|
216 |
</tr>
|
217 |
|
@@ -310,7 +331,7 @@ $TVC_Admin_Helper->add_spinner_html();
|
|
310 |
<!-- End Other Pixel Settings section -->
|
311 |
</tbody>
|
312 |
</table>
|
313 |
-
<table class="table
|
314 |
<tbody>
|
315 |
<!-- Start Other Pixel Settings section -->
|
316 |
<tr>
|
@@ -319,7 +340,7 @@ $TVC_Admin_Helper->add_spinner_html();
|
|
319 |
</th>
|
320 |
<td>
|
321 |
<?php $microsoft_ads_pixel_id = isset($data['microsoft_ads_pixel_id'])?$data['microsoft_ads_pixel_id']:""; ?>
|
322 |
-
<input type="text" class="fromfiled" name="microsoft_ads_pixel_id" id="microsoft_ads_pixel_id" value="<?php echo esc_attr($microsoft_ads_pixel_id); ?>">
|
323 |
<div class="tvc-tooltip">
|
324 |
<span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("The Microsoft Ads pixel ID looks like. 343003931 ","enhanced-e-commerce-for-woocommerce-store"); ?></span>
|
325 |
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
@@ -332,7 +353,7 @@ $TVC_Admin_Helper->add_spinner_html();
|
|
332 |
</th>
|
333 |
<td>
|
334 |
<?php $twitter_ads_pixel_id = isset($data['twitter_ads_pixel_id'])?$data['twitter_ads_pixel_id']:""; ?>
|
335 |
-
<input type="text" class="fromfiled" name="twitter_ads_pixel_id" id="twitter_ads_pixel_id" value="<?php echo esc_attr($twitter_ads_pixel_id); ?>">
|
336 |
<div class="tvc-tooltip">
|
337 |
<span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("The Twitter Ads pixel ID looks like. ocihb","enhanced-e-commerce-for-woocommerce-store"); ?></span>
|
338 |
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
@@ -345,7 +366,7 @@ $TVC_Admin_Helper->add_spinner_html();
|
|
345 |
</th>
|
346 |
<td>
|
347 |
<?php $pinterest_ads_pixel_id = isset($data['pinterest_ads_pixel_id'])?$data['pinterest_ads_pixel_id']:""; ?>
|
348 |
-
<input type="text" class="fromfiled" name="pinterest_ads_pixel_id" id="pinterest_ads_pixel_id" value="<?php echo esc_attr($pinterest_ads_pixel_id); ?>">
|
349 |
<div class="tvc-tooltip">
|
350 |
<span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("The Pinterest Ads pixel ID looks like. 2612831678022","enhanced-e-commerce-for-woocommerce-store"); ?></span>
|
351 |
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
@@ -358,7 +379,7 @@ $TVC_Admin_Helper->add_spinner_html();
|
|
358 |
</th>
|
359 |
<td>
|
360 |
<?php $snapchat_ads_pixel_id = isset($data['snapchat_ads_pixel_id'])?$data['snapchat_ads_pixel_id']:""; ?>
|
361 |
-
<input type="text" class="fromfiled" name="snapchat_ads_pixel_id" id="snapchat_ads_pixel_id" value="<?php echo esc_attr($snapchat_ads_pixel_id); ?>">
|
362 |
<div class="tvc-tooltip">
|
363 |
<span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("The Snapchat Ads pixel ID looks like. 12e1ec0a-90aa-4267-b1a0-182c455711e9","enhanced-e-commerce-for-woocommerce-store"); ?></span>
|
364 |
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
@@ -371,7 +392,7 @@ $TVC_Admin_Helper->add_spinner_html();
|
|
371 |
</th>
|
372 |
<td>
|
373 |
<?php $tiKtok_ads_pixel_id = isset($data['tiKtok_ads_pixel_id'])?$data['tiKtok_ads_pixel_id']:""; ?>
|
374 |
-
<input type="text" class="fromfiled" name="tiKtok_ads_pixel_id" id="tiKtok_ads_pixel_id" value="<?php echo esc_attr($tiKtok_ads_pixel_id); ?>">
|
375 |
<div class="tvc-tooltip">
|
376 |
<span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("The TiKTok Ads pixel ID looks like. CBET743C77U5BM7P178N","enhanced-e-commerce-for-woocommerce-store"); ?></span>
|
377 |
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
@@ -915,10 +936,10 @@ $TVC_Admin_Helper->add_spinner_html();
|
|
915 |
</div>
|
916 |
<?php }else{?>
|
917 |
<label class="align-middle">
|
918 |
-
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'); ?>" class="config-success"><label class="custom-control-label"><?php esc_html_e("Enable Google Ads conversion tracking","enhanced-e-commerce-for-woocommerce-store"); ?><
|
919 |
</label>
|
920 |
<label class="align-middle">
|
921 |
-
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'); ?>" class="config-success"><label class="custom-control-label"><?php esc_html_e("Enable Google Ads Enhanced conversion tracking","enhanced-e-commerce-for-woocommerce-store"); ?><
|
922 |
</label>
|
923 |
<?php } ?>
|
924 |
</div>
|
@@ -984,11 +1005,14 @@ jQuery(document).ready(function () {
|
|
984 |
jQuery(document).on('change','#tracking_method',function(event){
|
985 |
if(jQuery(this).val() != "gtm"){
|
986 |
jQuery(".only-for-gtm").addClass("tvc-hide");
|
|
|
|
|
987 |
}else{
|
988 |
jQuery(".only-for-gtm").removeClass("tvc-hide");
|
|
|
989 |
}
|
990 |
});
|
991 |
-
if (jQuery("#want_to_use_your_gtm").is(":checked")) {
|
992 |
jQuery("#use_your_gtm_id").removeClass("tvc-hide");
|
993 |
}else{
|
994 |
jQuery("#use_your_gtm_id").addClass("tvc-hide");
|
@@ -1002,6 +1026,20 @@ jQuery(document).ready(function () {
|
|
1002 |
jQuery("#use_your_gtm_id").addClass("tvc-hide");
|
1003 |
//jQuery("#use_your_gtm_id").val("");
|
1004 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1005 |
});
|
1006 |
|
1007 |
jQuery(document).on('submit','form#ee_plugin_form',function(event){
|
48 |
foreach($tracking_integration as $val){
|
49 |
$settings[$val] = isset($_POST[$val])?sanitize_text_field($_POST[$val]):"";
|
50 |
}
|
51 |
+
|
52 |
+
if($plan_id == 1){
|
53 |
+
$settings['want_to_use_your_gtm'] = 0;
|
54 |
+
}
|
55 |
|
56 |
$settings['fb_pixel_id'] = isset($_POST["fb_pixel_id"])?sanitize_text_field($_POST["fb_pixel_id"]):"";
|
57 |
$settings['ga4_api_secret'] = isset($_POST["ga4_api_secret"])?sanitize_text_field($_POST["ga4_api_secret"]):"";
|
112 |
$data = unserialize(get_option('ee_options'));
|
113 |
$this->current_customer_id = $TVC_Admin_Helper->get_currentCustomerId();
|
114 |
$subscription_id = $TVC_Admin_Helper->get_subscriptionId();
|
115 |
+
if(!$subscription_id){
|
116 |
+
wp_redirect("admin.php?page=conversios_onboarding");
|
117 |
+
exit;
|
118 |
+
}
|
119 |
$TVC_Admin_Helper->add_spinner_html();
|
120 |
+
$is_show_tracking_method_options = $TVC_Admin_Helper->is_show_tracking_method_options($subscription_id);
|
121 |
|
122 |
//$googleDetail = "";
|
123 |
|
124 |
?>
|
125 |
+
<div class="con-tab-content">
|
126 |
<?php
|
127 |
if(!empty($validate_pixels)){
|
128 |
foreach($validate_pixels as $erkey => $erval){
|
161 |
<div class="con-setting-container">
|
162 |
<table class="table">
|
163 |
<tbody>
|
164 |
+
<?php
|
165 |
+
$tracking_method = isset($data['tracking_method'])?$data['tracking_method']:"gtag";
|
166 |
+
if( $is_show_tracking_method_options){?>
|
167 |
<tr>
|
168 |
<th width="155px">
|
169 |
<label class="ga-title align-middle" for="tracking_method"><?php esc_html_e("Tracking Method","enhanced-e-commerce-for-woocommerce-store"); ?></label><span class="con_new_features">New</span>
|
170 |
+
|
171 |
</th>
|
172 |
<td>
|
173 |
<label class="align-middle">
|
174 |
+
<?php
|
175 |
$list = array(
|
176 |
"gtag" => "gtag.js",
|
177 |
"gtm" => "Google Tag Manager"
|
191 |
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
192 |
</div>
|
193 |
</label>
|
194 |
+
<small><?php esc_html_e("Recommended : Select GTM for all pixel tracking, accuracy and faster page load.","enhanced-e-commerce-for-woocommerce-store"); ?></small>
|
195 |
</td>
|
196 |
</tr>
|
197 |
+
<?php }else{ $tracking_method = "gtm"; ?>
|
198 |
+
<input type="hidden" name="tracking_method" id="tracking_method" value="gtm">
|
199 |
+
<?php
|
200 |
+
//echo "only GTM";
|
201 |
+
}?>
|
202 |
<tr class="only-for-gtm <?php echo ($tracking_method != "gtm")?"tvc-hide":""; ?>">
|
203 |
<th>
|
204 |
+
<label class="ga-title align-middle"><?php esc_html_e("Google tag manager container id","enhanced-e-commerce-for-woocommerce-store"); ?></label>
|
205 |
</th>
|
206 |
<td>
|
207 |
+
<?php $want_to_use_your_gtm = (isset($data['want_to_use_your_gtm']) && $data['want_to_use_your_gtm'] != "")?$data['want_to_use_your_gtm']:"0"; ?>
|
208 |
+
<div class="cstmrdobtn-item">
|
209 |
+
<label for="want_to_use_your_gtm_default">
|
210 |
+
<input type="radio" <?php echo esc_attr(($want_to_use_your_gtm == "0")?'checked="checked"':''); ?> name="want_to_use_your_gtm" id="want_to_use_your_gtm_default" value="0">
|
211 |
+
<span class="checkmark"></span>
|
212 |
+
<?php esc_html_e("Default (Conversios container - GTM-K7X94DG)","enhanced-e-commerce-for-woocommerce-store"); ?>
|
|
|
|
|
|
|
|
|
|
|
213 |
</label>
|
214 |
+
</div>
|
215 |
+
<div class="cstmrdobtn-item">
|
216 |
+
<label for="want_to_use_your_gtm_own">
|
217 |
+
<input type="radio" <?php echo esc_attr(($want_to_use_your_gtm == "1")?'checked="checked"':''); ?> name="want_to_use_your_gtm" id="want_to_use_your_gtm_own" value="1">
|
218 |
+
<span class="checkmark"></span>
|
219 |
+
<?php esc_html_e("Use your own GTM container","enhanced-e-commerce-for-woocommerce-store"); ?>
|
220 |
+
<?php if($plan_id==1){ ?>
|
221 |
+
<a target="_blank" href="<?php echo esc_url_raw($TVC_Admin_Helper->get_pro_plan_site().'?utm_source=EE+Plugin+User+Interface&utm_medium=Pixel+Settings+upgrading+Pro+to+Use+Own+GTM+Link&utm_campaign=Upsell+at+Conversios'); ?>" class="tvc-pro"> (Upgrade to PRO)</a>
|
222 |
+
<?php } ?>
|
223 |
+
</label>
|
224 |
+
<div id="htnl_want_to_use_your_gtm_own" class="slctunivr-filed_gtm pl-2">
|
225 |
+
<?php if($plan_id != 1){ $use_your_gtm_id = isset($data['use_your_gtm_id'])?$data['use_your_gtm_id']:""; ?>
|
226 |
+
<div class="use_your_gtm_id">
|
227 |
+
<input type="text" class="fromfiled" name="use_your_gtm_id" id="use_your_gtm_id" value="<?php echo esc_attr($use_your_gtm_id); ?>">
|
228 |
+
<p><strong><a href="<?php echo esc_url_raw("https://".TVC_AUTH_CONNECT_URL."/help-center/configure_our_plugin_with_your_gtm.pdf"); ?>" target="_blank"><?php esc_html_e("How to import Conversios GTM container?","enhanced-e-commerce-for-woocommerce-store"); ?></a></strong></p>
|
229 |
+
</div>
|
230 |
+
<?php } else{?>
|
231 |
+
<a target="_blank" href="<?php echo esc_url_raw($TVC_Admin_Helper->get_pro_plan_site().'?utm_source=EE+Plugin+User+Interface&utm_medium=Pixel+Settings+upgrading+Pro+to+Use+Own+GTM&utm_campaign=Upsell+at+Conversios'); ?>" class="upgradebtn"><?php esc_html_e("Upgrade to PRO","enhanced-e-commerce-for-woocommerce-store"); ?></a>
|
232 |
+
<?php
|
233 |
+
}?>
|
234 |
</div>
|
235 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
236 |
</td>
|
237 |
</tr>
|
238 |
|
331 |
<!-- End Other Pixel Settings section -->
|
332 |
</tbody>
|
333 |
</table>
|
334 |
+
<table class="table">
|
335 |
<tbody>
|
336 |
<!-- Start Other Pixel Settings section -->
|
337 |
<tr>
|
340 |
</th>
|
341 |
<td>
|
342 |
<?php $microsoft_ads_pixel_id = isset($data['microsoft_ads_pixel_id'])?$data['microsoft_ads_pixel_id']:""; ?>
|
343 |
+
<input type="text" class="fromfiled only-for-gtm-lock" <?php echo ($tracking_method != "gtm")?"disabled":""; ?> name="microsoft_ads_pixel_id" id="microsoft_ads_pixel_id" value="<?php echo esc_attr($microsoft_ads_pixel_id); ?>">
|
344 |
<div class="tvc-tooltip">
|
345 |
<span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("The Microsoft Ads pixel ID looks like. 343003931 ","enhanced-e-commerce-for-woocommerce-store"); ?></span>
|
346 |
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
353 |
</th>
|
354 |
<td>
|
355 |
<?php $twitter_ads_pixel_id = isset($data['twitter_ads_pixel_id'])?$data['twitter_ads_pixel_id']:""; ?>
|
356 |
+
<input type="text" class="fromfiled only-for-gtm-lock" <?php echo ($tracking_method != "gtm")?"disabled":""; ?> name="twitter_ads_pixel_id" id="twitter_ads_pixel_id" value="<?php echo esc_attr($twitter_ads_pixel_id); ?>">
|
357 |
<div class="tvc-tooltip">
|
358 |
<span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("The Twitter Ads pixel ID looks like. ocihb","enhanced-e-commerce-for-woocommerce-store"); ?></span>
|
359 |
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
366 |
</th>
|
367 |
<td>
|
368 |
<?php $pinterest_ads_pixel_id = isset($data['pinterest_ads_pixel_id'])?$data['pinterest_ads_pixel_id']:""; ?>
|
369 |
+
<input type="text" class="fromfiled only-for-gtm-lock" <?php echo ($tracking_method != "gtm")?"disabled":""; ?> name="pinterest_ads_pixel_id" id="pinterest_ads_pixel_id" value="<?php echo esc_attr($pinterest_ads_pixel_id); ?>">
|
370 |
<div class="tvc-tooltip">
|
371 |
<span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("The Pinterest Ads pixel ID looks like. 2612831678022","enhanced-e-commerce-for-woocommerce-store"); ?></span>
|
372 |
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
379 |
</th>
|
380 |
<td>
|
381 |
<?php $snapchat_ads_pixel_id = isset($data['snapchat_ads_pixel_id'])?$data['snapchat_ads_pixel_id']:""; ?>
|
382 |
+
<input type="text" class="fromfiled only-for-gtm-lock" <?php echo ($tracking_method != "gtm")?"disabled":""; ?> name="snapchat_ads_pixel_id" id="snapchat_ads_pixel_id" value="<?php echo esc_attr($snapchat_ads_pixel_id); ?>">
|
383 |
<div class="tvc-tooltip">
|
384 |
<span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("The Snapchat Ads pixel ID looks like. 12e1ec0a-90aa-4267-b1a0-182c455711e9","enhanced-e-commerce-for-woocommerce-store"); ?></span>
|
385 |
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
392 |
</th>
|
393 |
<td>
|
394 |
<?php $tiKtok_ads_pixel_id = isset($data['tiKtok_ads_pixel_id'])?$data['tiKtok_ads_pixel_id']:""; ?>
|
395 |
+
<input type="text" class="fromfiled only-for-gtm-lock" <?php echo ($tracking_method != "gtm")?"disabled":""; ?> name="tiKtok_ads_pixel_id" id="tiKtok_ads_pixel_id" value="<?php echo esc_attr($tiKtok_ads_pixel_id); ?>">
|
396 |
<div class="tvc-tooltip">
|
397 |
<span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("The TiKTok Ads pixel ID looks like. CBET743C77U5BM7P178N","enhanced-e-commerce-for-woocommerce-store"); ?></span>
|
398 |
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
936 |
</div>
|
937 |
<?php }else{?>
|
938 |
<label class="align-middle">
|
939 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'); ?>" class="config-success"><label class="custom-control-label"><?php esc_html_e("Enable Google Ads conversion tracking","enhanced-e-commerce-for-woocommerce-store"); ?><a target="_blank" href="<?php echo esc_url_raw($TVC_Admin_Helper->get_pro_plan_site().'?utm_source=EE+Plugin+User+Interface&utm_medium=Pixel+Settings+upgrading+Pro+to+Use+Google+Ads+Conversion+Tracking+Link&utm_campaign=Upsell+at+Conversios'); ?>" class="tvc-pro"> (Upgrade to PRO)</a></label>
|
940 |
</label>
|
941 |
<label class="align-middle">
|
942 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'); ?>" class="config-success"><label class="custom-control-label"><?php esc_html_e("Enable Google Ads Enhanced conversion tracking","enhanced-e-commerce-for-woocommerce-store"); ?><a target="_blank" href="<?php echo esc_url_raw($TVC_Admin_Helper->get_pro_plan_site().'?utm_source=EE+Plugin+User+Interface&utm_medium=Pixel+Settings+upgrading+Pro+to+Use+Google+Ads+Enhanced+Conversion+Tracking+Link&utm_campaign=Upsell+at+Conversios'); ?>" class="tvc-pro"> (Upgrade to PRO)</a></label>
|
943 |
</label>
|
944 |
<?php } ?>
|
945 |
</div>
|
1005 |
jQuery(document).on('change','#tracking_method',function(event){
|
1006 |
if(jQuery(this).val() != "gtm"){
|
1007 |
jQuery(".only-for-gtm").addClass("tvc-hide");
|
1008 |
+
jQuery(".only-for-gtm-lock").val("");
|
1009 |
+
jQuery(".only-for-gtm-lock").prop('disabled', true);
|
1010 |
}else{
|
1011 |
jQuery(".only-for-gtm").removeClass("tvc-hide");
|
1012 |
+
jQuery(".only-for-gtm-lock").prop('disabled', false);
|
1013 |
}
|
1014 |
});
|
1015 |
+
/*if (jQuery("#want_to_use_your_gtm").is(":checked")) {
|
1016 |
jQuery("#use_your_gtm_id").removeClass("tvc-hide");
|
1017 |
}else{
|
1018 |
jQuery("#use_your_gtm_id").addClass("tvc-hide");
|
1026 |
jQuery("#use_your_gtm_id").addClass("tvc-hide");
|
1027 |
//jQuery("#use_your_gtm_id").val("");
|
1028 |
}
|
1029 |
+
});*/
|
1030 |
+
|
1031 |
+
let want_to_use_your_gtm = jQuery("input[type=radio][name=want_to_use_your_gtm]:checked").attr("id");
|
1032 |
+
console.log(want_to_use_your_gtm);
|
1033 |
+
if(want_to_use_your_gtm != ""){
|
1034 |
+
jQuery(".slctunivr-filed_gtm").slideUp();
|
1035 |
+
jQuery("#htnl_"+want_to_use_your_gtm).slideDown();
|
1036 |
+
}
|
1037 |
+
jQuery("input[type=radio][name=want_to_use_your_gtm]").on( "change", function() {
|
1038 |
+
let want_to_use_your_gtm = jQuery(this).attr("id");
|
1039 |
+
//console.log(want_to_use_your_gtm);
|
1040 |
+
//is_validate_step("step_1");
|
1041 |
+
jQuery(".slctunivr-filed_gtm").slideUp();
|
1042 |
+
jQuery("#htnl_"+want_to_use_your_gtm).slideDown();
|
1043 |
});
|
1044 |
|
1045 |
jQuery(document).on('submit','form#ee_plugin_form',function(event){
|
admin/partials/pricings.php
CHANGED
@@ -21,7 +21,7 @@ class TVC_Pricings {
|
|
21 |
$close_icon = esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/close.png');
|
22 |
$check_icon = esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/check.png');
|
23 |
?>
|
24 |
-
<div class="tab-content">
|
25 |
<div class="tab-pane show active" id="tvc-account-page">
|
26 |
<div class="tab-card" >
|
27 |
<div class="tvc-price-table-features columns-5">
|
21 |
$close_icon = esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/close.png');
|
22 |
$check_icon = esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/check.png');
|
23 |
?>
|
24 |
+
<div class="con-tab-content">
|
25 |
<div class="tab-pane show active" id="tvc-account-page">
|
26 |
<div class="tab-card" >
|
27 |
<div class="tvc-price-table-features columns-5">
|
enhanced-ecommerce-google-analytics.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* Plugin Name: Conversios.io - All-in-one Google Analytics, Pixels and Product Feed Manager for WooCommerce
|
16 |
* Plugin URI: https://www.conversios.io/
|
17 |
* Description: Track Ecommerce events and conversions in Google Analytics, GA4, Google Ads, Facebook Pixel, Snapchat, Pinterest, Tiktok, Bing via Google Tag Manager. Build dynamic audiences and track ROAS performance in Google Ads, Meta (Facebook + Instagram), Snapchat, Pinterest, Tiktok, Microsoft Ads and Twitter to run successful shopping campaigns. Automate your product feed to Google Merchant Center for running performance max campaigns for your WooCommerce products to boost ROAS (Revenue on Ad Spends).
|
18 |
-
* Version: 5.0
|
19 |
* Author: Conversios
|
20 |
* Author URI: conversios.io
|
21 |
* License: GPL-2.0+
|
@@ -37,7 +37,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
37 |
* Start at version 1.0.0 and use SemVer - https://semver.org
|
38 |
* Rename this for your plugin and update it as you release new versions.
|
39 |
*/
|
40 |
-
define( 'PLUGIN_TVC_VERSION', '5.0
|
41 |
$fullName = plugin_basename( __FILE__ );
|
42 |
$dir = str_replace('/enhanced-ecommerce-google-analytics.php','',$fullName);
|
43 |
if ( ! defined( 'ENHANCAD_PLUGIN_NAME' ) ) {
|
15 |
* Plugin Name: Conversios.io - All-in-one Google Analytics, Pixels and Product Feed Manager for WooCommerce
|
16 |
* Plugin URI: https://www.conversios.io/
|
17 |
* Description: Track Ecommerce events and conversions in Google Analytics, GA4, Google Ads, Facebook Pixel, Snapchat, Pinterest, Tiktok, Bing via Google Tag Manager. Build dynamic audiences and track ROAS performance in Google Ads, Meta (Facebook + Instagram), Snapchat, Pinterest, Tiktok, Microsoft Ads and Twitter to run successful shopping campaigns. Automate your product feed to Google Merchant Center for running performance max campaigns for your WooCommerce products to boost ROAS (Revenue on Ad Spends).
|
18 |
+
* Version: 5.1.0
|
19 |
* Author: Conversios
|
20 |
* Author URI: conversios.io
|
21 |
* License: GPL-2.0+
|
37 |
* Start at version 1.0.0 and use SemVer - https://semver.org
|
38 |
* Rename this for your plugin and update it as you release new versions.
|
39 |
*/
|
40 |
+
define( 'PLUGIN_TVC_VERSION', '5.1.0' );
|
41 |
$fullName = plugin_basename( __FILE__ );
|
42 |
$dir = str_replace('/enhanced-ecommerce-google-analytics.php','',$fullName);
|
43 |
if ( ! defined( 'ENHANCAD_PLUGIN_NAME' ) ) {
|
includes/class-enhanced-ecommerce-google-analytics.php
CHANGED
@@ -180,7 +180,6 @@ class Enhanced_Ecommerce_Google_Analytics {
|
|
180 |
$plugin_admin = new Enhanced_Ecommerce_Google_Analytics_Admin( $this->get_plugin_name(), $this->get_version() );
|
181 |
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
|
182 |
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
|
183 |
-
$this->loader->add_action( 'admin_notices', $plugin_admin, 'tvc_admin_notice' );
|
184 |
$this->loader->add_action( 'admin_notice_message', $plugin_admin, 'tvc_add_admin_notice' );
|
185 |
$this->loader->add_action( 'admin_notices', $plugin_admin, 'tvc_display_admin_notices' );
|
186 |
$this->loader->add_action( 'admin_notices', $plugin_admin, 'tvc_add_data_admin_notice' );
|
180 |
$plugin_admin = new Enhanced_Ecommerce_Google_Analytics_Admin( $this->get_plugin_name(), $this->get_version() );
|
181 |
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
|
182 |
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
|
|
|
183 |
$this->loader->add_action( 'admin_notice_message', $plugin_admin, 'tvc_add_admin_notice' );
|
184 |
$this->loader->add_action( 'admin_notices', $plugin_admin, 'tvc_display_admin_notices' );
|
185 |
$this->loader->add_action( 'admin_notices', $plugin_admin, 'tvc_add_data_admin_notice' );
|
includes/data/class-tvc-ajax-file.php
CHANGED
@@ -596,7 +596,7 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
|
|
596 |
$title = "";
|
597 |
$content = "";
|
598 |
$status = "0";
|
599 |
-
$TVC_Admin_Helper->tvc_dismiss_admin_notice($slug, $
|
600 |
}
|
601 |
}
|
602 |
exit;
|
@@ -606,7 +606,6 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
|
|
606 |
$next_page_token = isset($_POST['next_page_token'])?sanitize_text_field($_POST['next_page_token']):"";
|
607 |
$TVC_Admin_Helper = new TVC_Admin_Helper();
|
608 |
$api_rs = $TVC_Admin_Helper->update_gmc_product_to_db($next_page_token);
|
609 |
-
//print_r($api_rs);
|
610 |
if( isset($api_rs['error']) ){
|
611 |
echo json_encode($api_rs);
|
612 |
}else{
|
@@ -767,7 +766,6 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
|
|
767 |
'body' => wp_json_encode($data)
|
768 |
);
|
769 |
$request = wp_remote_request(esc_url_raw($curl_url), $args);
|
770 |
-
//print_r($request);
|
771 |
// Retrieve information
|
772 |
$response_code = wp_remote_retrieve_response_code($request);
|
773 |
$response_message = wp_remote_retrieve_response_message($request);
|
596 |
$title = "";
|
597 |
$content = "";
|
598 |
$status = "0";
|
599 |
+
$TVC_Admin_Helper->tvc_dismiss_admin_notice($slug, $content, $status,$title);
|
600 |
}
|
601 |
}
|
602 |
exit;
|
606 |
$next_page_token = isset($_POST['next_page_token'])?sanitize_text_field($_POST['next_page_token']):"";
|
607 |
$TVC_Admin_Helper = new TVC_Admin_Helper();
|
608 |
$api_rs = $TVC_Admin_Helper->update_gmc_product_to_db($next_page_token);
|
|
|
609 |
if( isset($api_rs['error']) ){
|
610 |
echo json_encode($api_rs);
|
611 |
}else{
|
766 |
'body' => wp_json_encode($data)
|
767 |
);
|
768 |
$request = wp_remote_request(esc_url_raw($curl_url), $args);
|
|
|
769 |
// Retrieve information
|
770 |
$response_code = wp_remote_retrieve_response_code($request);
|
771 |
$response_message = wp_remote_retrieve_response_message($request);
|
includes/setup/account.php
CHANGED
@@ -59,7 +59,7 @@ class TVC_Account {
|
|
59 |
}
|
60 |
}
|
61 |
?>
|
62 |
-
<div class="tab-content">
|
63 |
<?php if($message){
|
64 |
printf('<div class="%1$s"><div class="alert">%2$s</div></div>', esc_attr($class), esc_html($message));
|
65 |
}?>
|
59 |
}
|
60 |
}
|
61 |
?>
|
62 |
+
<div class="con-tab-content">
|
63 |
<?php if($message){
|
64 |
printf('<div class="%1$s"><div class="alert">%2$s</div></div>', esc_attr($class), esc_html($message));
|
65 |
}?>
|
includes/setup/add-campaign.php
CHANGED
@@ -130,7 +130,7 @@ class AddCampaign {
|
|
130 |
|
131 |
?>
|
132 |
|
133 |
-
<div class="tab-content">
|
134 |
<?php if($message){
|
135 |
printf('<div class="%1$s"><div class="alert">%2$s</div></div>', esc_attr($class), esc_html($message));
|
136 |
}?>
|
130 |
|
131 |
?>
|
132 |
|
133 |
+
<div class="con-tab-content">
|
134 |
<?php if($message){
|
135 |
printf('<div class="%1$s"><div class="alert">%2$s</div></div>', esc_attr($class), esc_html($message));
|
136 |
}?>
|
includes/setup/google-ads.php
CHANGED
@@ -74,7 +74,7 @@ class GoogleAds {
|
|
74 |
}
|
75 |
}
|
76 |
?>
|
77 |
-
<div class="tab-content">
|
78 |
<?php if($message){
|
79 |
printf('<div class="%1$s"><div class="alert">%2$s</div></div>', esc_attr($class), esc_html($message));
|
80 |
}?>
|
74 |
}
|
75 |
}
|
76 |
?>
|
77 |
+
<div class="con-tab-content">
|
78 |
<?php if($message){
|
79 |
printf('<div class="%1$s"><div class="alert">%2$s</div></div>', esc_attr($class), esc_html($message));
|
80 |
}?>
|
includes/setup/google-shopping-feed-gaa-config.php
CHANGED
@@ -99,7 +99,7 @@ class GAAConfiguration {
|
|
99 |
}
|
100 |
$is_need_to_update = $this->TVC_Admin_Helper->is_need_to_update_api_to_db();
|
101 |
?>
|
102 |
-
<div class="tab-content">
|
103 |
<div class="tab-pane show active" id="googleShoppingFeed">
|
104 |
<div class="tab-card">
|
105 |
<div class="row">
|
99 |
}
|
100 |
$is_need_to_update = $this->TVC_Admin_Helper->is_need_to_update_api_to_db();
|
101 |
?>
|
102 |
+
<div class="con-tab-content">
|
103 |
<div class="tab-pane show active" id="googleShoppingFeed">
|
104 |
<div class="tab-card">
|
105 |
<div class="row">
|
includes/setup/google-shopping-feed-shopping-campaigns.php
CHANGED
@@ -175,7 +175,7 @@ class CampaignsConfiguration
|
|
175 |
$plan_id = esc_attr($googleDetail->plan_id);
|
176 |
}
|
177 |
?>
|
178 |
-
<div class="tab-content">
|
179 |
<?php if($message){
|
180 |
printf('<div class="alert-message %1$s"><div class="alert">%2$s</div></div>', esc_attr($class), esc_html($message));
|
181 |
}?>
|
@@ -189,7 +189,7 @@ class CampaignsConfiguration
|
|
189 |
<?php echo get_google_shopping_tabs_html($this->site_url, (isset($googleDetail->google_merchant_center_id))?$googleDetail->google_merchant_center_id:""); ?>
|
190 |
</div>
|
191 |
</div>
|
192 |
-
<div class="tab-content" id="myTabContent">
|
193 |
<div class="tab-pane fade show active" id="smartShopping">
|
194 |
<div class="smart-shopping-section">
|
195 |
<form method="post" id="date_range_form">
|
175 |
$plan_id = esc_attr($googleDetail->plan_id);
|
176 |
}
|
177 |
?>
|
178 |
+
<div class="con-tab-content">
|
179 |
<?php if($message){
|
180 |
printf('<div class="alert-message %1$s"><div class="alert">%2$s</div></div>', esc_attr($class), esc_html($message));
|
181 |
}?>
|
189 |
<?php echo get_google_shopping_tabs_html($this->site_url, (isset($googleDetail->google_merchant_center_id))?$googleDetail->google_merchant_center_id:""); ?>
|
190 |
</div>
|
191 |
</div>
|
192 |
+
<div class="con-tab-content" id="myTabContent">
|
193 |
<div class="tab-pane fade show active" id="smartShopping">
|
194 |
<div class="smart-shopping-section">
|
195 |
<form method="post" id="date_range_form">
|
includes/setup/google-shopping-feed-sync-product.php
CHANGED
@@ -133,7 +133,7 @@ public function create_form(){
|
|
133 |
$message = "Your WooCommerce products are being synced (".$total_sync_products."/".$total_que_products."). It is taking ".$min." Minutes to sync [".$total_batch_size."] products. The remaining ".$total_pending_pro." products will be synced in ".$rhr." Hrs ".$rmin." Minutes";
|
134 |
?>
|
135 |
|
136 |
-
<div class="tab-content">
|
137 |
<div class="tab-pane show active" id="googleShoppingFeed">
|
138 |
<div class="tab-card">
|
139 |
<div class="row">
|
@@ -323,8 +323,7 @@ function ImportGMCProduct(next_page_token = null){
|
|
323 |
jQuery.post(tvc_ajax_url,{
|
324 |
action: "tvc_call_import_gmc_product", next_page_token:next_page_token
|
325 |
},function( response ){
|
326 |
-
var rsp = JSON.parse(response);
|
327 |
-
//console.log(rsp);
|
328 |
if(rsp.error == false && rsp.api_rs != null && rsp.api_rs.next_page_token != "" ){
|
329 |
total_import = total_import+rsp.api_rs.sync_product;
|
330 |
if(rsp.api_rs.next_page_token != null){
|
133 |
$message = "Your WooCommerce products are being synced (".$total_sync_products."/".$total_que_products."). It is taking ".$min." Minutes to sync [".$total_batch_size."] products. The remaining ".$total_pending_pro." products will be synced in ".$rhr." Hrs ".$rmin." Minutes";
|
134 |
?>
|
135 |
|
136 |
+
<div class="con-tab-content">
|
137 |
<div class="tab-pane show active" id="googleShoppingFeed">
|
138 |
<div class="tab-card">
|
139 |
<div class="row">
|
323 |
jQuery.post(tvc_ajax_url,{
|
324 |
action: "tvc_call_import_gmc_product", next_page_token:next_page_token
|
325 |
},function( response ){
|
326 |
+
var rsp = JSON.parse(response);
|
|
|
327 |
if(rsp.error == false && rsp.api_rs != null && rsp.api_rs.next_page_token != "" ){
|
328 |
total_import = total_import+rsp.api_rs.sync_product;
|
329 |
if(rsp.api_rs.next_page_token != null){
|
includes/setup/google-shopping-feed.php
CHANGED
@@ -124,7 +124,7 @@ class GoogleShoppingFeed {
|
|
124 |
}
|
125 |
$is_need_to_update = $this->TVC_Admin_Helper->is_need_to_update_api_to_db();
|
126 |
?>
|
127 |
-
<div class="tab-content">
|
128 |
<div class="tab-pane show active" id="googleShoppingFeed">
|
129 |
<div class="tab-card">
|
130 |
<div class="row">
|
124 |
}
|
125 |
$is_need_to_update = $this->TVC_Admin_Helper->is_need_to_update_api_to_db();
|
126 |
?>
|
127 |
+
<div class="con-tab-content">
|
128 |
<div class="tab-pane show active" id="googleShoppingFeed">
|
129 |
<div class="tab-card">
|
130 |
<div class="row">
|
public/class-con-settings.php
CHANGED
@@ -53,6 +53,7 @@ class Con_Settings{
|
|
53 |
protected $use_your_gtm_id;
|
54 |
public function __construct(){
|
55 |
$this->TVC_Admin_Helper = new TVC_Admin_Helper();
|
|
|
56 |
$this->ga_CG = $this->get_option('ga_CG') == "on" ? true : false; // Content Grouping
|
57 |
$this->ga_optimize_id = sanitize_text_field($this->get_option("ga_optimize_id"));
|
58 |
$this->ee_options = $this->TVC_Admin_Helper->get_ee_options_settings();
|
@@ -100,13 +101,23 @@ class Con_Settings{
|
|
100 |
/* GTM*/
|
101 |
$this->want_to_use_your_gtm = sanitize_text_field($this->get_option('want_to_use_your_gtm'));
|
102 |
$this->use_your_gtm_id = sanitize_text_field($this->get_option('use_your_gtm_id'));
|
103 |
-
|
104 |
$this->ga_LC = get_woocommerce_currency(); //Local Currency from Back end
|
105 |
-
|
106 |
|
107 |
$this->c_t_o = $this->TVC_Admin_Helper->get_ee_options_settings();
|
108 |
}
|
109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
public function get_option($key){
|
111 |
if(empty($this->ee_options)){
|
112 |
$this->ee_options = $this->TVC_Admin_Helper->get_ee_options_settings();
|
53 |
protected $use_your_gtm_id;
|
54 |
public function __construct(){
|
55 |
$this->TVC_Admin_Helper = new TVC_Admin_Helper();
|
56 |
+
add_action('wp_head', array($this,'con_set_yith_current_currency'));
|
57 |
$this->ga_CG = $this->get_option('ga_CG') == "on" ? true : false; // Content Grouping
|
58 |
$this->ga_optimize_id = sanitize_text_field($this->get_option("ga_optimize_id"));
|
59 |
$this->ee_options = $this->TVC_Admin_Helper->get_ee_options_settings();
|
101 |
/* GTM*/
|
102 |
$this->want_to_use_your_gtm = sanitize_text_field($this->get_option('want_to_use_your_gtm'));
|
103 |
$this->use_your_gtm_id = sanitize_text_field($this->get_option('use_your_gtm_id'));
|
|
|
104 |
$this->ga_LC = get_woocommerce_currency(); //Local Currency from Back end
|
105 |
+
//$this->wc_version_compare("tvc_lc=" . json_encode(esc_js($this->ga_LC)) . ";");
|
106 |
|
107 |
$this->c_t_o = $this->TVC_Admin_Helper->get_ee_options_settings();
|
108 |
}
|
109 |
|
110 |
+
public function con_set_yith_current_currency(){
|
111 |
+
if ( in_array( "yith-multi-currency-switcher-for-woocommerce/init.php", apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
|
112 |
+
$this->ga_LC = yith_wcmcs_get_current_currency_id();
|
113 |
+
}
|
114 |
+
?>
|
115 |
+
<script data-cfasync="false" data-no-optimize="1" data-pagespeed-no-defer>
|
116 |
+
var tvc_lc = '<?php echo esc_js($this->ga_LC); ?>';
|
117 |
+
</script>
|
118 |
+
<?php
|
119 |
+
}
|
120 |
+
|
121 |
public function get_option($key){
|
122 |
if(empty($this->ee_options)){
|
123 |
$this->ee_options = $this->TVC_Admin_Helper->get_ee_options_settings();
|
public/class-enhanced-ecommerce-google-analytics-public-pro.php
CHANGED
@@ -206,7 +206,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public extends Con_Settings{
|
|
206 |
}
|
207 |
}else{
|
208 |
if($this->tracking_method == "gtm"){
|
209 |
-
add_action("woocommerce_before_checkout_form", array($this, "checkout_step_view"));
|
210 |
}else{
|
211 |
add_action("woocommerce_before_checkout_form", array($this, "checkout_step_1_tracking"));
|
212 |
add_action("woocommerce_before_checkout_form", array($this, "checkout_step_2_tracking"));
|
@@ -367,7 +367,9 @@ class Enhanced_Ecommerce_Google_Analytics_Public extends Con_Settings{
|
|
367 |
'gmc_is_site_verified' => esc_js(isset($googleDetail->is_site_verified)?sanitize_text_field($googleDetail->is_site_verified):""),
|
368 |
'gmc_is_domain_claim' => esc_js(isset($googleDetail->is_domain_claim)?sanitize_text_field($googleDetail->is_domain_claim):""),
|
369 |
'gmc_product_count' => esc_js(isset($googleDetail->product_count)?sanitize_text_field($googleDetail->product_count):""),
|
370 |
-
'fb_pixel_id' => esc_js($this->fb_pixel_id)
|
|
|
|
|
371 |
)
|
372 |
);
|
373 |
$this->wc_version_compare("tvc_smd=" . json_encode($tvc_sMetaData) . ";");
|
@@ -629,6 +631,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public extends Con_Settings{
|
|
629 |
gtag('set', 'user_data', {
|
630 |
"email": enhanced_conversion_data.email,
|
631 |
"phone_number":enhanced_conversion_data.phone_number,
|
|
|
632 |
"first_name":enhanced_conversion_data.address.first_name,
|
633 |
"last_name":enhanced_conversion_data.address.last_name,
|
634 |
"street":enhanced_conversion_data.address.street,
|
@@ -636,6 +639,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public extends Con_Settings{
|
|
636 |
"city":enhanced_conversion_data.address.city,
|
637 |
"region":enhanced_conversion_data.address.region,
|
638 |
"country":enhanced_conversion_data.address.country
|
|
|
639 |
});
|
640 |
</script>
|
641 |
<?php
|
@@ -700,6 +704,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public extends Con_Settings{
|
|
700 |
gtag('set', 'user_data', {
|
701 |
"email": enhanced_conversion_data.email,
|
702 |
"phone_number":enhanced_conversion_data.phone_number,
|
|
|
703 |
"first_name":enhanced_conversion_data.address.first_name,
|
704 |
"last_name":enhanced_conversion_data.address.last_name,
|
705 |
"street":enhanced_conversion_data.address.street,
|
@@ -707,6 +712,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public extends Con_Settings{
|
|
707 |
"city":enhanced_conversion_data.address.city,
|
708 |
"region":enhanced_conversion_data.address.region,
|
709 |
"country":enhanced_conversion_data.address.country
|
|
|
710 |
});
|
711 |
</script>
|
712 |
<?php
|
@@ -1637,6 +1643,9 @@ src="https://www.facebook.com/tr?id=<?php echo esc_js($this->fb_pixel_id); ?>&ev
|
|
1637 |
$chkout_json = $this->get_ordered_items();
|
1638 |
$cart_total = WC()->cart->total;
|
1639 |
//$amount2 = floatval($cart_total );
|
|
|
|
|
|
|
1640 |
?>
|
1641 |
<script data-cfasync="false" data-no-optimize="1" data-pagespeed-no-defer >
|
1642 |
window.addEventListener('load', call_checkout_step_1_tracking,true);
|
@@ -1814,7 +1823,7 @@ class Con_GTM_Tracking extends Con_Settings {
|
|
1814 |
global $woocommerce;
|
1815 |
if($this->ga_EC){
|
1816 |
//login user
|
1817 |
-
if ( is_user_logged_in() ) {
|
1818 |
global $current_user;
|
1819 |
wp_get_current_user();
|
1820 |
$billing_country = WC()->customer->get_billing_country();
|
@@ -1857,7 +1866,7 @@ class Con_GTM_Tracking extends Con_Settings {
|
|
1857 |
if($billing_country != ""){
|
1858 |
$enhanced_conversion["address"]["country"] = esc_js($billing_country);
|
1859 |
}
|
1860 |
-
}else{ // get user
|
1861 |
$order = "";
|
1862 |
$order_id = "";
|
1863 |
if( $order_id == null && is_order_received_page() ){
|
@@ -1922,7 +1931,9 @@ class Con_GTM_Tracking extends Con_Settings {
|
|
1922 |
}
|
1923 |
if($this->remarketing_snippet_id != ""){
|
1924 |
$dataLayer["cov_remarketing_conversion_id"] = esc_js($this->remarketing_snippet_id);
|
1925 |
-
}
|
|
|
|
|
1926 |
if($this->fb_pixel_id != ""){
|
1927 |
$dataLayer["cov_fb_pixel_id"] = esc_js($this->fb_pixel_id);
|
1928 |
}
|
@@ -1941,10 +1952,10 @@ class Con_GTM_Tracking extends Con_Settings {
|
|
1941 |
if($this->tiKtok_ads_pixel_id != ""){
|
1942 |
$dataLayer["cov_tiktok_sdkid"] = esc_js($this->tiKtok_ads_pixel_id);
|
1943 |
}
|
1944 |
-
if(!empty($enhanced_conversion)){
|
1945 |
$dataLayer = array_merge($dataLayer,$enhanced_conversion);
|
1946 |
}
|
1947 |
-
if(!empty($conversio_send_to) && $this->conversio_send_to){
|
1948 |
$dataLayer["cov_gads_conversion_id"] = $conversio_send_to[0];
|
1949 |
$dataLayer["cov_gads_conversion_label"] = $conversio_send_to[1];
|
1950 |
}
|
@@ -2033,6 +2044,7 @@ class Con_GTM_Tracking extends Con_Settings {
|
|
2033 |
$order = "";
|
2034 |
if($order_id == null && is_order_received_page()){
|
2035 |
$order = $this->tvc_get_order_from_order_received_page();
|
|
|
2036 |
$order_id = $order->get_id();
|
2037 |
}else{
|
2038 |
$order = new WC_Order($order_id);
|
206 |
}
|
207 |
}else{
|
208 |
if($this->tracking_method == "gtm"){
|
209 |
+
add_action("woocommerce_before_checkout_form", array($this->gtm, "checkout_step_view"));
|
210 |
}else{
|
211 |
add_action("woocommerce_before_checkout_form", array($this, "checkout_step_1_tracking"));
|
212 |
add_action("woocommerce_before_checkout_form", array($this, "checkout_step_2_tracking"));
|
367 |
'gmc_is_site_verified' => esc_js(isset($googleDetail->is_site_verified)?sanitize_text_field($googleDetail->is_site_verified):""),
|
368 |
'gmc_is_domain_claim' => esc_js(isset($googleDetail->is_domain_claim)?sanitize_text_field($googleDetail->is_domain_claim):""),
|
369 |
'gmc_product_count' => esc_js(isset($googleDetail->product_count)?sanitize_text_field($googleDetail->product_count):""),
|
370 |
+
'fb_pixel_id' => esc_js($this->fb_pixel_id),
|
371 |
+
'tracking_method'=> esc_js($this->tracking_method),
|
372 |
+
'user_gtm_id' => ($this->tracking_method == 'gtm' && $this->want_to_use_your_gtm == 1)?esc_js($this->use_your_gtm_id):(($this->tracking_method == 'gtm')?"conversios-gtm":"")
|
373 |
)
|
374 |
);
|
375 |
$this->wc_version_compare("tvc_smd=" . json_encode($tvc_sMetaData) . ";");
|
631 |
gtag('set', 'user_data', {
|
632 |
"email": enhanced_conversion_data.email,
|
633 |
"phone_number":enhanced_conversion_data.phone_number,
|
634 |
+
"address":{
|
635 |
"first_name":enhanced_conversion_data.address.first_name,
|
636 |
"last_name":enhanced_conversion_data.address.last_name,
|
637 |
"street":enhanced_conversion_data.address.street,
|
639 |
"city":enhanced_conversion_data.address.city,
|
640 |
"region":enhanced_conversion_data.address.region,
|
641 |
"country":enhanced_conversion_data.address.country
|
642 |
+
}
|
643 |
});
|
644 |
</script>
|
645 |
<?php
|
704 |
gtag('set', 'user_data', {
|
705 |
"email": enhanced_conversion_data.email,
|
706 |
"phone_number":enhanced_conversion_data.phone_number,
|
707 |
+
"address":{
|
708 |
"first_name":enhanced_conversion_data.address.first_name,
|
709 |
"last_name":enhanced_conversion_data.address.last_name,
|
710 |
"street":enhanced_conversion_data.address.street,
|
712 |
"city":enhanced_conversion_data.address.city,
|
713 |
"region":enhanced_conversion_data.address.region,
|
714 |
"country":enhanced_conversion_data.address.country
|
715 |
+
}
|
716 |
});
|
717 |
</script>
|
718 |
<?php
|
1643 |
$chkout_json = $this->get_ordered_items();
|
1644 |
$cart_total = WC()->cart->total;
|
1645 |
//$amount2 = floatval($cart_total );
|
1646 |
+
if ( in_array( "yith-multi-currency-switcher-for-woocommerce/init.php", apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
|
1647 |
+
$this->tvc_options["currency"] = yith_wcmcs_get_current_currency_id();
|
1648 |
+
}
|
1649 |
?>
|
1650 |
<script data-cfasync="false" data-no-optimize="1" data-pagespeed-no-defer >
|
1651 |
window.addEventListener('load', call_checkout_step_1_tracking,true);
|
1823 |
global $woocommerce;
|
1824 |
if($this->ga_EC){
|
1825 |
//login user
|
1826 |
+
if ( is_user_logged_in() && $this->ga_EC) {
|
1827 |
global $current_user;
|
1828 |
wp_get_current_user();
|
1829 |
$billing_country = WC()->customer->get_billing_country();
|
1866 |
if($billing_country != ""){
|
1867 |
$enhanced_conversion["address"]["country"] = esc_js($billing_country);
|
1868 |
}
|
1869 |
+
}else if( $this->ga_EC == 1 ){ // get user
|
1870 |
$order = "";
|
1871 |
$order_id = "";
|
1872 |
if( $order_id == null && is_order_received_page() ){
|
1931 |
}
|
1932 |
if($this->remarketing_snippet_id != ""){
|
1933 |
$dataLayer["cov_remarketing_conversion_id"] = esc_js($this->remarketing_snippet_id);
|
1934 |
+
}
|
1935 |
+
$dataLayer["cov_remarketing"] = $this->ads_ert;
|
1936 |
+
$dataLayer["cov_dynamic_remarketing"] = $this->ads_edrt;
|
1937 |
if($this->fb_pixel_id != ""){
|
1938 |
$dataLayer["cov_fb_pixel_id"] = esc_js($this->fb_pixel_id);
|
1939 |
}
|
1952 |
if($this->tiKtok_ads_pixel_id != ""){
|
1953 |
$dataLayer["cov_tiktok_sdkid"] = esc_js($this->tiKtok_ads_pixel_id);
|
1954 |
}
|
1955 |
+
if(!empty($enhanced_conversion) && $this->ga_EC == 1 ){
|
1956 |
$dataLayer = array_merge($dataLayer,$enhanced_conversion);
|
1957 |
}
|
1958 |
+
if(!empty($conversio_send_to) && $this->conversio_send_to && $this->google_ads_conversion_tracking == 1){
|
1959 |
$dataLayer["cov_gads_conversion_id"] = $conversio_send_to[0];
|
1960 |
$dataLayer["cov_gads_conversion_label"] = $conversio_send_to[1];
|
1961 |
}
|
2044 |
$order = "";
|
2045 |
if($order_id == null && is_order_received_page()){
|
2046 |
$order = $this->tvc_get_order_from_order_received_page();
|
2047 |
+
|
2048 |
$order_id = $order->get_id();
|
2049 |
}else{
|
2050 |
$order = new WC_Order($order_id);
|
public/class-enhanced-ecommerce-google-analytics-public.php
CHANGED
@@ -153,7 +153,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public extends Con_Settings{
|
|
153 |
}
|
154 |
}else{
|
155 |
if($this->tracking_method == "gtm"){
|
156 |
-
add_action("woocommerce_before_checkout_form", array($this, "checkout_step_view"));
|
157 |
}else{
|
158 |
add_action("woocommerce_before_checkout_form", array($this, "checkout_step_1_tracking"));
|
159 |
add_action("woocommerce_before_checkout_form", array($this, "checkout_step_2_tracking"));
|
@@ -187,39 +187,41 @@ class Enhanced_Ecommerce_Google_Analytics_Public extends Con_Settings{
|
|
187 |
$googleDetail = $google_detail['setting'];
|
188 |
}
|
189 |
$tvc_sMetaData = array(
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
|
|
|
|
223 |
);
|
224 |
$this->wc_version_compare("tvc_smd=" . json_encode($tvc_sMetaData) . ";");
|
225 |
}
|
153 |
}
|
154 |
}else{
|
155 |
if($this->tracking_method == "gtm"){
|
156 |
+
add_action("woocommerce_before_checkout_form", array($this->gtm, "checkout_step_view"));
|
157 |
}else{
|
158 |
add_action("woocommerce_before_checkout_form", array($this, "checkout_step_1_tracking"));
|
159 |
add_action("woocommerce_before_checkout_form", array($this, "checkout_step_2_tracking"));
|
187 |
$googleDetail = $google_detail['setting'];
|
188 |
}
|
189 |
$tvc_sMetaData = array(
|
190 |
+
'tvc_wcv' => esc_js($woocommerce->version),
|
191 |
+
'tvc_wpv' => esc_js(get_bloginfo('version')),
|
192 |
+
'tvc_eev' => esc_js($this->tvc_eeVer),
|
193 |
+
'tvc_cnf' => array(
|
194 |
+
't_ee' => esc_js($this->ga_eeT),
|
195 |
+
't_df' => esc_js($this->ga_DF),
|
196 |
+
't_gUser' => esc_js($this->ga_gUser),
|
197 |
+
't_UAen' => esc_js($this->ga_ST),
|
198 |
+
't_thr' => esc_js($this->ga_imTh),
|
199 |
+
't_IPA' => esc_js($this->ga_IPA),
|
200 |
+
//'t_OptOut' => esc_js($this->ga_OPTOUT),
|
201 |
+
't_PrivacyPolicy' => esc_js($this->ga_PrivacyPolicy)
|
202 |
+
),
|
203 |
+
'tvc_sub_data'=> array(
|
204 |
+
'sub_id' =>esc_js(isset($googleDetail->id)?sanitize_text_field($googleDetail->id):""),
|
205 |
+
'cu_id' => esc_js(isset($googleDetail->customer_id)?sanitize_text_field($googleDetail->customer_id):""),
|
206 |
+
'pl_id' => esc_js(isset($googleDetail->plan_id)?sanitize_text_field($googleDetail->plan_id):""),
|
207 |
+
'ga_tra_option' => esc_js(isset($googleDetail->tracking_option)?sanitize_text_field($googleDetail->tracking_option):""),
|
208 |
+
'ga_property_id' => esc_js(isset($googleDetail->property_id)?sanitize_text_field($googleDetail->property_id):""),
|
209 |
+
'ga_measurement_id' => esc_js(isset($googleDetail->measurement_id)?sanitize_text_field($googleDetail->measurement_id):""),
|
210 |
+
'ga_ads_id' => esc_js(isset($googleDetail->google_ads_id)?sanitize_text_field($googleDetail->google_ads_id):""),
|
211 |
+
'ga_gmc_id' => esc_js(isset($googleDetail->google_merchant_center_id)?sanitize_text_field($googleDetail->google_merchant_center_id):""),
|
212 |
+
'op_gtag_js' => esc_js(isset($googleDetail->add_gtag_snippet)?sanitize_text_field($googleDetail->add_gtag_snippet):""),
|
213 |
+
'op_en_e_t' => esc_js(isset($googleDetail->enhanced_e_commerce_tracking)?sanitize_text_field($googleDetail->enhanced_e_commerce_tracking):""),
|
214 |
+
'op_rm_t_t' => esc_js(isset($googleDetail->remarketing_tags)?sanitize_text_field($googleDetail->remarketing_tags):""),
|
215 |
+
'op_dy_rm_t_t' => esc_js(isset($googleDetail->dynamic_remarketing_tags)?esc_attr($googleDetail->dynamic_remarketing_tags):""),
|
216 |
+
'op_li_ga_wi_ads' => esc_js(isset($googleDetail->link_google_analytics_with_google_ads)?sanitize_text_field($googleDetail->link_google_analytics_with_google_ads):""),
|
217 |
+
'gmc_is_product_sync' => esc_js(isset($googleDetail->is_product_sync)?sanitize_text_field($googleDetail->is_product_sync):""),
|
218 |
+
'gmc_is_site_verified' => esc_js(isset($googleDetail->is_site_verified)?sanitize_text_field($googleDetail->is_site_verified):""),
|
219 |
+
'gmc_is_domain_claim' => esc_js(isset($googleDetail->is_domain_claim)?sanitize_text_field($googleDetail->is_domain_claim):""),
|
220 |
+
'gmc_product_count' => esc_js(isset($googleDetail->product_count)?sanitize_text_field($googleDetail->product_count):""),
|
221 |
+
'fb_pixel_id' => esc_js($this->fb_pixel_id),
|
222 |
+
'tracking_method'=> esc_js($this->tracking_method),
|
223 |
+
'user_gtm_id' => esc_js("conversios-gtm")
|
224 |
+
)
|
225 |
);
|
226 |
$this->wc_version_compare("tvc_smd=" . json_encode($tvc_sMetaData) . ";");
|
227 |
}
|
readme.txt
CHANGED
@@ -8,8 +8,8 @@ Author: Conversios
|
|
8 |
Requires at least: 4.6
|
9 |
Tested up to: 6.1.1
|
10 |
Requires PHP: 5.6 or Higher
|
11 |
-
Stable tag: 5.0
|
12 |
-
Version: 5.0
|
13 |
License: GPLv3
|
14 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
15 |
|
@@ -114,6 +114,8 @@ This is an all-in-one marketing plugin for WooCommerce stores. Over the last 6 y
|
|
114 |
* Perfect Brands for WooCommerce
|
115 |
* YITH WooCommerce Brands️
|
116 |
* WooCommerce Brands
|
|
|
|
|
117 |
* Multi Currency plugins
|
118 |
- WOOCS: Currency Switcher for WooCommerce
|
119 |
- CURCY: Multi Currency for WooCommerce
|
@@ -211,6 +213,12 @@ There could be duplicate tracking via manually implemented GA tracking snippet a
|
|
211 |
|
212 |
|
213 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
= 5.0.6 - 18/11/2022 =
|
215 |
* In this release, we have modified the item data parameters for remarketing and Dynamic Remarketing events, to adapt the new changes at Google Ads guidelines. This upgrade will facilitate the adoption of the new Google Ads standards and improvements for remarketing.
|
216 |
|
8 |
Requires at least: 4.6
|
9 |
Tested up to: 6.1.1
|
10 |
Requires PHP: 5.6 or Higher
|
11 |
+
Stable tag: 5.1.0
|
12 |
+
Version: 5.1.0
|
13 |
License: GPLv3
|
14 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
15 |
|
114 |
* Perfect Brands for WooCommerce
|
115 |
* YITH WooCommerce Brands️
|
116 |
* WooCommerce Brands
|
117 |
+
* YITH Multi Currency Switcher for WooCommerce
|
118 |
+
* YITH Custom Thank You Page for WooCommerce
|
119 |
* Multi Currency plugins
|
120 |
- WOOCS: Currency Switcher for WooCommerce
|
121 |
- CURCY: Multi Currency for WooCommerce
|
213 |
|
214 |
|
215 |
== Changelog ==
|
216 |
+
|
217 |
+
= 5.1.0 - 24/11/2022 =
|
218 |
+
* The new release contains easy-to-implement updates to better adapt our Google Tag Manager capabilities, including the ability to deploy custom GTM features. For a hassle-free deployment of dynamic remarketing and conversion tags, we have also incorporated all pixels (Google ads, Facebook ads, Microsoft ads, Twitter ads, Pinterest ads, Snapchat ads, and Tiktok ads) option in onboarding.
|
219 |
+
* We have added the how-to guides for pixel implementation.
|
220 |
+
* Also, now Conversios eCommerce tracking is compatible with "YITH Multi Currency Switcher for WooCommerce" and "YITH Custom Thank You Page for WooCommerce" plugins.
|
221 |
+
|
222 |
= 5.0.6 - 18/11/2022 =
|
223 |
* In this release, we have modified the item data parameters for remarketing and Dynamic Remarketing events, to adapt the new changes at Google Ads guidelines. This upgrade will facilitate the adoption of the new Google Ads standards and improvements for remarketing.
|
224 |
|