NFT-based authentication for Solana program methods with Sol Cerberus integration

I’m working on a Solana project where I need to limit access to specific program functions based on NFT ownership from a particular collection. I’ve integrated Sol Cerberus for access control but I’m struggling with the client-side implementation.

Here’s my current program structure:

use sol_cerberus_macros::rule;

declare_id!("PROGRAM_ADDRESS_HERE");

#[program]
pub mod nft_access_demo {
    use super::*;
    
    #[rule(Analytics, Read)]
    pub fn get_analytics(ctx: Context<DataAccess>) -> Result<()> {
        handlers::analytics::fetch_data(ctx)
    }
}

The main issue I’m facing is how to properly call the get_analytics function from my frontend JavaScript code while using an NFT as the authentication token. What’s the correct way to structure this call so that Sol Cerberus can verify the NFT ownership before allowing access to the protected method?