Topic: Social Site Share statistics?
Is there a way I can know Share statistics, either per image, per gallery or per domain?
Thanks,
Scott
You are not logged in. Please login or register.
Juicebox Support Forum → Juicebox-Pro Support → Social Site Share statistics?
Is there a way I can know Share statistics, either per image, per gallery or per domain?
Thanks,
Scott
You could certainly gather hit data on your gallery's embedding page (by including Google Analytics code on the page).
You could even count hits for individual images (please see this forum thread for a suggestion).
However, if you want to track hits on the social media buttons, things might start to get a little more complicated.
You'd need to first find the internal classes used by Juicebox for the social media buttons. (You can find them in your gallery's 'jbcore/classic/theme.css' file or by inspecting a gallery's web page with your browser's developer tools.)
You'd then need to add click handlers (via JavaScript) for each one you want to track.
When one of the social media buttons is clicked, you'd need to send an event hit to Google Analytics. Check out the Google Analytics Event Tracking help page.
If you want to know which image is being displayed when the social media button is clicked, you can fetch this information using the Juicebox-Pro API (specifically the getImageIndex() method) and you can then send this information to Google Analytics within the 'send' command (perhaps as the eventValue).
Something along the lines of the following might work. Please note that this has not been tested but I hope that it points you in the right direction. Also, please note that this is intended to track clicks on the gallery's social media buttons only. It will not determine whether or not the user goes ahead with the share (they could just cancel the popup window after clicking a social media button) and it will not track any of the user's social media data (for example where the shared link is located). Even if a particular social media platform allows a callback function to be included via their API (which could be used to confirm that a share has been completed), you would not be able to take advantage of this as the code that handles the API calls is buried deep within the 'juicebox.js' JavaScript file which is obfuscated and cannot be modified.
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXX-Y', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
<title>Juicebox-Pro Gallery</title>
<meta charset="utf-8" />
<meta name="viewport" id="jb-viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1, maximum-scale=1, user-scalable=0" />
<style type="text/css">
body {
margin: 0px;
}
</style>
</head>
<body>
<!--START JUICEBOX EMBED-->
<script src="jbcore/juicebox.js"></script>
<script>
var jb = new juicebox({
containerId: "juicebox-container",
shareFacebook: "TRUE",
shareTwitter: "TRUE",
shareGPlus: "TRUE",
sharePinterest: "TRUE",
shareTumblr: "TRUE"
});
jb.onInitComplete = function() {
$('.jb-bb-btn-facebook').click(function() {
var eventValue = jb.getImageIndex();
ga('send', 'event', 'Facebook', 'click', 'gallery', eventValue);
});
$('.jb-bb-btn-twitter').click(function() {
var eventValue = jb.getImageIndex();
ga('send', 'event', 'Twitter', 'click', 'gallery', eventValue);
});
$('.jb-bb-btn-gplus').click(function() {
var eventValue = jb.getImageIndex();
ga('send', 'event', 'Google+', 'click', 'gallery', eventValue);
});
$('.jb-bb-btn-printerest').click(function() {
var eventValue = jb.getImageIndex();
ga('send', 'event', 'Pinterest', 'click', 'gallery', eventValue);
});
$('.jb-bb-btn-tumblr').click(function() {
var eventValue = jb.getImageIndex();
ga('send', 'event', 'Tumblr', 'click', 'gallery', eventValue);
});
};
</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->
</body>
</html>
Thanks, this bootstraps the effort. Not a setting to make then receive reports by email, but these are things I will endavor to learn, Google Analytics especially.
Not a setting to make then receive reports by email...
That's correct. Unfortunately, there is no such functionality built-in to Juicebox-Pro.
However, I hope my suggestion is at least somewhat helpful.
Juicebox Support Forum → Juicebox-Pro Support → Social Site Share statistics?
Powered by PunBB, supported by Informer Technologies, Inc.