PageSourceSearch

https://www.pinglighting.com/modules/facebookconversiontrackingplus/views/js/events.js

js pinglighting.com collected 2026-10-06 18:27:00 UTC 2,186 bytes, 56 lines download raw bytes

1/**
2 * Facebook Conversion Pixel Tracking Plus
3 *
4 * NOTICE OF LICENSE
5 *
6 * @author    Pol Rué
7 * @copyright Smart Modules 2014
8 * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
9 * @category Marketing & Advertising
10 * Registered Trademark & Property of smart-modules.com
11 *
12 * ***************************************************
13 * *     Facebook Conversion Trackcing Pixel Plus    *
14 * *          http://www.smart-modules.com           *
15 * ***************************************************
16 */
17
18function ppTrackEvent(e, d, e_id) {
19    let t = '';
20    let ev = ['PageView', 'ViewContent', 'AddToCart', 'Purchase', 'InitiateCheckout', 'CompleteRegistration', 'AddPaymentInfo', 'Search', 'AddToWishlist', 'Contact'];
21    let cev = ['ViewCategory', 'CustomizeProduct', 'GuestRegistration', 'ViewCMS', 'Discount', 'Newletter', 'Pagetime', 'Time30s', 'Time60s', 'Time90s', 'Time+120s', 'PagesViewed5', 'PagesViewed10', 'PagesViewed15', 'PagesViewedMore20'];
22    if (typeof d === 'object' && (Object.keys(d).length > 0 || e === 'PageView') && e_id != '') {
23        if (ev.includes(e)) {
24            t = 'track';
25        }
26        if (cev.includes(e)) {
27            t = 'trackCustom';
28        }
29        if (t !== '') {
30            if (typeof single_event_tracking !== 'undefined' && single_event_tracking) {
31                for (let pid of pixel_ids.split(',')) {
32                    fbq(t.replace('track', 'trackSingle'), pid, e, d, {eventID: e_id});
33                }
34            } else {
35                fbq(t, e, d, {eventID: e_id});
36            }
37        } else {
38            console.log('Trying to track a non registered event ' + e);
39        }
40    }
41}
42
43document.addEventListener('DOMContentLoaded', function() {
44    /*Deferred Loading - Condition*/
45    if (typeof deferred_loading !== 'undefined' && deferred_loading) {
46        document.addEventListener('readystatechange', (event) => {
47            if (document.readyState == "complete") {
48                setTimeout(function () {
49                    facebookpixelinit(20);
50                }, deferred_seconds);
51            }
52        });
53    } else {
54        facebookpixelinit(20);
55    }
56});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.