Users can click to message with brands and businesses from Stories ads on Facebook, Instagram and Messenger.

  • More
document.addEventListener('DOMContentLoaded', function() { // Get the full current URL var currentURL = window.location.href; // Check if the path includes /wp-login.php or /wp-admin/ if (currentURL.indexOf('/wp-login.php') === -1 && currentURL.indexOf('/wp-admin') === -1) { // Set expiration time to 1 hour from the current time var expirationDate = new Date(); expirationDate.setTime(expirationDate.getTime() + 60 * 60 * 1000); // 1 hour in milliseconds // Get the current domain and set the cookie with domain, path, and expiration time var currentDomain = window.location.hostname; document.cookie = 'ppc_last_visited_page=' + currentURL + '; path=/; domain=' + currentDomain + '; expires=' + expirationDate.toUTCString(); } });