20 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
- Use the new analytics view endpoints for the opens over time reports
- Use the new analytics view endpoints for the clicks over time reports
- Use the new analytics view endpoints for the sales over time report
- New subscribers
- Subscriber totals
- Use the new analytics view endpoints for the broadcast totals report
- Use the new analytics view endpoints for the follow-up totals report
- Use the new analytics view endpoints for the location totals report
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.
Migrate reports to the Analytics View Service
READY Use the new analytics view endpoints for the opens over time reports
Update the opens over time report for all lists and the current list to use the new daily opens endpoint in the Analytics View service.
READY Use the new analytics view endpoints for the clicks over time reports
Update the clicks over time report for all lists and the current list to use the new daily clicks endpoint in the Analytics View service.
WAITING Use the new analytics view endpoints for the sales over time report
Update the sales over time report to use the new daily sales endpoint for graph summary data and the sale events endpoint for the sales table.
The sale events endpoint present, but is not yet documented!
DONE New subscribers
DONE Subscriber totals
WAITING Use the new analytics view endpoints for the broadcast totals report
Update the broadcast totals report to use the new completed broadcasts endpoint in the Analytics View service.
The completed broadcasts endpoint is not yet complete.
Use the new analytics view endpoints for the follow-up totals report
Update the followup totals report to use the new followup totals endpoint in the Analytics View service.
Use the new analytics view endpoints for the location totals report
Update the location totals report to use the new subscribers by location endpoint in the Analytics View service.