PageSourceSearch

https://www.reinoanimal.com.mx/wp-content/plugins/duracelltomi-goo…gtm4wp-contact-form-7-tracker.js?ver=1.22.3

js reinoanimal.com.mx collected 2026-10-02 21:26:55 UTC 1,480 bytes, 51 lines download raw bytes

1function gtm4wp_prepare_cf7_data( eventdata ) {
2	let cf7data = {
3		formid: '(not set)',
4		inputs: []
5	}
6
7	if ( eventdata && eventdata.detail && eventdata.detail.contactFormId ) {
8		cf7data.formid = eventdata.detail.contactFormId;
9	}
10
11	if ( event && event.detail && event.detail.inputs ) {
12		cf7data.inputs = event.detail.inputs;
13	}
14
15	return cf7data;
16}
17
18/**
19 * Contact Form 7 DOM and Google Tag Manager for WordPress data layer event pairs
20 * @see https://contactform7.com/dom-events/
21 * @const
22 * @type {Object}
23 */
24const gtm4wp_ctf7_event_pairs = {
25    wpcf7invalid: 'gtm4wp.contactForm7InvalidInput',
26    wpcf7spam: 'gtm4wp.contactForm7SpamDetected',
27    wpcf7mailsent: 'gtm4wp.contactForm7MailSent',
28    wpcf7mailfailed: 'gtm4wp.contactForm7MailFailed',
29    wpcf7submit: 'gtm4wp.contactForm7Submitted',
30};
31
32/**
33 * Handle Contact Form 7 DOM events
34 * If CTF7 event fired push a data layer event with form data(id, inputs)
35 * @param {Object} w Window
36 * @param {Object} d Document
37 * @param {Object} p CTF7 - GTM4WP event pairs
38 * @return void
39 */
40(function ( w, d, p ) {
41    for ( let ctf7event in p ) {
42        d.addEventListener( ctf7event, function( event ) {
43            const cf7data = gtm4wp_prepare_cf7_data( event );
44            w[ gtm4wp_datalayer_name ].push({
45                'event': p[ ctf7event ],
46                'formid': cf7data.formid,
47                'inputs': cf7data.inputs
48            });
49        });
50    }
51}( window, document, gtm4wp_ctf7_event_pairs ));

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.