- This topic has 1 reply, 2 voices, and was last updated 7 years, 2 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
WordPress Membership Plugin
Simple Membership Plugin › Forums › Simple Membership Plugin › Register Hook for Google Analytics
Tagged: hook, Registration
Hi,
we are trying to get the correct hook when someone is registered to send the event to Google Analytics. We have the Form Builder but he tested it without it too. Our code is not working.
The gtag code is correct as we use it in other plugins. But the event is not being sent.
Just in case it helps, we requiere user activation.
Our code is the following. Can you help???
add_action( ‘wp_footer’, function () { ?>
<script>
document.addEventListener( ‘swpm_front_end_registration_complete’, function( event ) {
gtag(‘event’, ‘alta’, { ‘event_category’: ‘alta’, ‘event_action’: ‘enviar’,
‘event_label’: ‘es’, ‘value’: ‘0’});
}, false );
</script>
<?php } );
We have tried this too (not working either):
add_action( ‘wp_footer’, function () { ?>
<script>
document.addEventListener( ‘swpm_front_end_registration_complete_fb’, function( event ) {
gtag(‘event’, ‘alta’, { ‘event_category’: ‘alta’, ‘event_action’: ‘enviar’,
‘event_label’: ‘es’, ‘value’: ‘0’});
}, false );
</script>
<?php } );
Hi, please create a premium addon support ticket. One of the developers will assist you further.
Thank you