Facebook Like and Unlike Events Tracked for Ezoneclub Page
FacebookS platform is now configured to monitor user interactions with the “like” and “unlike” buttons specifically for the Ezoneclub page. This functionality is enabled through custom JavaScript code that leverages Facebook’s SDK.
The implementation includes two callback functions: `page_like_callback` and `page_unlike_callback`. The `page_like_callback` is triggered when a user likes the Ezoneclub page. Upon detection, it pushes an event to the data layer named ‘uleventtrigger’, with nested details categorizing the action as ‘Facebook_like’, the action as ‘Click’, and the label as ‘like’. Similarly, the `page_unlike_callback` is activated when a user unlikes the page. This function also pushes an event to the data layer, but with the label set to ‘unlike’.
The Facebook SDK is initialized with the application ID ‘134643510061773’ and set to use version ‘v2.9’. The code also includes a call to `FB.appevents.logPageView()`, which is part of Facebook’s App Events functionality for tracking app usage and engagement. The script ensures that the Facebook SDK is loaded only once by checking for the existence of the ‘facebook-jssdk’ element.