Skip to content

Instantly share code, notes, and snippets.

@greenhornet79
Created July 21, 2026 20:11
Show Gist options
  • Select an option

  • Save greenhornet79/2f0429b3462ec1128b2d4936890fa006 to your computer and use it in GitHub Desktop.

Select an option

Save greenhornet79/2f0429b3462ec1128b2d4936890fa006 to your computer and use it in GitHub Desktop.
custom event to Leaky Paywall Insights
<?php
add_action( 'leaky_paywall_rest_after_create_subscriber', 'my_custom_signup_event', 10, 3 );
function my_custom_signup_event( $user_id, $request, $level ) {
if ( ! function_exists( 'leaky_paywall_track_event' ) ) {
return;
}
leaky_paywall_track_event(
'Custom Signup Form',
$user_id,
array(
'source_form' => 'Newsletter Landing Page',
'campaign' => $request->get_param( 'campaign' ),
'referring_page' => $request->get_param( 'referring_page' ),
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment