Influencer Campaign Planner
Run ID: 69cbaf7261b1021a29a8b6272026-03-31Marketing
PantheraHive BOS
BOS Dashboard

Plan an influencer marketing campaign with ideal influencer profiles, outreach templates, contract terms, content guidelines, and ROI tracking framework.

Step 1 of 3: Audience Analysis for Influencer Campaign Planning

This document provides a comprehensive analysis of the target audience, a critical first step in planning an effective influencer marketing campaign. Understanding your audience deeply allows for the identification of ideal influencer profiles, tailored content strategies, and accurate ROI tracking.


1. Introduction: Purpose of Audience Analysis

The primary goal of this audience analysis is to construct detailed profiles of your ideal customers. By dissecting their demographics, psychographics, and behavioral patterns, we can identify where they spend their time online, what content resonates with them, who they trust, and what motivates their purchasing decisions. This foundational understanding will directly inform the selection of appropriate influencers, the development of compelling content, and the overall strategic direction of your campaign.


2. Assumptions & Context

Given that specific product/service details were not provided, this analysis is based on general best practices and common market scenarios for a consumer-facing brand seeking growth and engagement. The insights provided are illustrative and designed to be adaptable. For a truly bespoke analysis, please provide details regarding:

  • Your Product/Service Category: (e.g., Skincare, SaaS, Fitness Apparel, Home Decor, Financial Services)
  • Your Brand's Core Values/Mission:
  • Current Marketing Objectives: (e.g., Brand Awareness, Lead Generation, Sales, Community Building)
  • Existing Customer Data (if available): (e.g., Google Analytics, CRM data, social media insights)

This output provides a robust framework that you can populate with your specific data.


3. Target Audience Overview (Illustrative)

For the purpose of this analysis, we will assume a broad target audience that can be segmented, typical for many consumer brands. We'll focus on individuals who are digitally native or highly active online, open to discovering new products/services through trusted sources, and value authenticity and connection.

Core Hypothesis: The target audience is discerning, values authenticity, seeks solutions to improve their daily lives (either practically or aesthetically), and is influenced by peers and credible voices online.


4. Detailed Audience Demographics

These are the foundational data points that define who your audience is.

  • Age Range:

Primary: 25-44 years old (Millennials and younger Gen X) - Highly engaged online, established purchasing power, often seeking convenience, quality, and experiences.*

Secondary: 18-24 years old (Gen Z) - Early adopters, socially conscious, highly visual, mobile-first, influenced by short-form video and authentic micro-influencers.*

Tertiary: 45-54 years old (Older Gen X) - Established purchasing power, value reliability and proven results, may be influenced by expert or thought leadership content.*

  • Gender:

* Balanced/Neutral: Assuming a product/service with broad appeal, a relatively even split (50/50 male/female) is common, with nuances based on specific product applications.

* Gender-Specific Skew: If the product targets a specific gender (e.g., women's fashion, men's grooming), this would be adjusted accordingly (e.g., 70% Female, 30% Male).

  • Geographic Location:

Primary: Urban and suburban areas in developed countries (e.g., USA, Canada, UK, Australia, Western Europe). Higher disposable income, better internet penetration, more exposure to digital trends.*

* Secondary: Growth markets with increasing digital adoption and middle-class populations.

* Specificity: Important to narrow down to regions where your product/service is available or where you have logistical capabilities.

  • Income Level:

Primary: Middle to Upper-Middle Class ($50,000 - $150,000+ household income). Ability to afford discretionary spending, values quality and brand experience.*

* Secondary: Emerging affluent, looking for value and aspirational purchases.

  • Education Level:

Primary: College-educated or pursuing higher education. More likely to research products, understand complex value propositions, and engage with informative content.*

* Secondary: High school graduates with vocational training or specialized skills.

  • Occupation:

Primary: Professionals, office workers, entrepreneurs, creatives. Busy lifestyles, seeking convenience, efficiency, or creative inspiration.*

* Secondary: Students, skilled tradespeople.


5. Detailed Audience Psychographics

This section delves into the "why" behind their actions, revealing their motivations, values, and lifestyle.

  • Interests & Hobbies:

* Digital Lifestyle: Tech gadgets, social media trends, online streaming, digital content creation/consumption.

* Personal Development: Health & wellness, fitness, mindfulness, learning new skills, career growth.

* Lifestyle & Culture: Travel, food & dining, fashion, home decor, entertainment, arts.

* Community & Social Causes: Sustainability, ethical sourcing, social justice, local community involvement.

  • Values & Beliefs:

* Authenticity & Transparency: Value genuine connections, honest reviews, and brands that walk the talk. Distrust overly polished or inauthentic content.

* Quality & Value: Seek products/services that offer a good return on investment, durability, or meaningful experiences.

* Convenience & Efficiency: Appreciate solutions that save time, reduce effort, or simplify their lives.

* Self-Expression & Identity: Use products/services as a way to express their personality, values, or aspirations.

* Innovation & Progress: Open to new ideas, technologies, and products that offer improvement.

* Social Responsibility: Increasingly prefer brands with ethical practices, sustainable initiatives, and a positive social impact.

  • Lifestyle:

* Connected & Mobile: Heavily reliant on smartphones and digital devices for information, communication, and entertainment.

* Busy & Time-Conscious: Juggling work, family, social life; appreciate convenience and time-saving solutions.

* Experience-Oriented: Prioritize experiences over purely material possessions; seek out unique, memorable moments.

* Health & Wellness Conscious: Concerned about physical and mental well-being; interested in products/services that support a healthy lifestyle.

* Socially Active: Engaged with friends, family, and communities both online and offline.

  • Pain Points & Challenges:

* Information Overload: Difficulty sifting through vast amounts of information to find reliable solutions.

* Lack of Time: Struggling to balance commitments, leading to stress and a desire for efficiency.

* Decision Fatigue: Overwhelmed by choices, seeking trusted recommendations.

* Maintaining Authenticity: Desire to present a genuine self online, balancing curated content with real life.

* Finding Trustworthy Information: Skepticism towards traditional advertising; value peer recommendations and expert opinions.

  • Motivations & Aspirations:

* Self-Improvement: Desire to learn, grow, and become a better version of themselves.

* Belonging & Connection: Seeking community, shared experiences, and social validation.

* Convenience & Ease: Simplifying daily routines, reducing stress.

* Status & Recognition: Aspiring to achieve certain lifestyle goals or social standing.

* Discovery & Novelty: Enjoy finding new and exciting products, experiences, or ideas.

* Making a Positive Impact: Contributing to causes they care about, supporting ethical brands.

  • Brand Affinities:

* Often aligns with brands that are innovative, customer-centric, transparent, and have a strong social presence.

* Examples: Apple, Patagonia, Lululemon, Glossier, Warby Parker, Tesla (depending on specific product/service).


6. Audience Behavioral Analysis

Understanding how your audience interacts online and makes purchasing decisions is crucial.

  • Online Habits:

* Daily Usage: Spend 3-5+ hours daily on digital platforms (excluding work).

* Multi-Platform Engagement: Active across multiple social media channels, often switching between them throughout the day.

* Mobile-First: Predominantly access content and services via smartphones.

* Content Consumption: Mix of short-form video (TikTok, Reels, YouTube Shorts), long-form video (YouTube, streaming), blog posts, podcasts, and visually rich static content (Instagram, Pinterest).

* Research-Oriented: Before purchasing, they conduct online research, read reviews, compare products, and seek recommendations.

  • Preferred Social Media Platforms:

* Instagram: Visual discovery, lifestyle content, product showcases, influencer engagement (stories, reels, posts).

* TikTok: Short-form, authentic, entertaining content, trend participation, Gen Z and younger Millennial engagement.

* YouTube: In-depth reviews, tutorials, educational content, entertainment, long-form storytelling.

* Facebook: Community groups, targeted ads, older millennial/Gen X engagement, event promotion.

* Pinterest: Visual search, inspiration, product discovery, planning purchases (especially for home, fashion, crafts).

* X (formerly Twitter): Real-time news, discussions, brand interaction, thought leadership.

* LinkedIn: Professional networking, B2B insights (if applicable), industry thought leaders.

  • Content Consumption Patterns:

* Snackable Content: High demand for quick, engaging, easily digestible content.

* Visual Dominance: Strong preference for video and high-quality imagery.

* Authenticity over Production Value: Often prioritize genuine, relatable content over overly polished, commercial-looking material (especially on TikTok/Reels).

* Problem-Solution Focused: Seek content that addresses their pain points and offers practical solutions.

* Entertainment & Education: Value content that is both engaging and informative.

  • Purchasing Behavior:

* Influencer-Driven Discovery: Often discover new products/services through influencers they follow and trust.

* Review-Dependent: Heavily rely on user reviews, testimonials, and influencer endorsements before making a purchase.

* Omnichannel Shopping: Research online, may purchase online or in-store; expect seamless experiences across touchpoints.

* Value-Conscious: Seek good deals, but also willing to pay a premium for quality, brand values, or unique experiences.

* Post-Purchase Engagement: May share their experiences, reviews, and unboxings online.

  • Influencer Trust Factors:

* Authenticity & Relatability: Influencers who feel genuine, share real experiences, and aren't perceived as "selling out."

* Niche Expertise: Influencers who are true experts or passionate advocates in a specific area.

* Engagement Rate: Influencers with highly engaged communities, not just large follower counts.

* Transparency: Clear disclosure of sponsored content.

* Consistency: Regular, high-quality content that aligns with their personal brand.


7. Key Audience Segments / Personas (Illustrative)

Based on the above analysis, we can develop illustrative personas to guide our influencer strategy.

Persona 1: "The Conscious Explorer"

  • Demographics: Female, 28-38, urban professional, $70k-$120k HHI, college-educated.
  • Psychographics: Values sustainability, ethical sourcing, personal growth, unique experiences. Seeks products that align with her values and enhance her well-being. Aspirational, but also practical.
  • Pain Points: Information overload on sustainable choices, finding authentic brands, balancing career with personal life.
  • Online Behavior: Active on Instagram (following ethical brands, wellness accounts, travel bloggers), Pinterest (sustainable living tips, healthy recipes), and YouTube (documentaries, product reviews). Reads blogs on conscious consumerism.
  • Influencer Preferences: Micro-influencers in sustainability, ethical fashion, wellness, and mindful living. Values their genuine passion and in-depth knowledge. Looks for transparent reviews and personal stories.
  • Content Resonance: Behind-the-scenes content, educational deep-dives, "how-to" guides for sustainable living, travel vlogs with an ethical slant, product comparisons focusing on impact.

Persona 2: "The Savvy Trendsetter"

  • Demographics: Male/Female, 20-30, suburban/urban, $50k-$90k HHI, some college/college graduate.
  • Psychographics: Early adopter, values innovation, convenience, and social connection. Enjoys discovering new gadgets, fashion, and lifestyle hacks. Wants to stay ahead of trends.
  • Pain Points: FOMO (Fear of Missing Out), decision fatigue when faced with too many options, seeking quick and effective solutions.
  • Online Behavior: Heavily active on TikTok (trends, challenges, product discovery), Instagram Reels (short-form content, fashion/tech showcases), and YouTube (unboxing, tech reviews, lifestyle vlogs).
  • Influencer Preferences: Macro-influencers and popular content creators known for being "in the know" about new products, hacks, and trends. Values engaging, entertaining, and visually appealing content.
  • Content Resonance: Fast-paced product demonstrations, "X vs. Y" comparisons, lifestyle integration, comedic skits, challenges, unboxing videos, "get ready with me" style content.

Persona 3: "The Busy Professional"

  • Demographics: Male/Female, 35-45, urban/suburban, $90k-$150k+ HHI, university degree.
  • Psychographics: Values efficiency, quality, reliability, and solutions that simplify their busy life. Time-poor, but willing to invest in products/services that offer tangible benefits and save time/effort.
  • Pain Points: Lack of time, stress from juggling multiple responsibilities, seeking trustworthy recommendations for premium products/services.
  • Online Behavior: Uses LinkedIn for professional insights, YouTube for in-depth product reviews/tutorials, Facebook for community groups and news. Reads industry blogs and newsletters. Less active on highly visual, fast-paced platforms unless specifically seeking a solution.
  • Influencer Preferences: Mid-tier influencers or thought leaders who are experts in their field (e.g., productivity, finance, specific industry verticals). Values authoritative, well-researched, and practical advice.
  • Content Resonance: Expert interviews, detailed product reviews focusing on benefits and ROI, tutorials that demonstrate time-saving features, case studies, comparison guides, strategic advice.

8. Data Insights & Trends

  • Rise of Authenticity: Consumers are increasingly wary of overly polished, inauthentic content. Genuine storytelling, behind-the-scenes glimpses, and relatable experiences drive higher engagement and trust.
  • Video Dominance: Short-form video (TikTok, Instagram Reels, YouTube Shorts) continues to be the most consumed content format, particularly among younger demographics. Long-form video remains critical for in-depth reviews and educational content.
  • Micro & Nano Influencer Power: While macro-influencers offer reach, micro (10k-100k followers) and nano (1k-10k followers) influencers often boast higher engagement rates, stronger niche communities, and more perceived authenticity. They are cost-effective and can drive significant ROI.
  • Community-Led Commerce: Consumers increasingly trust recommendations from their online communities and peers. Influencers who foster strong, engaged communities are more valuable.

*

gemini Output

This deliverable provides a comprehensive blueprint for planning and executing a successful influencer marketing campaign. It covers every critical aspect, from identifying the right partners to tracking your return on investment, ensuring your campaign is strategic, compliant, and impactful.


Influencer Campaign Planner: Your Blueprint for Strategic Success

In today's digital landscape, influencer marketing is a powerful engine for brand growth, authentic connection, and measurable results. This planner is designed to guide you through every stage of developing a high-impact influencer campaign, ensuring you build genuine relationships and achieve your marketing objectives.


Section 1: Campaign Objectives & Target Audience Definition

Before engaging with any influencer, clarity on your campaign's purpose and whom you aim to reach is paramount.

1.1 Define Your Campaign Objectives

What do you want to achieve with this campaign? Be SMART (Specific, Measurable, Achievable, Relevant, Time-bound).

  • Brand Awareness: Increase brand visibility, reach new audiences.

Example:* Achieve 5 million impressions across influencer content within 6 weeks.

  • Engagement: Foster interaction and community around your brand.

Example:* Generate 50,000 unique engagements (likes, comments, shares) on sponsored posts.

  • Lead Generation/Sales: Drive direct conversions or sign-ups.

Example:* Drive 1,000 unique purchases using influencer-specific discount codes, resulting in $X revenue.

  • Content Creation: Generate high-quality user-generated content (UGC) for repurposing.

Example:* Obtain 20 pieces of high-quality visual content suitable for brand channels.

  • Brand Sentiment/Perception: Improve brand image or introduce a new product.

Example:* Increase positive brand mentions by 15% in social listening data.

1.2 Pinpoint Your Target Audience

Who are you trying to reach through these influencers?

  • Demographics: Age, gender, location, income, education.
  • Psychographics: Interests, hobbies, values, lifestyle, pain points, aspirations.
  • Online Behavior: Which platforms do they frequent? What kind of content do they consume?
  • Brand Alignment: How does this audience connect with your brand's values and offerings?

Section 2: Ideal Influencer Profiles

Identifying the right influencers is crucial for authentic messaging and effective reach. This section outlines the characteristics of your ideal partners.

2.1 Key Characteristics for Ideal Influencers

  • Niche & Relevance: Do they genuinely align with your product/service and industry? Their content should naturally integrate your brand.
  • Audience Demographics & Psychographics: Do their followers match your target audience? (e.g., age, interests, location).
  • Authenticity & Trust: Do they have a genuine connection with their audience? Are their recommendations trusted?
  • Engagement Rate: High engagement (comments, likes, shares, saves relative to follower count) is often more valuable than raw follower count.

Benchmark:* Typically 2-5% is good, higher for micro/nano.

  • Content Quality & Aesthetic: Does their content production quality and visual style align with your brand's image?
  • Brand Safety & Reputation: Do they have a clean track record? Avoid influencers with controversial pasts or fake followers.
  • Communication & Professionalism: Are they responsive, organized, and easy to work with?

2.2 Influencer Tiers & Strategy

Consider a mix of influencer tiers based on your objectives and budget.

  • Nano-Influencers (1K-10K followers): Highly engaged, niche communities, excellent for authentic reviews and grassroots awareness. High engagement rates.
  • Micro-Influencers (10K-100K followers): Strong niche authority, good engagement, cost-effective for targeted reach.
  • Mid-Tier Influencers (100K-500K followers): Broader reach than micro, still good engagement, often seen as experts in their field.
  • Macro-Influencers (500K-1M followers): Significant reach, can drive large awareness campaigns, but often higher cost and potentially lower engagement rate.
  • Mega/Celebrity Influencers (1M+ followers): Massive reach, high visibility, but very expensive and often lower engagement; best for broad brand awareness.

2.3 Finding Your Ideal Influencers

  • Social Media Discovery: Use platform search, explore pages, relevant hashtags, and "similar accounts" features.
  • Audience Analysis: See who your current audience follows.
  • Influencer Marketing Platforms: Tools like Upfluence, Grin, AspireIQ, HypeAuditor, or CreatorIQ offer extensive databases and analytics.
  • Competitor Analysis: See who your competitors are working with (and if there's an opportunity to work with others).
  • Hashtag Research: Identify popular hashtags in your niche and see who is using them.

Section 3: Influencer Outreach Strategy & Templates

A well-crafted outreach message can significantly increase your response rate and set the tone for a positive collaboration.

3.1 Outreach Best Practices

  • Personalization is Key: Reference specific content they've created, explain why you chose them.
  • Be Clear & Concise: State your purpose and what you're offering upfront.
  • Highlight Mutual Value: How does this partnership benefit them and their audience?
  • Provide Essential Information: Your brand, product, campaign idea, and potential compensation.
  • Call to Action: What's the next step? (e.g., "Are you open to learning more?").
  • Professionalism: Maintain a respectful and enthusiastic tone.

3.2 Outreach Templates

Template 1: Initial Outreach Email/DM

Subject: Collaboration Opportunity: [Your Brand Name] x [Influencer's Name]

Hi [Influencer's Name],

My name is [Your Name] and I'm the [Your Title] at [Your Brand Name]. I've been following your work for a while, and I'm particularly impressed by your [mention a specific piece of content, e.g., "recent Reel on sustainable fashion" or "authentic reviews of travel destinations"]. Your audience's engagement and your unique voice truly stand out.

At [Your Brand Name], we [briefly describe what your brand does and its mission, e.g., "create innovative eco-friendly skincare products" or "offer unique adventure travel experiences"]. We're launching a new campaign around [Campaign Theme/Product] and immediately thought of you as an ideal partner. Your passion for [Influencer's Niche] aligns perfectly with our brand values, and we believe your audience would genuinely resonate with [Your Product/Service].

We're looking to collaborate on [briefly describe the type of content, e.g., "a series of authentic Instagram Reels and Stories showcasing our new product line"]. We're confident this partnership would be mutually beneficial, offering your audience valuable content while expanding our reach.

Would you be open to discussing this opportunity further and learning more about our campaign vision and compensation structure? Please let me know your availability for a brief call next week or if you prefer to continue via email.

Thank you for your time and consideration!

Best regards,

[Your Name]

[Your Title]

[Your Brand Name]

[Your Website]

[Your Social Media Link]


Template 2: Follow-up Email/DM (if no response after 3-5 business days)

Subject: Following Up: Collaboration with [Your Brand Name]

Hi [Influencer's Name],

Hope you're having a great week!

I'm just following up on my email from [Date of previous email] regarding a potential collaboration between [Your Brand Name] and you for our upcoming [Campaign Theme/Product] campaign.

I understand you have a busy schedule, but I truly believe this could be a fantastic opportunity for both of us to create engaging content that resonates with your audience, especially given your expertise in [Influencer's Niche].

If you're interested in exploring this further, please let me know. I'd be happy to share more details about the campaign and answer any questions you might have.

Thanks again for your time!

Best,

[Your Name]

[Your Brand Name]


Section 4: Influencer Contract Key Terms

A clear, comprehensive contract protects both parties and ensures a smooth collaboration. Always consult legal counsel.

4.1 Essential Contract Clauses

  • Scope of Work & Deliverables:

* Specific content formats (e.g., 1 Instagram Reel, 2 Stories, 1 static post).

* Key messages, hashtags, @mentions, and CTAs to include.

* Required posting dates/deadlines.

* Approval process for content drafts.

  • Payment Terms:

* Agreed-upon fee (flat fee, per-post, commission, product-only, hybrid).

* Payment schedule (e.g., 50% upfront, 50% upon content approval/posting; net 30 days).

* Payment method (bank transfer, PayPal, etc.).

* Clarity on any additional costs (e.g., travel, production).

  • Content Rights & Usage:

* Licensing: What rights does your brand have to repurpose the content? (e.g., for ads, website, other social channels).

* Term: How long can the brand use the content? (e.g., 3 months, 1 year, perpetual).

* Exclusivity: Does the influencer grant exclusive rights to the content for a period?

* Ownership: Typically, the influencer owns the original content, but grants license to the brand.

  • Disclosure Requirements:

* Mandatory use of FTC/ASA guidelines (e.g., #Ad, #Sponsored, #Partner, "Paid Partnership" tool).

* Clear instructions on how and where to place disclosures.

  • Exclusivity Clauses:

* Prevent the influencer from promoting competing brands for a specified period (e.g., 30-90 days before/after your campaign).

* Specify geographical or category exclusivity if necessary.

  • Approvals & Revisions:

* Process for content submission and brand review.

* Number of revisions allowed.

* Timeline for approvals.

  • Termination Clauses:

* Conditions under which either party can terminate the agreement (e.g., breach of contract, failure to meet deadlines, brand safety issues).

* Consequences of termination (e.g., pro-rata payment, content removal).

  • Confidentiality: Non-disclosure of campaign details, product information, or financial terms.
  • Governing Law: Jurisdiction for legal disputes.
  • Representations & Warranties: Influencer confirms they have the right to enter the agreement, content is original, etc.

Section 5: Content Guidelines & Creative Brief

A clear creative brief ensures influencers understand your vision while allowing them creative freedom.

5.1 Campaign Overview & Messaging

  • Campaign Title: [e.g., "Summer Glow with [Your Brand]"]
  • Campaign Dates: [Start Date] to [End Date]
  • Overall Goal: [Reiterate main objective, e.g., "Drive awareness for our new hydrating serum."]
  • Key Message(s): What 1-3 core messages should be communicated? (e.g., "Hydrate and glow all summer," "Clean ingredients for sensitive skin.")
  • Target Audience: [Briefly remind influencers who they are speaking to.]
  • Brand Voice & Tone: [e.g., "Friendly, empowering, aspirational," "Informative, trustworthy, premium."]

5.2 Required Elements for Content

  • Product/Service Focus: Clearly specify which product(s) or service(s) to feature.
  • Call to Action (CTA): What do you want the audience to do?

* "Shop now at [link in bio]"

* "Use code [DISCOUNT CODE] for X% off!"

* "Learn more at [website.com]"

* "Tag a friend who needs [product]!"

  • Required Hashtags:

* Campaign-specific: #YourCampaignName

* Brand-specific: #YourBrandName #YourBrandSlogan

* Niche-specific: #SkincareRoutine #TravelGoals

* Disclosure Hashtags: #Ad #Sponsored #Partner (Mandatory)

  • Required @Mentions: @YourBrandOfficial
  • Link Placement:

* Instagram: Link in bio (with specific instructions), swipe-up link for Stories (if applicable).

* YouTube: Link in description box.

* TikTok: Link in bio, in-video text overlay.

  • Key Visuals/Angles:

* Show product in use.

* Highlight specific features/benefits.

* Authentic lifestyle integration.

* Specific unboxing or tutorial shots.

5.3 Content Formats & Specifications

  • Instagram:

* Reel: [Length, music style, key scenes, on-screen text examples]

* Static Post: [Image/carousel count, caption length, visual style]

* Story: [Number of frames, interactive elements like polls/questions, swipe-up link]

  • TikTok: [Length, sound usage, trend integration, text overlays]
  • YouTube: [Video length, specific segments to include, intro/outro, product placement]
  • Blog Post: [Word count, internal links, image requirements, SEO keywords]

5.4 Dos and Don'ts

  • DO:

* Be authentic and integrate the product naturally into your content.

* Share your genuine experience and enthusiasm.

* Engage with comments on your sponsored posts.

* Follow all disclosure guidelines meticulously.

* Submit content for approval by the deadline.

  • DON'T:

* Make unsubstantiated claims about the product.

* Feature competitor products during the campaign period.

* Use offensive language or imagery.

* Post content that doesn't align with your usual style or audience expectations.

* Delete sponsored content prematurely (unless agreed upon).

5.5 Content Approval Process

  • Submission Deadline: [Date] for draft content.
  • Review Period: [X] business days for brand feedback.
  • Revision Process: [X] rounds of revisions included.
  • Final Posting Date: [Date]

Section 6: ROI Tracking & Measurement Framework

Measuring your campaign'

gemini Output

Influencer Marketing Campaign Planner: Optimized & Finalized Deliverable

This document outlines a comprehensive, actionable plan for executing a successful influencer marketing campaign. It covers all critical phases from influencer identification and outreach to content creation, legal agreements, and robust ROI tracking. This framework is designed to be adaptable and can be tailored to specific campaign objectives and brand identities.


1. Executive Summary

This Influencer Campaign Planner provides a strategic roadmap for leveraging influencer partnerships to achieve your marketing objectives. By meticulously defining ideal influencer profiles, streamlining outreach, establishing clear contractual terms, guiding content creation, and implementing a robust ROI tracking framework, this plan aims to maximize campaign effectiveness and deliver measurable results. The goal is to foster authentic connections between your brand and target audiences through trusted voices, driving awareness, engagement, and ultimately, conversions.


2. Campaign Overview & Objectives (Assumed for Example)

To provide concrete examples throughout this planner, we'll assume a hypothetical campaign with the following characteristics. Please note: These elements should be customized to your specific brand and campaign goals.

  • Campaign Name: "Innovate & Inspire: [Your Brand Name]’s Future Forward"
  • Primary Goal: Increase brand awareness and drive website traffic to a new product launch.
  • Secondary Goal: Generate qualified leads and pre-orders/sales for the new product.
  • Target Audience: Tech-savvy young professionals (25-40), early adopters, interested in sustainable innovation and lifestyle upgrades.
  • Key Message: "[Your Brand Name]'s new [Product Name] seamlessly integrates cutting-edge technology with sustainable design to enhance your daily life."
  • Campaign Duration: 8 weeks (Discovery to Reporting)
  • Platforms: Instagram (Reels, Stories, Posts), TikTok, YouTube, Blogs (optional)

3. Ideal Influencer Profiles

Identifying the right influencers is paramount. Our strategy focuses on a multi-tiered approach to maximize reach and authenticity.

3.1. Influencer Tiers & Criteria

  • Nano-Influencers (1K - 10K followers):

* Focus: Hyper-niche communities, high authenticity, extremely high engagement rates (often 5-10%+).

* Content Style: Raw, relatable, personal testimonials, user-generated feel.

* Value: Deep trust within their small community, cost-effective, excellent for targeted reach and UGC generation.

* Fit: Lifestyle, specific tech niches, local communities.

  • Micro-Influencers (10K - 100K followers):

* Focus: Strong niche authority, engaged communities, above-average engagement rates (3-7%).

* Content Style: Professional yet authentic, tutorial-based, product reviews, integrated storytelling.

* Value: Credibility, scalable reach, good balance of cost and impact.

* Fit: Tech reviewers, sustainable living advocates, productivity hacks, design enthusiasts.

  • Macro-Influencers (100K - 1M followers):

* Focus: Broader reach within a defined niche, established personal brand, good engagement rates (1-3%).

* Content Style: High production value, aspirational, engaging storytelling, professional endorsements.

* Value: Significant brand awareness, reach to a larger audience, perceived authority.

* Fit: Popular tech reviewers, lifestyle gurus with a tech focus, sustainability thought leaders.

  • Mega-Influencers / Celebrities (1M+ followers):

* Focus: Mass market appeal, very broad reach, lower engagement rates (often <1%).

* Content Style: Highly polished, often integrated into larger campaigns, brand ambassador roles.

* Value: Maximum brand visibility, media attention, credibility by association.

* Fit: Limited to very specific campaign goals requiring mass reach and substantial budget. (Likely excluded for this example campaign due to budget assumptions).

3.2. Key Profile Attributes to Evaluate

  • Audience Demographics & Psychographics: Must align with our target audience (age, location, interests, values).
  • Brand Fit & Authenticity: Does their content style, personal brand, and values align with [Your Brand Name]? Do they genuinely use or express interest in similar products/services?
  • Engagement Rate: Not just follower count, but likes, comments, shares per post. High engagement indicates an active, loyal audience.
  • Content Quality & Aesthetic: Professionalism, creativity, video/photo quality, alignment with brand's visual identity.
  • Past Collaborations: Review previous sponsored content for disclosure compliance, brand compatibility, and performance.
  • Platform Presence: Strong presence on target platforms (Instagram, TikTok, YouTube).
  • Authenticity & Trust: Evidence of a genuine connection with their audience, avoiding "bought" followers or engagement.

4. Influencer Outreach Strategy & Templates

A personalized and professional outreach approach is crucial for securing high-quality partnerships.

4.1. Outreach Phases

  1. Identification & Vetting: Use tools (e.g., CreatorIQ, HypeAuditor, manually) to find influencers matching profiles.
  2. Initial Contact: Personalized email or direct message (DM) introducing the brand and the potential for collaboration.
  3. Follow-up: Gentle reminder if no response, offering more details.
  4. Proposal & Briefing: Once interest is confirmed, send a detailed campaign brief and discuss terms.
  5. Negotiation & Agreement: Finalize deliverables, compensation, and legal terms.

4.2. Outreach Best Practices

  • Personalization is Key: Reference specific content or aspects of their profile that caught your attention. Avoid generic mass emails.
  • Be Clear & Concise: State your brand, product, and the purpose of your outreach upfront.
  • Highlight Mutual Benefit: Explain how this collaboration benefits them and their audience.
  • Provide Next Steps: Clearly indicate what you'd like them to do (e.g., "reply to schedule a brief call").

4.3. Outreach Templates

Template 1: Initial Contact Email (Personalized)

Subject: Exciting Collaboration Opportunity for [Influencer's Name] & [Your Brand Name]!

Dear [Influencer's Name],

My name is [Your Name] and I'm the [Your Title] at [Your Brand Name]. I've been following your work on [Platform, e.g., Instagram/YouTube] for a while, and I'm particularly impressed by your [mention specific content piece, e.g., "recent review of sustainable tech gadgets" or "insightful stories on smart home integration"]. Your dedication to [mention their niche/value, e.g., "showcasing innovative solutions that simplify daily life"] truly resonates with our brand's mission.

We are launching an exciting new product, the [Product Name], a [briefly describe product and its key benefit, e.g., "smart home device designed to enhance efficiency and promote sustainable living"]. We believe your audience, who values [mention audience interest, e.g., "cutting-edge technology and conscious consumption"], would be genuinely interested in learning about it through your unique perspective.

We're looking to partner with authentic voices like yours to introduce the [Product Name] to a wider audience. Would you be open to a brief virtual meeting next week to discuss this potential collaboration further and share more details about our campaign?

Thank you for your time and consideration.

Best regards,

[Your Name]

[Your Title]

[Your Brand Name]

[Your Website]

[Your Contact Number/Email]


Template 2: Follow-Up Email

Subject: Following Up: Collaboration Opportunity with [Your Brand Name]

Dear [Influencer's Name],

Hope this email finds you well.

I'm following up on my previous email from [Date] regarding a potential collaboration opportunity with [Your Brand Name] for our new [Product Name].

We're incredibly excited about this launch and believe your creative approach and engaged audience would be a perfect fit to tell our story. We're offering [mention a brief benefit, e.g., "exclusive early access to the product and competitive compensation"].

If you're interested in learning more, please let me know a good time for a quick chat, or if you prefer, I can send over a detailed campaign brief for your review.

Looking forward to hearing from you!

Best regards,

[Your Name]

[Your Brand Name]


Template 3: Campaign Brief / Proposal (After Initial Interest)

(This would be a separate, more detailed document, but here's an outline for the email sending it)

Subject: [Your Brand Name] x [Influencer's Name] - Detailed Campaign Brief for [Product Name]

Dear [Influencer's Name],

Thank you for expressing interest in partnering with [Your Brand Name]!

As discussed, we're thrilled about the possibility of collaborating with you on the launch of our new [Product Name]. Attached, you'll find a detailed campaign brief that outlines:

  • Campaign Objectives & Key Message: What we aim to achieve.
  • Product Details: Information about the [Product Name] and its unique selling points.
  • Target Audience: Who we want to reach.
  • Proposed Deliverables: Specific content types (e.g., 1 Instagram Reel, 3 Instagram Stories, 1 static post).
  • Key Messaging & CTAs: Core points to convey and desired audience actions.
  • Mandatory Hashtags & @Mentions: Essential elements for tracking and brand visibility.
  • Timeline: Proposed content submission and posting dates.
  • Compensation: Our proposed offer for your deliverables and usage rights.

Please review the brief at your convenience. I'm available to answer any questions you may have and discuss how we can make this partnership a success.

We look forward to the possibility of working together!

Best regards,

[Your Name]

[Your Brand Name]


5. Influencer Contract Terms & Agreements

A clear, legally sound contract protects both the brand and the influencer.

5.1. Key Contract Clauses

  • Scope of Work & Deliverables:

* Specific content pieces required (e.g., 1 Instagram Reel, 3 Stories, 1 static post).

* Platform(s) for posting.

* Minimum engagement period (e.g., content must remain live for 6 months).

* Specific mentions, hashtags, and CTAs.

  • Timeline:

* Content submission for review date.

* Final approval date.

* Posting date(s) and time(s).

  • Compensation & Payment Terms:

* Agreed-upon fee (flat fee, product value + fee, commission-based).

* Payment schedule (e.g., 50% upfront, 50% upon completion; or net 30 days post-campaign).

* Method of payment.

  • Content Rights & Usage:

* Grant of License: Brand's right to repost, repurpose, and use influencer-generated content for marketing purposes (e.g., on brand website, social media, ads). Specify duration and scope (e.g., "worldwide, perpetual license for digital advertising use").

* Exclusivity: If the influencer cannot promote competing brands for a specified period (e.g., 30-90 days before/after campaign). Define scope (product category, industry).

  • Disclosure Requirements:

* Mandatory use of #Ad, #Sponsored, #Partner, or equivalent platform disclosure tools (e.g., "Paid partnership" on Instagram).

* Adherence to FTC guidelines (or local regulatory bodies).

  • Approval Process:

* Brand's right to review and request revisions to content before posting.

* Number of revision rounds.

* Clear communication channels for approvals.

  • Authenticity & Compliance:

* Influencer's commitment to creating authentic content.

* No misrepresentation of the product.

* Compliance with platform terms of service.

  • Confidentiality: Non-disclosure of campaign details, product information, or contract terms.
  • Termination Clause: Conditions under which either party can terminate the agreement (e.g., breach of contract, failure to deliver, brand reputational damage).
  • Indemnification: Protection for both parties against legal claims arising from the collaboration.
  • Governing Law: Jurisdiction for legal disputes.

5.2. Payment Structure Options

  • Flat Fee: Most common. A set amount paid for specific deliverables.
  • Product Exchange + Small Fee: For smaller influencers or campaigns, providing free product alongside a modest fee.
  • Performance-Based (Commission/Affiliate): Payment tied to sales or leads generated using unique codes or affiliate links. Often combined with a base fee.
  • Hybrid: A combination of a flat fee and performance incentives.

6. Content Guidelines & Creative Brief

A detailed creative brief ensures consistency and quality while allowing influencers creative freedom.

6.1. Campaign Theme & Core Message

  • Theme: "Innovate & Inspire: [Your Brand Name]’s Future Forward"
  • Core Message: "[Your Brand Name]'s new [Product Name] seamlessly integrates cutting-edge technology with sustainable design to enhance your daily life. Experience the future, today."
  • Desired Tone: Innovative, inspiring, authentic, relatable, sophisticated, forward-thinking.

6.2. Mandatory Elements

  • Product Feature: Clearly showcase the [Product Name] in use.
  • Key Selling Points: Highlight [e.g., "eco-friendly materials," "smart AI features," "sleek minimalist design"].
  • Call to Action (CTA):

* "Learn more at [Your Website Link in Bio]"

* "Shop now using my exclusive code [INFLUENCERCODE] for 15% off!"

* "Link in bio to discover how [Product Name] can transform your routine!"

  • Hashtags:

* Mandatory: #YourBrandName #ProductLaunch #FutureForward #[ProductName]

* Campaign-specific: #InnovateWithYourBrand

* Relevant niche: #SustainableTech #SmartLiving #TechGadgets

  • @Mentions: @YourBrandOfficialAccount in caption and visible in content.
  • Disclosure: Clear #Ad / #Sponsored / "Paid partnership with [Your Brand Name]" visible.

6.3. Content "Dos and Don'ts"

  • DOs:

* Integrate the product naturally into your daily routine/lifestyle.

* Showcase genuine excitement and personal experience.

* Highlight the benefits and how the product solves a problem or enhances life.

* Maintain your authentic voice and creative style.

* Use high-quality visuals and clear audio.

* Engage with comments on your post.

  • DON'Ts:

* Make unsubstantiated claims about the product.

* Use competitor products in the same frame.

* Post content that is off-brand, controversial, or offensive.

* Use copyrighted music without proper licensing (especially for Reels/TikTok).

* Post and immediately delete (content should remain live for the agreed period).

* Simply hold up the product; demonstrate its use.

6.4. Visual & Audio Style Guide

  • Aesthetic: Clean,
influencer_campaign_planner.md
Download as Markdown
Copy all content
Full output as text
Download ZIP
IDE-ready project ZIP
Copy share link
Permanent URL for this run
Get Embed Code
Embed this result on any website
Print / Save PDF
Use browser print dialog
\n\n\n"); var hasSrcMain=Object.keys(extracted).some(function(k){return k.indexOf("src/main")>=0;}); if(!hasSrcMain) zip.file(folder+"src/main."+ext,"import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport App from './App'\nimport './index.css'\n\nReactDOM.createRoot(document.getElementById('root')!).render(\n \n \n \n)\n"); var hasSrcApp=Object.keys(extracted).some(function(k){return k==="src/App."+ext||k==="App."+ext;}); if(!hasSrcApp) zip.file(folder+"src/App."+ext,"import React from 'react'\nimport './App.css'\n\nfunction App(){\n return(\n
\n
\n

"+slugTitle(pn)+"

\n

Built with PantheraHive BOS

\n
\n
\n )\n}\nexport default App\n"); zip.file(folder+"src/index.css","*{margin:0;padding:0;box-sizing:border-box}\nbody{font-family:system-ui,-apple-system,sans-serif;background:#f0f2f5;color:#1a1a2e}\n.app{min-height:100vh;display:flex;flex-direction:column}\n.app-header{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:40px}\nh1{font-size:2.5rem;font-weight:700}\n"); zip.file(folder+"src/App.css",""); zip.file(folder+"src/components/.gitkeep",""); zip.file(folder+"src/pages/.gitkeep",""); zip.file(folder+"src/hooks/.gitkeep",""); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nnpm run dev\n\`\`\`\n\n## Build\n\`\`\`bash\nnpm run build\n\`\`\`\n\n## Open in IDE\nOpen the project folder in VS Code or WebStorm.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n"); } /* --- Vue (Vite + Composition API + TypeScript) --- */ function buildVue(zip,folder,app,code,panelTxt){ var pn=pkgName(app); var C=cc(pn); var extracted=extractCode(panelTxt); zip.file(folder+"package.json",'{\n "name": "'+pn+'",\n "version": "0.0.0",\n "type": "module",\n "scripts": {\n "dev": "vite",\n "build": "vue-tsc -b && vite build",\n "preview": "vite preview"\n },\n "dependencies": {\n "vue": "^3.5.13",\n "vue-router": "^4.4.5",\n "pinia": "^2.3.0",\n "axios": "^1.7.9"\n },\n "devDependencies": {\n "@vitejs/plugin-vue": "^5.2.1",\n "typescript": "~5.7.3",\n "vite": "^6.0.5",\n "vue-tsc": "^2.2.0"\n }\n}\n'); zip.file(folder+"vite.config.ts","import { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\nimport { resolve } from 'path'\n\nexport default defineConfig({\n plugins: [vue()],\n resolve: { alias: { '@': resolve(__dirname,'src') } }\n})\n"); zip.file(folder+"tsconfig.json",'{"files":[],"references":[{"path":"./tsconfig.app.json"},{"path":"./tsconfig.node.json"}]}\n'); zip.file(folder+"tsconfig.app.json",'{\n "compilerOptions":{\n "target":"ES2020","useDefineForClassFields":true,"module":"ESNext","lib":["ES2020","DOM","DOM.Iterable"],\n "skipLibCheck":true,"moduleResolution":"bundler","allowImportingTsExtensions":true,\n "isolatedModules":true,"moduleDetection":"force","noEmit":true,"jsxImportSource":"vue",\n "strict":true,"paths":{"@/*":["./src/*"]}\n },\n "include":["src/**/*.ts","src/**/*.d.ts","src/**/*.tsx","src/**/*.vue"]\n}\n'); zip.file(folder+"env.d.ts","/// \n"); zip.file(folder+"index.html","\n\n\n \n \n "+slugTitle(pn)+"\n\n\n
\n \n\n\n"); var hasMain=Object.keys(extracted).some(function(k){return k==="src/main.ts"||k==="main.ts";}); if(!hasMain) zip.file(folder+"src/main.ts","import { createApp } from 'vue'\nimport { createPinia } from 'pinia'\nimport App from './App.vue'\nimport './assets/main.css'\n\nconst app = createApp(App)\napp.use(createPinia())\napp.mount('#app')\n"); var hasApp=Object.keys(extracted).some(function(k){return k.indexOf("App.vue")>=0;}); if(!hasApp) zip.file(folder+"src/App.vue","\n\n\n\n\n"); zip.file(folder+"src/assets/main.css","*{margin:0;padding:0;box-sizing:border-box}body{font-family:system-ui,sans-serif;background:#fff;color:#213547}\n"); zip.file(folder+"src/components/.gitkeep",""); zip.file(folder+"src/views/.gitkeep",""); zip.file(folder+"src/stores/.gitkeep",""); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nnpm run dev\n\`\`\`\n\n## Build\n\`\`\`bash\nnpm run build\n\`\`\`\n\nOpen in VS Code or WebStorm.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n"); } /* --- Angular (v19 standalone) --- */ function buildAngular(zip,folder,app,code,panelTxt){ var pn=pkgName(app); var C=cc(pn); var sel=pn.replace(/_/g,"-"); var extracted=extractCode(panelTxt); zip.file(folder+"package.json",'{\n "name": "'+pn+'",\n "version": "0.0.0",\n "scripts": {\n "ng": "ng",\n "start": "ng serve",\n "build": "ng build",\n "test": "ng test"\n },\n "dependencies": {\n "@angular/animations": "^19.0.0",\n "@angular/common": "^19.0.0",\n "@angular/compiler": "^19.0.0",\n "@angular/core": "^19.0.0",\n "@angular/forms": "^19.0.0",\n "@angular/platform-browser": "^19.0.0",\n "@angular/platform-browser-dynamic": "^19.0.0",\n "@angular/router": "^19.0.0",\n "rxjs": "~7.8.0",\n "tslib": "^2.3.0",\n "zone.js": "~0.15.0"\n },\n "devDependencies": {\n "@angular-devkit/build-angular": "^19.0.0",\n "@angular/cli": "^19.0.0",\n "@angular/compiler-cli": "^19.0.0",\n "typescript": "~5.6.0"\n }\n}\n'); zip.file(folder+"angular.json",'{\n "$schema": "./node_modules/@angular/cli/lib/config/schema.json",\n "version": 1,\n "newProjectRoot": "projects",\n "projects": {\n "'+pn+'": {\n "projectType": "application",\n "root": "",\n "sourceRoot": "src",\n "prefix": "app",\n "architect": {\n "build": {\n "builder": "@angular-devkit/build-angular:application",\n "options": {\n "outputPath": "dist/'+pn+'",\n "index": "src/index.html",\n "browser": "src/main.ts",\n "tsConfig": "tsconfig.app.json",\n "styles": ["src/styles.css"],\n "scripts": []\n }\n },\n "serve": {"builder":"@angular-devkit/build-angular:dev-server","configurations":{"production":{"buildTarget":"'+pn+':build:production"},"development":{"buildTarget":"'+pn+':build:development"}},"defaultConfiguration":"development"}\n }\n }\n }\n}\n'); zip.file(folder+"tsconfig.json",'{\n "compileOnSave": false,\n "compilerOptions": {"baseUrl":"./","outDir":"./dist/out-tsc","forceConsistentCasingInFileNames":true,"strict":true,"noImplicitOverride":true,"noPropertyAccessFromIndexSignature":true,"noImplicitReturns":true,"noFallthroughCasesInSwitch":true,"paths":{"@/*":["src/*"]},"skipLibCheck":true,"esModuleInterop":true,"sourceMap":true,"declaration":false,"experimentalDecorators":true,"moduleResolution":"bundler","importHelpers":true,"target":"ES2022","module":"ES2022","useDefineForClassFields":false,"lib":["ES2022","dom"]},\n "references":[{"path":"./tsconfig.app.json"}]\n}\n'); zip.file(folder+"tsconfig.app.json",'{\n "extends":"./tsconfig.json",\n "compilerOptions":{"outDir":"./dist/out-tsc","types":[]},\n "files":["src/main.ts"],\n "include":["src/**/*.d.ts"]\n}\n'); zip.file(folder+"src/index.html","\n\n\n \n "+slugTitle(pn)+"\n \n \n \n\n\n \n\n\n"); zip.file(folder+"src/main.ts","import { bootstrapApplication } from '@angular/platform-browser';\nimport { appConfig } from './app/app.config';\nimport { AppComponent } from './app/app.component';\n\nbootstrapApplication(AppComponent, appConfig)\n .catch(err => console.error(err));\n"); zip.file(folder+"src/styles.css","* { margin: 0; padding: 0; box-sizing: border-box; }\nbody { font-family: system-ui, -apple-system, sans-serif; background: #f9fafb; color: #111827; }\n"); var hasComp=Object.keys(extracted).some(function(k){return k.indexOf("app.component")>=0;}); if(!hasComp){ zip.file(folder+"src/app/app.component.ts","import { Component } from '@angular/core';\nimport { RouterOutlet } from '@angular/router';\n\n@Component({\n selector: 'app-root',\n standalone: true,\n imports: [RouterOutlet],\n templateUrl: './app.component.html',\n styleUrl: './app.component.css'\n})\nexport class AppComponent {\n title = '"+pn+"';\n}\n"); zip.file(folder+"src/app/app.component.html","
\n
\n

"+slugTitle(pn)+"

\n

Built with PantheraHive BOS

\n
\n \n
\n"); zip.file(folder+"src/app/app.component.css",".app-header{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:60vh;gap:16px}h1{font-size:2.5rem;font-weight:700;color:#6366f1}\n"); } zip.file(folder+"src/app/app.config.ts","import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { provideRouter } from '@angular/router';\nimport { routes } from './app.routes';\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n provideRouter(routes)\n ]\n};\n"); zip.file(folder+"src/app/app.routes.ts","import { Routes } from '@angular/router';\n\nexport const routes: Routes = [];\n"); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nng serve\n# or: npm start\n\`\`\`\n\n## Build\n\`\`\`bash\nng build\n\`\`\`\n\nOpen in VS Code with Angular Language Service extension.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n.angular/\n"); } /* --- Python --- */ function buildPython(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^\`\`\`[\w]*\n?/m,"").replace(/\n?\`\`\`$/m,"").trim(); var reqMap={"numpy":"numpy","pandas":"pandas","sklearn":"scikit-learn","tensorflow":"tensorflow","torch":"torch","flask":"flask","fastapi":"fastapi","uvicorn":"uvicorn","requests":"requests","sqlalchemy":"sqlalchemy","pydantic":"pydantic","dotenv":"python-dotenv","PIL":"Pillow","cv2":"opencv-python","matplotlib":"matplotlib","seaborn":"seaborn","scipy":"scipy"}; var reqs=[]; Object.keys(reqMap).forEach(function(k){if(src.indexOf("import "+k)>=0||src.indexOf("from "+k)>=0)reqs.push(reqMap[k]);}); var reqsTxt=reqs.length?reqs.join("\n"):"# add dependencies here\n"; zip.file(folder+"main.py",src||"# "+title+"\n# Generated by PantheraHive BOS\n\nprint(title+\" loaded\")\n"); zip.file(folder+"requirements.txt",reqsTxt); zip.file(folder+".env.example","# Environment variables\n"); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\npython3 -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n\`\`\`\n\n## Run\n\`\`\`bash\npython main.py\n\`\`\`\n"); zip.file(folder+".gitignore",".venv/\n__pycache__/\n*.pyc\n.env\n.DS_Store\n"); } /* --- Node.js --- */ function buildNode(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^\`\`\`[\w]*\n?/m,"").replace(/\n?\`\`\`$/m,"").trim(); var depMap={"mongoose":"^8.0.0","dotenv":"^16.4.5","axios":"^1.7.9","cors":"^2.8.5","bcryptjs":"^2.4.3","jsonwebtoken":"^9.0.2","socket.io":"^4.7.4","uuid":"^9.0.1","zod":"^3.22.4","express":"^4.18.2"}; var deps={}; Object.keys(depMap).forEach(function(k){if(src.indexOf(k)>=0)deps[k]=depMap[k];}); if(!deps["express"])deps["express"]="^4.18.2"; var pkgJson=JSON.stringify({"name":pn,"version":"1.0.0","main":"src/index.js","scripts":{"start":"node src/index.js","dev":"nodemon src/index.js"},"dependencies":deps,"devDependencies":{"nodemon":"^3.0.3"}},null,2)+"\n"; zip.file(folder+"package.json",pkgJson); var fallback="const express=require(\"express\");\nconst app=express();\napp.use(express.json());\n\napp.get(\"/\",(req,res)=>{\n res.json({message:\""+title+" API\"});\n});\n\nconst PORT=process.env.PORT||3000;\napp.listen(PORT,()=>console.log(\"Server on port \"+PORT));\n"; zip.file(folder+"src/index.js",src||fallback); zip.file(folder+".env.example","PORT=3000\n"); zip.file(folder+".gitignore","node_modules/\n.env\n.DS_Store\n"); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\n\`\`\`\n\n## Run\n\`\`\`bash\nnpm run dev\n\`\`\`\n"); } /* --- Vanilla HTML --- */ function buildVanillaHtml(zip,folder,app,code){ var title=slugTitle(app); var isFullDoc=code.trim().toLowerCase().indexOf("=0||code.trim().toLowerCase().indexOf("=0; var indexHtml=isFullDoc?code:"\n\n\n\n\n"+title+"\n\n\n\n"+code+"\n\n\n\n"; zip.file(folder+"index.html",indexHtml); zip.file(folder+"style.css","/* "+title+" — styles */\n*{margin:0;padding:0;box-sizing:border-box}\nbody{font-family:system-ui,-apple-system,sans-serif;background:#fff;color:#1a1a2e}\n"); zip.file(folder+"script.js","/* "+title+" — scripts */\n"); zip.file(folder+"assets/.gitkeep",""); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Open\nDouble-click \`index.html\` in your browser.\n\nOr serve locally:\n\`\`\`bash\nnpx serve .\n# or\npython3 -m http.server 3000\n\`\`\`\n"); zip.file(folder+".gitignore",".DS_Store\nnode_modules/\n.env\n"); } /* ===== MAIN ===== */ var sc=document.createElement("script"); sc.src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"; sc.onerror=function(){ if(lbl)lbl.textContent="Download ZIP"; alert("JSZip load failed — check connection."); }; sc.onload=function(){ var zip=new JSZip(); var base=(_phFname||"output").replace(/\.[^.]+$/,""); var app=base.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")||"my_app"; var folder=app+"/"; var vc=document.getElementById("panel-content"); var panelTxt=vc?(vc.innerText||vc.textContent||""):""; var lang=detectLang(_phCode,panelTxt); if(_phIsHtml){ buildVanillaHtml(zip,folder,app,_phCode); } else if(lang==="flutter"){ buildFlutter(zip,folder,app,_phCode,panelTxt); } else if(lang==="react-native"){ buildReactNative(zip,folder,app,_phCode,panelTxt); } else if(lang==="swift"){ buildSwift(zip,folder,app,_phCode,panelTxt); } else if(lang==="kotlin"){ buildKotlin(zip,folder,app,_phCode,panelTxt); } else if(lang==="react"){ buildReact(zip,folder,app,_phCode,panelTxt); } else if(lang==="vue"){ buildVue(zip,folder,app,_phCode,panelTxt); } else if(lang==="angular"){ buildAngular(zip,folder,app,_phCode,panelTxt); } else if(lang==="python"){ buildPython(zip,folder,app,_phCode); } else if(lang==="node"){ buildNode(zip,folder,app,_phCode); } else { /* Document/content workflow */ var title=app.replace(/_/g," "); var md=_phAll||_phCode||panelTxt||"No content"; zip.file(folder+app+".md",md); var h=""+title+""; h+="

"+title+"

"; var hc=md.replace(/&/g,"&").replace(//g,">"); hc=hc.replace(/^### (.+)$/gm,"

$1

"); hc=hc.replace(/^## (.+)$/gm,"

$1

"); hc=hc.replace(/^# (.+)$/gm,"

$1

"); hc=hc.replace(/\*\*(.+?)\*\*/g,"$1"); hc=hc.replace(/\n{2,}/g,"

"); h+="

"+hc+"

Generated by PantheraHive BOS
"; zip.file(folder+app+".html",h); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\nFiles:\n- "+app+".md (Markdown)\n- "+app+".html (styled HTML)\n"); } zip.generateAsync({type:"blob"}).then(function(blob){ var a=document.createElement("a"); a.href=URL.createObjectURL(blob); a.download=app+".zip"; a.click(); URL.revokeObjectURL(a.href); if(lbl)lbl.textContent="Download ZIP"; }); }; document.head.appendChild(sc); } function phShare(){navigator.clipboard.writeText(window.location.href).then(function(){var el=document.getElementById("ph-share-lbl");if(el){el.textContent="Link copied!";setTimeout(function(){el.textContent="Copy share link";},2500);}});}function phEmbed(){var runId=window.location.pathname.split("/").pop().replace(".html","");var embedUrl="https://pantherahive.com/embed/"+runId;var code='';navigator.clipboard.writeText(code).then(function(){var el=document.getElementById("ph-embed-lbl");if(el){el.textContent="Embed code copied!";setTimeout(function(){el.textContent="Get Embed Code";},2500);}});}