Last active
May 15, 2023 15:56
-
-
Save dpaternina9/cf2eece9d541e95985c073814f1c18cf to your computer and use it in GitHub Desktop.
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> | |
<?php | |
} | |
add_action('wp_head', 'monsterinsights_amz_appl_affiliate_links'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment