Third-Party Analytics & Marketing APIs
Relevant source files
The following files were used as context for generating this wiki page:
The BankChase platform integrates specialized third-party analytics and marketing modules to extend the core banking functionality into business intelligence and advertising management. These integrations allow business users to manage ad campaigns, track marketing KPIs, and analyze external operational data directly within the banking interface.
The scope of these integrations currently covers TikTok for marketing management and Divvy for bike-sharing operational analytics. These modules utilize dedicated data processing layers and specialized UI wizards to facilitate complex workflows such as multi-step ad campaign creation and real-time data visualization.
Sources: DOCUMENTATION_INDEX.md:95-100, SYSTEM_STATUS_REPORT.md:88-93
TikTok Ads Management
The TikTok Ads integration provides a comprehensive campaign management system. It allows users to create advertising campaigns, manage ad groups, and monitor performance metrics through a centralized dashboard.
Campaign Creation Workflow
The system utilizes a 5-step wizard to guide users through the advertising setup. This workflow ensures that all necessary metadata—ranging from objective selection to creative assets—is captured before submission.
The diagram above represents the logical flow implemented in the TikTok campaign builder.
Sources: PROJECT_COMPLETION_SUMMARY.md, app/tiktok-ads/page.tsx
Marketing Data Structures
The marketing module processes specific data models to represent advertising entities.
| Entity | Fields | Description |
|---|---|---|
| Campaign | ID, Name, Status, Budget | The top-level advertising container. |
| Ad Group | ID, Target, Placement, Bid | Configuration for ad delivery and targeting. |
| Creative | Type, URL, Text, CTA | The actual media and copy displayed to users. |
Sources: lib/tiktok-data.ts, app/tiktok-ads/page.tsx
Divvy Analytics Dashboard
The Divvy integration focuses on operational analytics, specifically for bike-sharing data. This system processes large datasets to generate actionable insights regarding trip volumes, station distribution, and usage patterns.
Data Processing Architecture
The analytics engine transforms raw operational data into interactive views. The following sequence illustrates the data retrieval and visualization process:
Sources: lib/divvy-data.ts, SYSTEM_STATUS_REPORT.md:91
Analytical View Types
The system provides five distinct interactive views for data analysis:
- Trip Volume: Analysis of total trips over time.
- Station Distribution: Geographic mapping of bike availability.
- Usage Trends: Peak hour and demographic analysis.
- Operational Efficiency: Metrics on bike maintenance and rotation.
- User Metrics: Subscriber vs. casual rider breakdowns.
Sources: lib/divvy-data.ts, PROJECT_COMPLETION_SUMMARY.md
API Implementation Details
The integration is supported by a series of backend routes that handle communication with third-party servers. The platform manages over 30 routes dedicated to third-party integrations.
Endpoint Categories
The API routes are organized by provider to ensure modularity and security:
| Route Namespace | Primary Function |
|---|---|
/api/tiktok/* | Ad campaign CRUD and KPI retrieval. |
/api/divvy/* | Operational metric fetching and aggregation. |
/api/plaid/* | (Related) Financial data syncing for budget tracking. |
Sources: DOCUMENTATION_INDEX.md:129-134, SYSTEM_STATUS_REPORT.md:129-133
Specialized Logic Example
The tiktok-data.ts library implements logic for calculating ad performance, while divvy-data.ts handles complex time-series aggregations for bike trip analysis.
// lib/tiktok-data.ts logic summary
export const calculateCTR = (clicks: number, impressions: number): number => {
if (impressions === 0) return 0;
return (clicks / impressions) * 100;
};
// lib/divvy-data.ts logic summary
export const aggregateTripsByHour = (trips: any[]) => {
// Logic to group trip start times by hour for usage trend charts
};
Sources: lib/tiktok-data.ts, lib/divvy-data.ts
Conclusion
The Third-Party Analytics & Marketing APIs provide the BankChase platform with business intelligence capabilities that go beyond standard consumer banking. By integrating marketing campaign management via TikTok and operational analytics via Divvy, the system serves as a unified command center for business users, combining financial oversight with marketing and operational data.
Sources: SYSTEM_STATUS_REPORT.md:88-93, DOCUMENTATION_INDEX.md:98-100