coresocial_tracking_recorded

Developer Knowledge Level

This content is intended for WordPress developers, and it may require coding knowledge of WordPress, PHP, and JavaScript. Code examples provided here may contain errors or needs some additional coding. Make sure to test the code before using it on a live website!

PHP
Definition
do_action( "coresocial_tracking_recorded", $input, $id, $logging );
Arguments
Name
Type
Description
$input
array
Interaction context: action, network, module, item, item_id, url, logged, user_id; likes also include user_hash. AJAX inputs can contain a signature.
$id
int
Internal coreSocial items-table row ID, not a WordPress post or term ID.
$logging
bool
Whether an individual activity row was also stored.

Fires after a new aggregate count is written, including when activity logging is disabled. Duplicate likes, failed item or lock acquisition, failed log inserts, and failed count writes do not emit it. Covers share, show, Explore, and Like. It does not confirm external sharing. The AJAX count cache has not yet been refreshed. Like listeners run before lock release. Keep listeners lightweight and avoid logging private input. Activity and count writes are not an atomic transaction.

Example

add_action( 'coresocial_tracking_recorded', function ( $input, $id, $logging ) {
    // Invalidate your integration's cached aggregate for this item.
    wp_cache_delete( 'item-' . $id, 'my-social-summary' );
}, 10, 3 );
Rate this reference
0
0
3

You are not allowed to rate this post.

Leave a Comment

0
0
0
0
0
0
0
0
0