- This topic has 16 replies, 3 voices, and was last updated 9 years, 9 months ago by .
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › WP Affiliate – Track sign ups with Google Analytics Goals?
Tagged: analytics, Google, Google Analytics Goals, tracking
I have sent you an update via email. Here is an example to show you how you can use this new filter:
add_filter('wpap_below_registration_success_message', 'my_custom_goal_tracking')
function my_custom_goal_tracking($output) {
//any HTML or JS code you add to the $output variable will be executed
//after the affiliate registration is successful.
$output .= '<script>
(function($) {
$(window).load(function() {
__gaTracker('send', 'event', 'Affiliate Signup Form', 'signup', 'form', 1);
});
})(jQuery);
</script>';
return $output;
}
I finally had the time to implement your filter update and I can confirm that it works like a charm! Real-time Analytics testing showed that only (and all) validated sign ups are tracked correctly now.
Thank you very much for your time and effort