PageSourceSearch

https://www.lawsociety.org.uk/Assets/js/tls/link-goal-tracking.js

js lawsociety.org.uk collected 2026-09-24 08:40:09 UTC 1,142 bytes, 32 lines download raw bytes

1jQuery(document).ready(function () {    function navigateToUrl(href, target) {
2        if (target === "_blank") {
3            window.open(href, "_blank");
4        } else {
5            window.location.href = href;
6        }
7    }
8
9    $("[data-link-goalid]").find("a").click(function (e) {
10        e.preventDefault();
11        var goalId = $(this).closest("[data-link-goalid]").attr("data-link-goalid");
12        var href = $(this).attr("href");
13        var target = $(this).attr("target");
14
15        if (goalId) {
16            console.log("Goal Id set: " + goalId + " - track goal");
17            var goalUrl = "/-/media/images/goals/goal-track-pixel.png?sc_trk=" + goalId;
18            $.ajax({
19                type: "GET",
20                url: goalUrl,
21                success: function (data) {
22                    console.log("Goal tracked: redirect to url - " + href);
23                    navigateToUrl(href, target);
24                }
25            });
26        }
27        else {
28            console.log("No Goal Id set: redirect to url - " + href);
29            navigateToUrl(href, target);
30        }
31    });
32});

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.