How to Monetize Your App with Cursor AI (No Coding Experience) | Lesson 5

Corbin BrownAbout 6 min readJun 30, 2025Watch original
THE SUMMARYAI-generated

Key Concepts

  • Monetization: Earning revenue from an application or website.
  • Custom Domain: A unique web address (e.g., tubestamp.com) that points to your application.
  • Google Analytics (GA4): A web analytics service that tracks and reports website traffic.
  • Google AdSense: An advertising program that allows you to display ads on your website and earn revenue.
  • Auto Ads: A feature in Google AdSense that automatically places ads on your website.
  • Firebase: A platform for building and hosting web applications.
  • React Helmet: A React component for managing the document head, including title, meta tags, and scripts.
  • SSH Keys: Secure Shell keys used for authenticating with Git repositories.
  • DNS Records: Records in the Domain Name System that map domain names to IP addresses and other information.
  • Deployment: The process of making your application live on the internet.

1. Setting Up a Custom Domain

  • Process:
    1. Add a custom domain in your hosting provider (Firebase in this case).
    2. Purchase a domain name (e.g., using Squarespace domains).
    3. Add DNS records provided by Firebase to your domain registrar's DNS settings. These records include:
      • A record: Maps the domain to an IP address.
      • TXT record: Verifies domain ownership.
      • CNAME record: Allows the domain to run on www.tubestamp.com.
    4. Verify the domain in Firebase.
  • Important Note: DNS propagation can take 30 minutes to an hour, but if it takes longer than 2-3 hours, there might be an error in the DNS configuration.
  • Example: The video uses tubestamp.com as the custom domain.

2. Integrating Google Analytics

  • Process:

    1. Ensure Google Analytics is enabled in your Firebase project integrations.
    2. Obtain the Measurement ID from your Google Analytics dashboard (Admin -> Data Streams).
    3. Add the Measurement ID to your React application's environment variables (.env file).
    4. Import and initialize Firebase Analytics in your React code:
    import { getAnalytics } from "firebase/analytics";
    import { app } from './firebase'; // Assuming you have your Firebase app initialized elsewhere
    const analytics = getAnalytics(app);
    
    1. Deploy the application to Firebase.
  • Troubleshooting: If analytics data isn't persisting, try importing Firebase in your main application file.

  • Enhanced Measurements: Enable enhanced measurements in Google Analytics to automatically track various user interactions.

3. Adding Google AdSense for Monetization

  • Process:

    1. Sign up for a Google AdSense account.
    2. Add your website (tubestamp.com in the example) to AdSense.
    3. Enable Auto Ads to allow Google to automatically place ads on your site.
    4. Preview the ad placements and exclude areas where you don't want ads to appear.
    5. Apply the ad settings to your site.
    6. Add the AdSense code snippet to the <head> section of your website.
  • AdSense Code Integration:

    • The video initially suggests using React Helmet in app.js to add the AdSense code. However, it's later corrected to placing the AdSense script directly into the index.html file (both in the public and build folders).
    • React Helmet is still useful for managing other <head> elements like title and meta tags, and for integrating Google Tag Manager for tracking specific user actions.
  • React Helmet Implementation:

    1. Install react-helmet: npm install react-helmet
    2. Import and use Helmet in your React component:
    import { Helmet } from "react-helmet";
    
    function App() {
      return (
        <div>
          <Helmet>
            <title>Tube Stamp AI-Powered YouTube Timestamps</title>
            <script async src="YOUR_ADSENSE_SCRIPT"></script>
          </Helmet>
          {/* Your app content */}
        </div>
      );
    }
    
  • Verification and Review: After adding the code, verify your site in AdSense and request a review. The review process can take a few days to several weeks.

  • Consent Message: Configure a consent message for users in the EU, UK, and Switzerland to comply with privacy regulations.

4. Redirecting Firebase URLs to Custom Domain

  • Problem: Firebase hosting provides multiple URLs for accessing your website (e.g., your-project.web.app, your-project.firebaseapp.com).
  • Solution: Add a script to your index.html file that redirects these Firebase URLs to your custom domain (tubestamp.com).
  • Implementation: The script checks the current domain name and, if it matches a Firebase URL, redirects the user to the custom domain.
  • Location: Add the script to both the public/index.html and build/index.html files.

5. Troubleshooting SSH Key Issues

  • Problem: "Repository not found" or "Could not read remote repository" errors when using Git, often due to multiple SSH keys.
  • Solution:
    1. List all SSH keys on your local computer: ls -al ~/.ssh
    2. Add the correct SSH key to the SSH agent: ssh-add ~/.ssh/id_rsa (replace id_rsa with the actual key filename).
    • If unsure which key to use, consult an AI chatbot.

6. Git Branch Management

  • Restarting a Pull Request: If a pull request disappears, create a new one by selecting the branch and clicking "Create pull request."
  • Merging Branches: Use the "Merge pull request" button on GitHub, then delete the merged branch.
  • Updating Local Code: After merging, use the following commands:
    • git checkout main
    • git pull origin main
  • Deleting Local Branches: git branch -D <branch_name>

7. Key Arguments and Perspectives

  • Simplicity of Monetization: Google has made it significantly easier to monetize websites with features like Auto Ads.
  • Importance of User Experience: Carefully consider ad placements to avoid disrupting the user experience.
  • Value of Live Troubleshooting: The video includes real-time troubleshooting to demonstrate how to solve common problems.

8. Notable Quotes

  • (Regarding the simplicity of adding ads): "I was flabbergasted when I figured this out. I was like hold up."

9. Technical Terms and Concepts

  • PR (Pull Request): A request to merge code changes from one branch into another.
  • SSH (Secure Shell): A cryptographic network protocol for secure communication.
  • DNS (Domain Name System): A hierarchical and decentralized naming system for computers, services, or any resource connected to the Internet or a private network.
  • React Helmet: A component that lets you control document head contents in React.
  • Firebase Deploy: Command to deploy the application to Firebase hosting.
  • npm run build: Command to build the React application for production.

10. Synthesis/Conclusion

The video provides a practical guide to monetizing a web application using Google AdSense, integrating Google Analytics for traffic tracking, and setting up a custom domain for a professional online presence. It emphasizes the ease of use of Google's monetization tools while also covering essential troubleshooting steps and best practices for Git branch management and deployment. The video also highlights the importance of user experience when placing ads and provides a valuable lesson on using React Helmet for managing document head elements. The key takeaway is that monetizing a web application is more accessible than ever, but careful planning and attention to detail are still crucial for success.

AI summaries can miss context or contain errors. Check important details against the original video.

Go a little deeper.

Have a question about this video? Load its transcript to open the video chat.