What it is
When a MAM app opens from a deep link (e.g. a Branch link), it posts the link’s payload to the site: subaction mam_deep_link_data through MAM Main’s AJAX dispatcher, with the device id as pid and the payload as a JSON request body.
The plugin stores each payload key/value against the device — one row per pid + key in wp_mam_deep_link_data, replaced on resubmission (keys capped at 100 chars, values at 500; non-scalar values are JSON-encoded; rows without a pid are not stored). MAM In-App Purchase Manager later reads these rows (e.g. venue_code) to attribute purchases.
This endpoint fires before any user exists on the device (first launch), so it cannot require an authenticated user.
Filters
mam_universal_link_accept_deep_link_data — gate
add_filter( 'mam_universal_link_accept_deep_link_data', '__return_false' ); // lock the endpoint
Return false to reject the request with a 403 {status: "error"}. Default true.
mam_universal_link_deep_link_data — transform / react
apply_filters( 'mam_universal_link_deep_link_data', array $postData );
Receives the decoded JSON payload before storage; return it (modified or not). Runs even when storage is skipped, so it doubles as a notification point. The TSL previewer (mam-account-manager) uses it to react to $postData['id'] account codes.
mam_universal_link_deep_link_data_reply — answer
apply_filters( 'mam_universal_link_deep_link_data_reply', array $data, array $postData );
Filters the JSON response (default {status: "success"}) so you can hand data back to the app that just opened.
Example — react to a campaign payload
add_filter( 'mam_universal_link_deep_link_data', function ( $postData ) {
if ( ! empty( $postData['campaign'] ) ) {
do_action( 'my_plugin_app_opened_from_campaign', sanitize_text_field( $postData['campaign'] ) );
}
return $postData;
} );
Related articles
- Set up Branch.io deep links
Metadata
| Field | Value |
|---|---|
| Article type | Hook Reference |
| Plugin slug | mam-universal-link-manager |
| Applies to plugin version | 26.24.1+ |
| Category | Extending MAM Suite |
| Hook type | app subaction + 3 filters |
| Audience | PHP developer |
| Last verified | 2026-06-12 |
