Skip to content

Share Count

The Share Count function tracks how many times each post has been shared through Voxel’s share menu or the Toolkit’s Share Menu function. Display share counts using dynamic tags for social proof and engagement metrics.

Overview

When visitors click share buttons on your listings, this function tracks each share event. You can display total share counts or break them down by network (Facebook, WhatsApp, Twitter, etc.). Perfect for showing social proof on popular listings.

Key Features

  • Track total share count per post
  • Track shares by network (Facebook, Twitter, WhatsApp, etc.)
  • Dynamic tags for use in templates
  • Works with Voxel’s built-in share menu
  • Works with Toolkit’s Share Menu function
  • Supports 18+ share networks
  • PHP API for custom integrations

Setup Instructions

Enable the Function

  1. Navigate to Voxel Toolkit → Functions in your WordPress admin
  2. Find Share Count in the list
  3. Toggle the switch to enable the function
  4. Click Save Changes

Share tracking will now be active. Every time a visitor clicks a share button, the count will increment automatically.

Dynamic Tags

Use these dynamic tags in your Voxel templates to display share counts:

Total Share Count

Display the total number of times a post has been shared across all networks:

@post(share_count)
@post(share_count.total)

Both tags return the same value – the total share count for the post.

Network-Specific Counts

Display share counts for specific social networks:

@post(share_count.facebook)    - Facebook shares
@post(share_count.twitter)     - X/Twitter shares
@post(share_count.linkedin)    - LinkedIn shares
@post(share_count.whatsapp)    - WhatsApp shares
@post(share_count.telegram)    - Telegram shares
@post(share_count.pinterest)   - Pinterest shares
@post(share_count.reddit)      - Reddit shares
@post(share_count.tumblr)      - Tumblr shares
@post(share_count.threads)     - Threads shares
@post(share_count.bluesky)     - Bluesky shares
@post(share_count.sms)         - SMS shares
@post(share_count.line)        - Line shares
@post(share_count.viber)       - Viber shares
@post(share_count.snapchat)    - Snapchat shares
@post(share_count.kakaotalk)   - KakaoTalk shares
@post(share_count.email)       - Email shares
@post(share_count.copy-link)   - Copy Link clicks
@post(share_count.native-share) - Native Share (mobile) clicks

Use Cases

Conditional Display

Only show share count when it’s greater than zero using Voxel’s conditional visibility.

Combine with post queries to show most-shared listings by storing the count in post meta.

How It Works

Tracking Flow

  1. Visitor clicks a share button in Voxel’s share menu
  2. JavaScript detects the click and identifies the network
  3. AJAX request is sent with post ID and network name
  4. Server increments both total count and network-specific count
  5. Counts are stored in post meta for fast retrieval

Supported Share Menus

The function tracks shares from:

  • Voxel’s built-in share menu – Native share popup
  • Toolkit’s Share Menu function – Extended share options

Available Networks

The following networks are tracked and have dedicated dynamic tags:

NetworkDynamic TagMeta Key
Facebook@post(share_count.facebook)_vt_share_count_facebook
X/Twitter@post(share_count.twitter)_vt_share_count_twitter
LinkedIn@post(share_count.linkedin)_vt_share_count_linkedin
WhatsApp@post(share_count.whatsapp)_vt_share_count_whatsapp
Telegram@post(share_count.telegram)_vt_share_count_telegram
Pinterest@post(share_count.pinterest)_vt_share_count_pinterest
Reddit@post(share_count.reddit)_vt_share_count_reddit
Tumblr@post(share_count.tumblr)_vt_share_count_tumblr
Threads@post(share_count.threads)_vt_share_count_threads
Bluesky@post(share_count.bluesky)_vt_share_count_bluesky
SMS@post(share_count.sms)_vt_share_count_sms
Line@post(share_count.line)_vt_share_count_line
Viber@post(share_count.viber)_vt_share_count_viber
Snapchat@post(share_count.snapchat)_vt_share_count_snapchat
KakaoTalk@post(share_count.kakaotalk)_vt_share_count_kakaotalk
Email@post(share_count.email)_vt_share_count_email
Copy Link@post(share_count.copy-link)_vt_share_count_copy-link
Native Share@post(share_count.native-share)_vt_share_count_native-share

Troubleshooting

Shares Not Being Tracked

  • Verify the Share Count function is enabled in Toolkit Settings
  • Check browser console for JavaScript errors
  • Ensure the share menu is from Voxel or Toolkit (custom share buttons won’t track)
  • Clear any caching plugins and try again

Dynamic Tag Returns 0

  • The post may not have been shared yet
  • Verify you’re using the tag in a post context (not outside a loop)
  • Check that the function was enabled before shares occurred

Network Count Not Matching Total

  • This is normal – total is all shares, network counts are specific
  • Some shares may be from untracked or custom networks
  • Network-specific tracking was added in v1.5.7 – older shares only have totals

Built by Code Wattz.