PageSourceSearch

https://www.smart-development.ua/wp-content/themes/hub/assets/js/custom-utms-data.js?ver=7.1.3

js smart-development.ua collected 2026-10-07 19:34:05 UTC 1,273 bytes, 54 lines download raw bytes

1setTimeout(function (){
2    const url = new URL(location.href);
3    const params = new URLSearchParams(url);
4    url.searchParams.forEach(function (val, key) {
5        if(val !== ''){
6            localStorage.setItem(key.toLowerCase(), val);
7        }
8    });
9}, 1000)
10
11
12setTimeout(function (){
13    console.log('init utms insert to forms')
14    createHiddenFieldsInForm()
15}, 5000)
16
17function createHiddenFieldsInForm(){
18    let forms = document.querySelectorAll('form')
19
20    let utms = [
21    'utm_source',
22    'utm_medium',
23    'utm_term',
24    'utm_content',
25    'utm_campaign',
26    'utm_id',
27    'gclid',
28    'fbpixel',
29    ]
30
31    let utmsObject = {}
32
33    utms.forEach((item) => {
34        let localStorageData = localStorage.getItem(item)
35        if(localStorageData !== null){
36            utmsObject[item] = localStorageData
37        }
38    })
39
40    forms.forEach((form) => {
41        if(form.id !== 'adminbarsearch'){
42            let neededField = form.querySelector('#form-field-utms')
43
44            if(neededField !== null && neededField !== undefined){
45                neededField.value = JSON.stringify(utmsObject)
46            } else{
47                console.log('field not exist')
48                console.log(form)
49            }
50        }
51    })
52
53    console.log(forms)
54}

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.