$page ); if ( $tab ) { $args['tab'] = $tab; } if ( $action ) { $args['action'] = $action; } $args = array_merge( $args, $extra ); return add_query_arg( $args, admin_url( 'admin.php' ) ); } function getCurrentAdminPage() { if(!empty($_GET['page'])) { return sanitize_text_field($_GET['page']); } return ''; } function getCurrentAdminTab() { if(!empty( $_GET['tab'] ) ) { return sanitize_text_field($_GET['tab']); } return 'general'; } function getCurrentAdminAction() { if(!empty( $_GET['action'] ) ) { return sanitize_text_field($_GET['action']); } return ''; } function getAdminPrimaryNavTabs() { $tabs = array( 'general' => array( 'url' => buildAdminUrl( 'pixelyoursite' ), 'name' => 'General', ), 'events' => array( 'url' => buildAdminUrl( 'pixelyoursite', 'events' ), 'name' => 'Events', ), ); if ( isWooCommerceActive() ) { $tabs['woo'] = array( 'url' => buildAdminUrl( 'pixelyoursite', 'woo' ), 'name' => 'WooCommerce', ); } if ( isEddActive() ) { $tabs['edd'] = array( 'url' => buildAdminUrl( 'pixelyoursite', 'edd' ), 'name' => 'EasyDigitalDownloads', ); } if ( isWcfActive() ) { $tabs['wcf'] = array( 'url' => buildAdminUrl( 'pixelyoursite', 'wcf' ), 'name' => 'CartFlows', ); } $tabs['gdpr'] = array( 'url' => buildAdminUrl( 'pixelyoursite', 'gdpr' ), 'name' => 'Consent', 'class' => 'orange' ); return $tabs; } function getAdminSecondaryNavTabs() { $tabs = array( 'facebook_settings' => array( 'url' => buildAdminUrl( 'pixelyoursite', 'facebook_settings' ), 'name' => 'Meta Settings', ), 'ga_settings' => array( 'url' => buildAdminUrl( 'pixelyoursite', 'ga_settings' ), 'name' => 'Google Analytics Settings', ), ); $tabs = apply_filters( 'pys_admin_secondary_nav_tabs', $tabs ); $tabs['superpack_settings'] = array( 'url' => buildAdminUrl( 'pixelyoursite', 'superpack_settings' ), 'name' => 'Super Pack Settings', ); $tabs['head_footer'] = array( 'url' => buildAdminUrl( 'pixelyoursite', 'head_footer' ), 'name' => 'Head & Footer', ); return $tabs; } function cardCollapseBtn($attr = "") { echo ''; } /** * @param string $key * @param Settings $settings */ function renderCollapseTargetAttributes( $key, $settings ) { echo 'class="pys_' . $settings->getSlug() . '_' . esc_attr( $key ) . '_panel"'; } function manageAdminPermissions() { global $wp_roles; $roles = PYS()->getOption( 'admin_permissions', array( 'administrator' ) ); foreach ( $wp_roles->roles as $role => $options ) { if ( in_array( $role, $roles ) ) { $wp_roles->add_cap( $role, 'manage_pys' ); } else { $wp_roles->remove_cap( $role, 'manage_pys' ); } } } function renderPopoverButton( $popover_id ) { ?> deleteCache(); } } elseif ( function_exists( 'sg_cachepress_purge_cache' ) ) { sg_cachepress_purge_cache(); } } function adminIncompatibleVersionNotice( $pluginName, $minVersion ) { ?>

You are using incompatible version of . PixelYourSite requires at least . Please, update to latest version.

getOption('server_access_api_token'); if(Facebook()->enabled() && !$apiTokens) { $meta_key = 'pys_notice_dont_CAPI_start_delay'; $user_id = get_current_user_id(); $start_delay = get_user_meta( $user_id, $meta_key ); $day_ago = time() - DAY_IN_SECONDS; if($start_delay && $start_delay > $day_ago) { adminRenderNotCAPI(PYS()); } else if(!$start_delay){ update_user_meta($user_id, $meta_key, time()); } } if ( isPinterestActive( false ) && isPinterestVersionIncompatible() ) { adminIncompatibleVersionNotice( 'PixelYourSite Pinterest Add-On', PYS_FREE_PINTEREST_MIN_VERSION ); } elseif ( isPinterestActive() ) { $expire_at = Pinterest()->getOption( 'license_expires' ); if ( $expire_at && $now > $expire_at ) { adminRenderLicenseExpirationNotice( Pinterest() ); } } if ( isBingActive( false ) && isBingVersionIncompatible() ) { adminIncompatibleVersionNotice( 'PixelYourSite Bing Add-On', PYS_FREE_BING_MIN_VERSION ); } elseif ( isBingActive() ) { $expire_at = Bing()->getOption( 'license_expires' ); if ( $expire_at && $now > $expire_at ) { adminRenderLicenseExpirationNotice( Bing() ); } } /** * Pixel ID notices */ $facebook_pixel_id = Facebook()->getPixelIDs() ; if ( Facebook()->enabled() && empty( $facebook_pixel_id ) ) { $no_facebook_pixels = true; } else { $no_facebook_pixels = false; } $ga_tracking_id = GA()->getPixelIDs() ; if ( GA()->enabled() && empty( $ga_tracking_id ) ) { $no_ga_pixels = true; } else { $no_ga_pixels = false; } $pinterest_pixel_id = Pinterest()->getOption( 'pixel_id' ); $pinterest_license_status = Pinterest()->getOption( 'license_status' ); if ( isPinterestActive() && Pinterest()->enabled() && ! empty( $pinterest_license_status ) // license active or was active before && empty( $pinterest_pixel_id ) ) { $no_pinterest_pixels = true; } else { $no_pinterest_pixels = false; } if ( isPinterestActive() ) { if ( $no_facebook_pixels && $no_ga_pixels && $no_pinterest_pixels ) { adminRenderNoPixelsNotice(); } else { if ( $no_facebook_pixels ) { adminRenderNoPixelNotice( Facebook() ); } if ( $no_ga_pixels ) { adminRenderNoPixelNotice( GA() ); } if ( $no_pinterest_pixels ) { adminRenderNoPixelNotice( Pinterest() ); } } // show notice if licence was never activated if (Pinterest()->enabled() && empty($pinterest_license_status)) { adminRenderActivatePinterestLicence(); } } else { if ( $no_facebook_pixels && $no_ga_pixels ) { adminRenderNoPixelsNotice(); } else { if ( $no_facebook_pixels ) { adminRenderNoPixelNotice( Facebook() ); } if ( $no_ga_pixels ) { adminRenderNoPixelNotice( GA() ); } } } if ( isBingActive() ) { $bing_license_status = Bing()->getOption( 'license_status' ); // show notice if licence was never activated if (Bing()->enabled() && empty($bing_license_status)) { adminRenderActivateBingLicence(); } } /** * GDPR */ if ( isCookieLawInfoPluginActivated() && ! PYS()->getOption( 'gdpr_ajax_enabled' ) ) { adminGdprAjaxNotEnabledNotice(); } } /** * @param Plugin|Settings $plugin */ function adminRenderLicenseExpirationNotice( $plugin ) { if ( 'pixelyoursite' == getCurrentAdminPage() ) { return; // do not show notice on plugin pages } $slug = $plugin->getSlug(); $user_id = get_current_user_id(); // show only if never dismissed or dismissed more than a week ago $meta_key = 'pys_' . $slug . '_expiration_notice_dismissed_at'; $dismissed_at = get_user_meta( $user_id, $meta_key ); if ( $dismissed_at ) { if ( is_array( $dismissed_at ) ) { $dismissed_at = reset( $dismissed_at ); } $week_ago = time() - WEEK_IN_SECONDS; if ( $week_ago < $dismissed_at ) { return; } } $license_key = $plugin->getOption( 'license_key' ); ?>

Your getPluginName(); ?> license key is expired, so you no longer get any updates. Don't miss our latest improvements and make sure that everything works smoothly.

If you renewed your license but you still see this message, click on the "Reactivate License" button.

Click here to renew your license now

getSlug(); $user_id = get_current_user_id(); // show only if never dismissed or dismissed more than a week ago $meta_key = 'pys_' . $slug . '_CAPI_notice_dismissed_at'; $dismissed_at = get_user_meta( $user_id, $meta_key ); if ( $dismissed_at ) { if ( is_array( $dismissed_at ) ) { $dismissed_at = reset( $dismissed_at ); } $week_ago = time() - WEEK_IN_SECONDS; if ( $week_ago < $dismissed_at ) { return; } else { ?>

PixelYourSite Tip: Don't forget to enable Meta Conversion API events. They can improve your ads performance and conversion tracking. Watch this video to learn how: watch the video.

PixelYourSite Tip: Improve your Meta Ads conversion tracking and performance with Conversion API events. Simply add your token to enable CAPI. Watch this video to learn how to do it: watch the video.

Activate your Pinterest add-on license: click here.

Activate your PixelYourSite Microsoft UET (Bing) add-on license: click here.

You have no pixel configured with PixelYourSite. You can add the Meta Pixel (formerly Facebook Pixel), Google Analytics or the Pinterest Tag. Start tracking everything now

getSlug(); $user_id = get_current_user_id(); // do not show dismissed notice $meta_key = 'pys_' . $slug . '_no_pixel_dismissed_at'; $dismissed_at = get_user_meta( $user_id, $meta_key ); if ( $dismissed_at ) { return; } ?>

Add your Meta Pixel (formerly Facebook Pixel) ID and start tracking everything with PixelYourSite. Click Here

Add your Google Analytics tracking ID inside PixelYourSite and start tracking everything. Enhanced Ecommerce is fully supported for WooCommerce or Easy Digital Downloads. Click Here

(If you use another Google Analytics plugin, disable it in order to avoid conflicts)

Add your Google Analytics ID inside PixelYourSite and start tracking everything. Click Here

(If you use another Google Analytics plugin, disable it in order to avoid conflicts)

Add your Pinterest pixel ID and start tracking everything with PixelYourSite. Click Here

disabled="disabled" class="custom-switch-input">
'.$label.' '; } function renderCogBadge( $label = "You need this plugin" ) { $url = 'https://www.pixelyoursite.com/woocommerce-cost-of-goods'; echo ' '.$label.' '; } function renderSpBadge() { echo ' Pro Feature '; } function renderHfBadge() { echo ' Pro Feature '; } function addMetaTagFields($pixel,$url) { ?>

Verify your domain:

render_text_input_array_item('verify_meta_tag','Add the verification meta-tag there'); ?> Learn how to verify your domain

getOption( 'verify_meta_tag' ); foreach ($metaTags as $index => $val) : if($index == 0) continue; ?>
render_text_input_array_item('verify_meta_tag','Add the verification meta-tag there',$index); ?>