Social Media Organic Link Tracker
import logging
import os
from gunicorn.app.base import BaseApplication
from flask_apscheduler import APScheduler
from app_init import create_initialized_flask_app
from flask import request, redirect, url_for, render_template
from utils.main_utils import refetch_all_non_click_links
# Flask app creation should be done by create_initialized_flask_app to avoid circular dependency problems.
app = create_initialized_flask_app()
# Setup logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
scheduler = APScheduler()
scheduler.init_app(app)
scheduler.start()
@scheduler.task('cron', id='get_analytics_of_links', hour='0', minute='0')
def get_analytics_of_links():
with app.app_context():
refetch_all_non_click_links()
Created: | Last Updated:
Here's a step-by-step guide for using the Social Media Organic Link Tracker template:
Introduction
The Social Media Organic Link Tracker is a powerful tool designed to help marketers and content creators track and analyze the performance of their social media posts across various platforms. This template provides real-time insights and performance metrics to optimize brand engagement and campaign effectiveness.
Getting Started
To begin using this template, follow these steps:
-
Click the "Start with this Template" button in the Lazy Builder interface.
-
Press the "Test" button to initiate the deployment of the app and launch it.
Setting Up Environment Variables
Before you can use the app, you need to set up two important environment variables:
- YOUTUBE_API_KEY: This is required for tracking YouTube video analytics.
- ENSEMBLE_API_KEY: This is needed for Instagram and TikTok analytics.
To set these up:
- Go to the "Env Secrets" tab in the Lazy Builder interface.
- Add the following environment variables:
- Key:
YOUTUBE_API_KEY
, Value: Your YouTube API key - Key:
ENSEMBLE_API_MEY
, Value: Your Ensemble API key
Getting Your YouTube API Key
- Go to the Google Developers Console.
- Create a new project or select an existing one.
- Enable the YouTube Data API v3 for your project.
- Create credentials (API key) for the YouTube Data API.
- Copy the API key and use it as the value for
YOUTUBE_API_KEY
.
Getting Your Ensemble Key
- Sign up or log in to your Ensemble account.
- Verify your email and grab your token from the side bar
- Copy this token as the value for
ENSEMBLE_API_KEY
.
Using the App
Once you've set up the environment variables and deployed the app:
-
You'll be presented with a login/signup page. Create an account or log in if you already have one.
-
After logging in, you'll see the dashboard where you can create and manage your campaigns.
-
To create a new campaign:
- Click on "Create New Campaign"
- Enter a name for your campaign
-
Click "Create Campaign"
-
To add links to your campaign:
- Click on "Add New Link"
- Enter the original URL of your social media post
- Select the type of link (YouTube, Instagram Post, TikTok, or Click)
-
Click "Add Link"
-
To view analytics:
- Click on the analytics icon next to each link in your campaign
-
You'll see detailed analytics including views, likes, comments, and more, depending on the platform
-
To get an overview of your entire campaign:
- Click on "View Campaign Overview"
-
This will show you aggregated data across all links in your campaign
-
To export your campaign data:
- Click on "Export to CSV" to download a spreadsheet of your campaign data
Integrating the App
This app is designed to be used as a standalone tool for tracking and analyzing your social media campaigns. There's no need for additional integration with external tools. Simply use the provided interface to manage your campaigns and view your analytics.
Remember to regularly update your analytics by clicking the "Update Analytics" button next to each link to get the most up-to-date information about your social media posts' performance.
Here are 5 key business benefits for this Social Media Organic Link Tracker template:
Template Benefits
-
Centralized Campaign Management: Allows marketers to manage multiple social media campaigns across different platforms (YouTube, Instagram, TikTok) from a single dashboard, improving efficiency and organization.
-
Real-Time Performance Tracking: Provides up-to-date analytics on views, likes, comments, and other engagement metrics, enabling quick decision-making and strategy adjustments for ongoing campaigns.
-
Cross-Platform Analytics: Offers a unified view of performance across different social media platforms, allowing for easy comparison and optimization of content strategies across channels.
-
Collaborative Features: Supports adding multiple users to campaigns, facilitating team collaboration and allowing agencies to share campaign data with clients securely.
-
Customizable Reporting: Enables exporting of campaign data to CSV, creation of custom date ranges for analysis, and generation of visual charts, supporting detailed reporting and presentation of results to stakeholders.