HEX
Server: Apache
System: Linux webd003.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: slyfwmm (169339)
PHP: 8.1.34
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/slyfwmm/dallavitae/OLD_WP/wp-content/themes/layerswp/core/assets/intercom.js
/**
 * Admin Intercom JS file
 *
 * This file contains functions to work with Intercom
 *
 * @package Layers
 * @since Layers 1.2.6
 *
 * 1 - trackEvent jQuery function
 * 2 - Fringe Events
 *
 */

jQuery(function ( $ ) {

	/**
	* 1 - trackEvent jQuery function
	*
	* Used to trigger an event and send it to Intercom with (string) event_name & extra (object) meta_data
	*/

	$.fn.layers_intercom_event = function( event_name, meta_data ) {

		if( undefined == meta_data ) meta_data = {};

		var tracked_event = Intercom( 'trackEvent', event_name, meta_data );
	};

	/**
	* 2 - Fringe Events
	*
	* Used to trigger events that aren't localized to a specific function
	*/

	$(document).on( 'click', 'a[href^="http://bit.ly/"]', function(){
		
		$(document).layers_intercom_event( 'clicked bitly link', {
			"Link Title": $(this).text(),
			"Link URL": $(this).attr( 'href' ),
		});
	});

	$(document).on( 'click', 'a[href^="http://themeforest.net/"], a[href^="http://codecanyon.net/"]', function(){
		
		$(document).layers_intercom_event( 'clicked envato link', {
			"Item": $(this).attr( 'data-item' ),
			"Price": $(this).attr( 'data-price' ),
			"Item URL": $(this).attr( 'href' ),
		});
	});

	$(document).on( 'click', '.layers-get-updater', function(){

		$(document).layers_intercom_event( 'clicked layers updater link' );
	});
	
});