Skip to main content

Hi RevenueCat Community,

I'm working on a mobile app written in Flutter and I'm looking to implement a referral program to assign an influencer identifier to app users. The goal is to track purchases made by users assigned to specific influencers, allowing us to share the profit with those influencers each month (ex. 25% of sale).

Here's what I've planned so far:

  1. Assign an influencer identifier to the RevenueCat/app user using the method below:

    Purchases.setAttributes({ "custom_group_id" : "influencer_A_id" });

  2. Manually generate a raport in RevenueCat at the end of each month with sum of purchases made by users attached to a given influencer.

I would like to attach a given influencer ID to a user by allowing the user to redeem a promo code (that user received from influencer) in the app that unlocks extra content. This will help in assigning the user to the influencer effectively.

However, I'm uncertain about the best way to configure RevenueCat to generate a report at the end of each month that summarizes the sales data for each influencer. Specifically, I need guidance on the following points:

  1. Correct Setup: Is using Purchases.setAttributes({ "custom_group_id" : "influencer_A_id" }); the right approach to assign and track influencer identifiers?
  2. Data Retrieval: How can I configure RevenueCat to produce a detailed monthly report that includes:
    • The number of purchases made by users assigned to each influencer
    • The total value of those purchases

Is it possible? Is it a right way to do it? Any insights, examples, or step-by-step guides would be greatly appreciated! Thank you in advance for your help.