This runbook covers operational validation for the multi-touch attribution stack (journey capture, hourly rebuilds, and reporting). It is intended for release QA, on-call investigations, and maintenance of attribution data pipelines.
sql
SHOW TABLES LIKE '202\\_%attribution%';
SHOW CREATE TABLE 202_conversion_touchpoints; -- confirms conv_id/click_id indexes
Required structures:202_conversion_touchpoints with conv_id, click_id, ordered position, and secondary indexes for conversion and click lookups.【F:202-config/functions-install.php†L224-L235】202_attribution_models, 202_attribution_settings, 202_attribution_snapshots, 202_attribution_touchpoints, 202_attribution_audit) for model metadata, defaults, hourly aggregates, credits, and audit history.【F:202-config/functions-install.php†L237-L316】202_conversion_logs still tracks the base conversion row referenced by journeys, including click_id, conv_time, and soft-delete flag for purges.【F:202-config/functions-install.php†L203-L221】is_active and is_default toggles in 202_attribution_models; ensure only one default per user/scope by reviewing 202_attribution_settings mappings.【F:202-config/functions-install.php†L237-L301】PATCH /api/v2/attribution/models/{modelId} to update is_active, weighting config, or naming.POST /api/v2/attribution/models to spin up test models; mark defaults via is_default in the payload.【F:documentation/api/00-api-integrations.md†L27-L32】202_attribution_audit for the recorded action and actor metadata.【F:202-config/functions-install.php†L304-L314】sql
SELECT * FROM 202_conversion_touchpoints WHERE conv_id = ? ORDER BY position;
SELECT click_id, conv_time, click_time FROM 202_conversion_logs WHERE conv_id = ?;
Ensure positions are sequential from 0 and the converting click appears exactly once.【F:documentation/features/multi-touch-journeys.md†L7-L26】【F:202-config/Attribution/Repository/Mysql/ConversionJourneyRepository.php†L17-L168】ConversionJourneyRepository::fetchJourneysForConversions; journeys should return chronologically sorted touches with click tie-breaks by click_id.【F:202-config/Attribution/Repository/Mysql/ConversionJourneyRepository.php†L73-L168】attribution_journey_{conv_id} keys, preventing stale payloads from persisting in Memcache(d).【F:202-config/Attribution/Repository/Mysql/ConversionJourneyRepository.php†L61-L220】sql
DELETE FROM 202_conversion_touchpoints WHERE conv_id IN (...);
Subsequent persistence or backfill will repopulate the journey.【F:202-config/Attribution/Repository/Mysql/ConversionJourneyRepository.php†L30-L210】bash
php 202-cronjobs/backfill-conversion-journeys.php --start=<epoch> --end=<epoch> --batch-size=500
php 202-cronjobs/backfill-conversion-journeys.php --user=<user_id> --start=<epoch>
Options support per-user scoping, rolling windows, and adjustable batch sizes; the script paginates through 202_conversion_logs, persists journeys, and reports errors to STDERR.【F:202-cronjobs/backfill-conversion-journeys.php†L18-L118】--start/--end covering the window after purging or modifying models to regenerate hourly aggregates.【F:202-cronjobs/attribution-rebuild.php†L1-L79】Note: If the hourly attribution cron is not configured or fails to run, snapshots and touchpoints will become stale, attribution data will not reflect recent conversions or model changes, and dashboards/BI exports may show outdated or incomplete results. This can lead to inaccurate reporting and missed attribution events. Ensure the cron is scheduled and monitored for successful completion.
cron 15 * * * * /usr/bin/php /path/to/prosper202/202-cronjobs/attribution-rebuild.php >> /var/log/prosper202/attribution-cron.log 2>&1CLI options include--user,--start, and--endfor targeted reruns.【F:documentation/tutorials-and-guides/14-advanced-attribution-engine.md†L26-L40】
After each deployment or incident response, confirm Dashboard → System Checks reports a recent run (202_cronjob_logs.id = 2) and that attribution widgets/charts ingest new data from 202_attribution_snapshots/202_attribution_touchpoints.【F:documentation/tutorials-and-guides/14-advanced-attribution-engine.md†L22-L64】
Validate that marketing dashboards or BI exports consuming snapshots reflect the expected model defaults and totals once the cron run completes.【F:documentation/tutorials-and-guides/14-advanced-attribution-engine.md†L61-L64】
PATCH /api/v2/attribution/models/{modelId} with {"is_active": false} or flip the default to a safe model by setting is_default accordingly. These endpoints respect permissions and provide quick reversions without database access.【F:documentation/api/00-api-integrations.md†L27-L32】conv_id rows from 202_conversion_touchpoints and re-run the backfill script for the impacted window/user. Monitor STDOUT progress and STDERR error summaries.【F:202-config/Attribution/Repository/Mysql/ConversionJourneyRepository.php†L30-L210】【F:202-cronjobs/backfill-conversion-journeys.php†L18-L118】php 202-cronjobs/attribution-rebuild.php --start=<good_start> --end=<good_end>). The script guards against duplicate windows via 202_cronjobs and logs completion status.【F:202-cronjobs/attribution-rebuild.php†L1-L78】202_attribution_audit entries for changes to models/settings and attach both CLI logs to your incident report. Escalate to the Attribution Working Group if discrepancies persist after reruns.【F:202-config/functions-install.php†L304-L314】【F:documentation/tutorials-and-guides/14-advanced-attribution-engine.md†L40-L91】Keep this runbook updated alongside attribution feature releases; revisit schema, cron guidance, and API references whenever the attribution engine evolves.