PageSourceSearch

https://dynasolgroup.com/o/dynasol-theme/js/gtm.js?minifierType=js

js dynasolgroup.com collected 2026-10-04 03:03:58 UTC 2,582 bytes, 81 lines download raw bytes

1/*1750772494000*/
2
3$(document).ready(function(){
4
5    // liferay-forms
6
7    $('form[name^="_com_liferay_dynamic_data_mapping_form_web_portlet_DDMFormPortlet_"]').on('submit', function() {
8        var pageName = getCurrPageForGTM();
9        var acceptCookieGTM = getCookie("Analytical");
10        if (acceptCookieGTM != "") {
11            console.log('liferay-form submit detected! [formName='+$(this).attr('name')+']');
12            var ev = 'ev_form_'+pageName;
13            var evCat = 'form';
14            var evAct = 'f_'+pageName+'_sent';
15            var evLab = 'OK';
16            var evTs = getTimestampForGTM();
17            sendDatalayerForGTM(ev, evCat, evAct, evLab, evTs);
18        } else {
19            console.log('user NOT accepted analytics cookies!');
20        }
21    });
22
23    // newsletter
24
25    $('#form-newsletter').on('submit', function() {
26        var pageName = getCurrPageForGTM();
27        var acceptCookieGTM = getCookie("Analytical");
28		if (acceptCookieGTM != "") {
29            console.log('newsletter submit detected!');
30            var ev = 'ev_newsletter';
31            var evCat = 'newsletter';
32            var evAct = 'f_'+pageName+'_sent';
33            var evLab = 'OK';
34            var evTs = getTimestampForGTM();
35            sendDatalayerForGTM(ev, evCat, evAct, evLab, evTs);
36        } else {
37            console.log('user NOT accepted analytics cookies!');
38        }
39    });
40
41});
42
43function getCurrPageForGTM() {
44    var pageName = '';
45    var currUrl = window.location.href;
46    if (currUrl.indexOf('/') > 0) {
47        pageName = currUrl.substring(currUrl.lastIndexOf('/')+1);
48        if (pageName.indexOf('?') > 0) {
49            pageName = pageName.substring(0, pageName.indexOf('?'));
50        }
51    }
52    if (pageName == '') {
53        pageName = 'home';
54    }
55    return pageName;
56}
57
58function getTimestampForGTM() {
59    var date = new Date();
60    var dateStr =
61        date.getFullYear() +
62        ("00" + (date.getMonth() + 1)).slice(-2) +
63        ("00" + date.getDate()).slice(-2) +
64        ("00" + date.getHours()).slice(-2) +
65        ("00" + date.getMinutes()).slice(-2) +
66        ("00" + date.getSeconds()).slice(-2);
67    return dateStr;
68}
69
70function sendDatalayerForGTM(ev, evCat, evAct, evLab, evTs) {
71    if (dataLayer.length) {
72        console.log('dataLayer.push {ev:'+ev+', evCat:'+evCat+', evAct:'+evAct+', evLab:'+evLab+', evTs:'+evTs+'}');
73        dataLayer.push({
74            'event': ev,
75            'event_category': evCat,
76            'event_action': evAct,
77            'event_label': evLab,
78            'event_ts': evTs
79        });
80    }
81}

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.