Callback for Monarch by Logic Hop adds a Javascript callback to the Monarch Social Sharing Plugin. Simply install the plugin and a callback is automat
Author: | Logic Hop (profile at wordpress.org) |
WordPress version required: | 4.0.1 |
WordPress version tested: | 4.6.18 |
Plugin version: | 1.0.0 |
Added to WordPress repository: | 28-11-2016 |
Last updated: | 01-12-2016
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 0 |
Rated by: | 0 |
Plugin URI: | https://logichop.com/resources/callback-for-m... |
Total downloads: | 2 356 |
Active installs: | 30+ |
Click to start download |
Callback for Monarch by Logic Hop adds a Javascript callback to the Monarch Social Sharing Plugin. Simply install the plugin and a callback is automatically available when any Monarch social share or follow button is clicked.
Now you can trigger custom events when a social share or follow button has been clicked. The callback is available for use in your pages, posts or Javascript files – Simply add the following code:
<script>
function logichop_monarch_callback (stats) {
console.log( 'logichop_monarch_callback' );
console.log( stats );
// Your Javascript code here
}
</script>
When a Monarch event is triggered the stats parameter is sent to the logichop_monarch_callback function with the following values:
- action
- The action performed. Typically ‘share’, ‘follow’ or ‘media’.
- network
- The network for which the action was triggered. ‘Facebook’, ‘Twitter’, etc.
- media_url
- Image URL when media is shared.
- post_id
- ID of the page or post where the button was triggered.
Interested in Content Personalization for WordPress? See how we’re using Monarch with Logic Hop – Check out our tutorial at: https://logichop.com/track-social-shares/
FAQ
ChangeLog