This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'monsterinsights_ecommerce_do_transaction_skip_ga', 'monsterinsights_support_edd_skip_do_transaction', 10, 2 ); | |
function monsterinsights_support_edd_skip_do_transaction( $skip, $payment_id ) { | |
if ( !class_exists('Easy_Digital_Downloads') ) { | |
return; | |
} | |
$payment = new EDD_Payment( $payment_id ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'ampforwp_google_analytics_fields', 'monsterinsights_ampforwp_analytics_dimensions_fix', 11 ); | |
function monsterinsights_ampforwp_analytics_dimensions_fix( $ga_fields ) { | |
$options = new MonsterInsights_Frontend_Custom_Dimensions(); | |
$options = $options->output_custom_dimensions( array () ); | |
$ua = monsterinsights_get_ua_to_output( array( 'amp' => true ) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function monsterinsights_amz_appl_affiliate_links() { | |
?> | |
<script> | |
jQuery( document ).ready(function() { | |
jQuery('a[href*="amazon.com"],a[href*="amzn.to"],a[href*="tv.apple"]').each(function() { | |
jQuery(this).attr('data-vars-ga-category', 'outbound-link-affiliate' ); | |
}); | |
}); | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function monsterinsights_skip_woo_manual_orders( $skip, $order_id ) { | |
$order = wc_get_order( $order_id ); | |
if ( $order && $order->is_created_via('admin') ) { | |
return true; | |
} | |
return $skip; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'monsterinsights_frontend_tracking_options_gtag_before_pageview', function( $options, $type ) { | |
$user_id = 999; // Replace with code to get actual user ID here | |
$meta_key = 'my_meta_key'; // Replace with the user meta key here | |
$meta_value = get_user_meta( $user_id, $meta_key ); | |
if ( $type === 'ua' ) { | |
// If the customer is tracking for a UA property |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function monsterinsights_divi_theme_content_links_fix() { | |
?> | |
<script> | |
var lastClicked = []; | |
function __gtagTrackerLog( message ) { | |
if ( __gtagTrackerIsDebug() ) { | |
console.dir( message ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('monsterinsights_skip_tracking', '__return_true'); |
OlderNewer