Debugging a plugin or theme conflict should be done on a staging site if possible.
While you're debugging (depending on the type of error), you should have the JavaScript console or PHP error log in view in real-time.
<form | |
action="http://caughtmyeye.epizy.com/simple-form/" | |
id="simple-test-form" | |
method="post" | |
data-avia-form-id="1" | |
data-avia-redirect="" | |
_lpchecked="1" | |
> | |
<fieldset> | |
<h3>Simple Test Form</h3> |
<p> | |
Go to my | |
<a | |
href="http://caughtmyeye.epizy.com/link-tracking/" | |
data-vars-ga-category="internal-link" | |
data-vars-ga-action="http://caughtmyeye.epizy.com/" | |
data-vars-ga-label="http://caughtmyeye.epizy.com/link-tracking/"> | |
link tracking | |
</a> | |
page. |
<~-- link href="https://cdn.jsdelivr.net/gh/marklchaves/cme-styles@1.0.0/dist/cme-styles.min.css" rel="stylesheet" / --> | |
<div class="image-caption" style="width:694px;margin-top:0px;margin-bottom:px;margin-right:auto;margin-left:auto;"> | |
<img alt="GET INSTANT ACCESS" src="https://via.placeholder.com/550x250" class="full-width lazyloaded" data-ll-status="loaded" border="0"> | |
</div> | |
<form action="#" method="POST" sejds-popupally-pro-anti-spam-uengs="hts/t29ifsosf.o/p/ompoescc2e39092de8df6a" qweokgj-popupally-pro-anti-spam-mwhgser="tp:/s6.nuinotcmapfr/rcs/d9d04fde426bab8b" popupally-pro-popup="77" class="popupallypro-signup-form-sijfhw popupally-pro-inner-rwnkmg-77"> | |
<div class="image-1-pro-rwnkmg"></div> | |
<div class="image-2-pro-rwnkmg"></div> | |
<div class="desc-pro-rwnkmg"> |
<?php | |
/** | |
* Add to Child Theme's functions.php. | |
*/ | |
add_action( 'wp_footer', function () { | |
if (is_page ('2')) { | |
?> | |
<script> | |
// Dynamic Label Snippet |
// Put far down in footer as possible. | |
setTimeout(function() { | |
if (window.ga && ga.loaded) { | |
console.log('GA is loaded.'); | |
} else { | |
console.log('GA is NOT loaded.'); | |
// Maybe do more interesting things here. | |
} | |
}, 5000); // Give time for the page to load. |
<?php | |
add_action( 'wp_head', function () { | |
if (is_single ()) { | |
?> | |
<script> | |
// Post ID Custom Dimension Snippet | |
let dimension9Value = '<?php echo get_the_id() ?>'; | |
//ga('set', 'dimension9', dimension9Value); | |
ga('send', 'event', 'dimension', 'Post ID', { |
<?php | |
/** | |
* Custom Filter for the User ID Dimension | |
* | |
* Add this to your theme's functions.php file. | |
*/ | |
function display_username_instead_of_user_id( $user_id ) { | |
$user = get_user_by( 'id', $user_id ); | |
return $user->user_login; |
Debugging a plugin or theme conflict should be done on a staging site if possible.
While you're debugging (depending on the type of error), you should have the JavaScript console or PHP error log in view in real-time.
Deprecated in MI gtag versions. For gtag, see https://gist.github.com/chavesm/8b719fc32505b26d4dcfa32a0a423617
<script> | |
// Send an event via gtag. | |
__gtagTracker('event', 'Test Event', { | |
'event_category' : 'test_event', | |
'event_action' : 'test_action', | |
'event_label' : 'This is a test event.' | |
}); | |
</script> | |
<!-- Add to head section of page using proper enqueue | |
techniques or a plugin like Insert Headers and Footers. --> |