17 KiB
17 KiB
Analytics View Service
- Plan
- Create the analytics view service
- Create the analytics view service playbook
- Plan API structure
- Create endpoints for existing reports
- Opens over time
- Clicks over time
- Sales over time (events)
- Sales over time (summary)
- Lifetime Sale Totals
- Sale Currencies
- Pending Broadcasts
- Completed Broadcasts
- Cities, States, and Countries
- Campaign Statistics
- Followups
- New Subscribers Daily
- New Subscribers Weekly
- New Subscribers Monthly
- Subscriber Totals Daily
- Subscriber Totals Weekly
- Subscriber Totals Monthly
- Migrate reports to the Analytics View Service
The Analytics View Service provides a collection of report endpoints. These endpoints handle querying the analytics databases or, in the longer term, exposing efficient materialized data views.
Plan
- Parent ticket
- CCPANEL-11781
Create the analytics view service
- New project using cookie cutter
- Deployed to kubernetes
- Grafana dashboard created
Create the analytics view service playbook
Plan API structure
- Pathing (
/reports/*
)? - Report versioning? (
/reports/$NAME.v$VERSION
)?
Create endpoints for existing reports
- Based on the endpoints provided in the Report API Controller
- Are all of these report endpoints in use?
Opens over time
- Name
- daily-opens
- Parameters
-
- List (default: all lists)
- Date range (default: last 30 days)
- Report API controller endpoints
-
- opens_all_range
- opens_list_range
Clicks over time
- Name
- daily-clicks
- Parameters
-
- List (default: all lists)
- Date range (default: last 30 days)
- Report API controller endpoints
-
- clicks_all_range
- clicks_list_range
Sales over time (events)
- Name
- sale-events
- Parameters
-
- Date range (default: last 30 days)
- Currency (default: USD)
- Report API controller endpoints
-
- sales_tracked_events
Sales over time (summary)
- Name
- daily-sales
- Parameters
-
- Date range (default: last 60 days)
- Currency (default: USD)
Lifetime Sale Totals
- Name
- sale-totals
- Parameters
-
- Currency (default: USD)
- Report API controller endpoints
-
- sales_tracked_total
Sale Currencies
- Name
- sale-currencies
- Parameters
-
- Date range (default: last 60 days)
- Report API controller endpoints
-
- sales_tracked_currencies
Pending Broadcasts
- Name
- pending-broadcasts
- Parameters
-
- List (default: all lists)
- Report API controller endpoints
-
- broadcasts_pending
Completed Broadcasts
- Name
- completed-broadcasts
- Parameters
-
- List (default: all lists)
- Report API controller endpoints
-
- broadcasts_completed
- broadcasts_completed_all
Cities, States, and Countries
- Name
- subscribers-by-location
- Parameters
-
- List (default: all lists)
- Report API controller endpoints
-
- city_state_countries
Campaign Statistics
Add the campaign start endpoint into analytics-view including
- DynamoDB fixtures
- Dynamo dbhelpers (currently there is no dynamo connectivity in analytics-view)
- CampaignStarted Handler https://gitlab.aweber.io/CP/Services/campaignstats/-/blob/master/campaignstats/handlers.py
- Grafana dashboard updated
- Alerts configured
- Confluence docs updated
Followups
- Name
- followup-totals
- Parameters
-
- List (default: all lists)
- Report API controller endpoints
-
- followups
Uses the freq_mesg
and freq_mesg_stats
tables in AppDB combined with data
from the messages
table in Analytics.
editor_path
is hard-coded in the current report endpoint.
New Subscribers Daily
- Name
- daily-new-subscribers
- Parameters
-
- List (default: all lists)
- Report API controller endpoints
-
- new_subscribers_daily
Uses the public.leads_stats_day
table in AppDB.
New Subscribers Weekly
- Name
- weekly-new-subscribers
- Parameters
-
- List (default: all lists)
- Report API controller endpoints
-
- new_subscribers_weekly
Uses the public.leads_stats_day
table in AppDB.
New Subscribers Monthly
- Name
- monthly-new-subscribers
- Parameters
-
- List (default: all lists)
- Report API controller endpoints
-
- new_subscribers_monthly
Uses the public.leads_stats_day
table in AppDB.
Subscriber Totals Daily
- Name
- subscribers-by-location
- Parameters
-
- List (default: all lists)
- Report API controller endpoints
-
- subscriber_totals_daily
Uses the public.leads_stats_day
table in AppDB.
Subscriber Totals Weekly
- Name
- subscribers-by-location
- Parameters
-
- List (default: all lists)
- Report API controller endpoints
-
- subscriber_totals_weekly
Uses the public.leads_stats_day
table in AppDB.
Subscriber Totals Monthly
- Name
- subscribers-by-location
- Parameters
-
- List (default: all lists)
- Report API controller endpoints
-
- subscriber_totals_monthly
Uses the public.leads_stats_day
table in AppDB.