|
8 | 8 | version, |
9 | 9 | defaultNamespace, |
10 | 10 | sendError, |
11 | | - warn |
| 11 | + warn, |
12 | 12 | ) { |
13 | 13 | try { |
14 | 14 | ///////////////////// |
|
152 | 152 | /** if ignoremetrics **/ |
153 | 153 | // Customers can skip data points |
154 | 154 | var ignoreMetrics = convertCommaSeparatedToArray( |
155 | | - overwriteOptions.ignoreMetrics || attr(scriptElement, "ignore-metrics") |
| 155 | + overwriteOptions.ignoreMetrics || attr(scriptElement, "ignore-metrics"), |
156 | 156 | ); |
157 | 157 | /** endif **/ |
158 | 158 |
|
|
213 | 213 | try { |
214 | 214 | return assign( |
215 | 215 | metadata, |
216 | | - metadataCollectorFunction.call(window, assign(metadata, data)) |
| 216 | + metadataCollectorFunction.call(window, assign(metadata, data)), |
217 | 217 | ); |
218 | 218 | } catch (error) { |
219 | 219 | warnInFunction("metadata", error); |
|
284 | 284 | ignorePage === path || |
285 | 285 | new RegExp( |
286 | 286 | "^" + filterRegex(ignorePage).replace(/\\\*/gi, "(.*)") + "$", |
287 | | - "i" |
| 287 | + "i", |
288 | 288 | ).test(path) |
289 | 289 | ) |
290 | 290 | return trueVar; |
|
374 | 374 | path: loc.pathname, |
375 | 375 | }), |
376 | 376 | undefinedVar, |
377 | | - trueVar |
| 377 | + trueVar, |
378 | 378 | ); |
379 | 379 | }; |
380 | 380 |
|
|
387 | 387 | sendError(event.message); |
388 | 388 | } |
389 | 389 | }, |
390 | | - falseVar |
| 390 | + falseVar, |
391 | 391 | ); |
392 | 392 | /** endif **/ |
393 | 393 |
|
|
438 | 438 | /** if ignorepages **/ |
439 | 439 | // Customers can ignore certain pages |
440 | 440 | var ignorePages = convertCommaSeparatedToArray( |
441 | | - overwriteOptions.ignorePages || attr(scriptElement, "ignore-pages") |
| 441 | + overwriteOptions.ignorePages || attr(scriptElement, "ignore-pages"), |
442 | 442 | ); |
443 | 443 | /** endif **/ |
444 | 444 |
|
445 | 445 | /** if allowparams **/ |
446 | 446 | // Customers can allow params |
447 | 447 | var allowParams = convertCommaSeparatedToArray( |
448 | | - overwriteOptions.allowParams || attr(scriptElement, "allow-params") |
| 448 | + overwriteOptions.allowParams || attr(scriptElement, "allow-params"), |
449 | 449 | ); |
450 | 450 | /** endif **/ |
451 | 451 |
|
452 | 452 | /** if nonuniquehostnames **/ |
453 | 453 | // Customers can allow params |
454 | 454 | var nonUniqueHostnames = convertCommaSeparatedToArray( |
455 | 455 | overwriteOptions.nonUniqueHostnames || |
456 | | - attr(scriptElement, "non-unique-hostnames") |
| 456 | + attr(scriptElement, "non-unique-hostnames"), |
457 | 457 | ); |
458 | 458 | /** endif **/ |
459 | 459 |
|
|
554 | 554 | /** if ignorednt **/ |
555 | 555 | if (!collectDnt && doNotTrack in nav && nav[doNotTrack] == "1") |
556 | 556 | return warn( |
557 | | - notSendingWhen + doNotTrack + " is enabled. See " + docsUrl + "/dnt" |
| 557 | + notSendingWhen + doNotTrack + " is enabled. See " + docsUrl + "/dnt", |
558 | 558 | ); |
559 | 559 | /** else **/ |
560 | 560 | if (doNotTrack in nav && nav[doNotTrack] == "1") |
561 | 561 | return warn( |
562 | | - notSendingWhen + doNotTrack + " is enabled. See " + docsUrl + "/dnt" |
| 562 | + notSendingWhen + doNotTrack + " is enabled. See " + docsUrl + "/dnt", |
563 | 563 | ); |
564 | 564 | /** endif **/ |
565 | 565 |
|
|
574 | 574 | locationHostname + |
575 | 575 | ". See " + |
576 | 576 | docsUrl + |
577 | | - "/overwrite-domain-name" |
| 577 | + "/overwrite-domain-name", |
578 | 578 | ); |
579 | 579 |
|
580 | 580 | ///////////////////// |
|
645 | 645 | hiddenStart = now(); |
646 | 646 | } else msHidden += now() - hiddenStart; |
647 | 647 | }, |
648 | | - falseVar |
| 648 | + falseVar, |
649 | 649 | ); |
650 | 650 | /** endif **/ |
651 | 651 |
|
|
661 | 661 | body[offsetHeight] || 0, |
662 | 662 | documentElement[clientHeight] || 0, |
663 | 663 | documentElement[scrollHeight] || 0, |
664 | | - documentElement[offsetHeight] || 0 |
| 664 | + documentElement[offsetHeight] || 0, |
665 | 665 | ); |
666 | 666 | return Math.min( |
667 | 667 | 100, |
668 | 668 | Math.round( |
669 | 669 | (100 * ((documentElement.scrollTop || 0) + documentClientHeight)) / |
670 | 670 | height / |
671 | | - 5 |
672 | | - ) * 5 |
| 671 | + 5, |
| 672 | + ) * 5, |
673 | 673 | ); |
674 | 674 | } catch (error) { |
675 | 675 | warn(error); |
|
684 | 684 | function () { |
685 | 685 | if (scrolled < position()) scrolled = position(); |
686 | 686 | }, |
687 | | - falseVar |
| 687 | + falseVar, |
688 | 688 | ); |
689 | 689 | }); |
690 | 690 | /** endif **/ |
|
738 | 738 | isPushState, |
739 | 739 | deleteSourceInfo, |
740 | 740 | sameSite, |
741 | | - metadata |
| 741 | + metadata, |
742 | 742 | ) { |
743 | 743 | if (isPushState) sendOnLeave("" + payload.page_id, trueVar); |
744 | 744 | if (collectDataOnLeave) payload.page_id = uuid(); |
|
783 | 783 | page.viewport_height = |
784 | 784 | Math.max( |
785 | 785 | documentElement[clientHeight] || 0, |
786 | | - window.innerHeight || 0 |
| 786 | + window.innerHeight || 0, |
787 | 787 | ) || null; |
788 | 788 | } |
789 | 789 | /** endif **/ |
|
857 | 857 | isPushState, |
858 | 858 | isPushState || userNavigated || !collectMetricByString("r"), // r = referrers |
859 | 859 | sameSite, |
860 | | - metadata |
| 860 | + metadata, |
861 | 861 | ); |
862 | 862 | }; |
863 | 863 |
|
|
924 | 924 | function () { |
925 | 925 | pageview(1); |
926 | 926 | }, |
927 | | - falseVar |
| 927 | + falseVar, |
928 | 928 | ); |
929 | 929 |
|
930 | 930 | addEventListenerFunc( |
931 | 931 | "popstate", |
932 | 932 | function () { |
933 | 933 | pageview(1); |
934 | 934 | }, |
935 | | - falseVar |
| 935 | + falseVar, |
936 | 936 | ); |
937 | 937 | } |
938 | 938 | /** endif **/ |
|
945 | 945 | function () { |
946 | 946 | pageview(1); |
947 | 947 | }, |
948 | | - falseVar |
| 948 | + falseVar, |
949 | 949 | ); |
950 | 950 | } |
951 | 951 | /** endif **/ |
|
992 | 992 | if (validTypes.indexOf(typeof eventOutput) < 0) { |
993 | 993 | warnInFunction( |
994 | 994 | eventFunctionName, |
995 | | - event + " returns no string: " + eventOutput |
| 995 | + event + " returns no string: " + eventOutput, |
996 | 996 | ); |
997 | 997 | return callback(); |
998 | 998 | } |
|
1026 | 1026 | metadata: stringify(metadata), |
1027 | 1027 | /** endif **/ |
1028 | 1028 | }), |
1029 | | - callback |
| 1029 | + callback, |
1030 | 1030 | ); |
1031 | 1031 | } |
1032 | 1032 | }; |
|
1069 | 1069 | "{{baseUrl}}", |
1070 | 1070 | "{{apiUrlPrefix}}", |
1071 | 1071 | "{{scriptName}}", |
1072 | | - "{{namespace}}" |
| 1072 | + "{{namespace}}", |
1073 | 1073 | ); |
0 commit comments