PageSourceSearch

https://www.forestryjournal.co.uk/user/login/?redirect_url=/user/account/

html forestryjournal.co.uk collected 2026-10-02 14:40:17 UTC 123,525 bytes, 3,298 lines download raw bytes

1<!-- standard - CustomHeader-NoAds-Site.html --> <!DOCTYPE html>
2<html lang="en" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#">
3<head>
4    <title>User news from the Forestry Journal</title>
5
6    <meta charset="utf-8">
7    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
8    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
9    <meta name="OMG-Verify-V1" content="4389-366acdfc-5224-4c07-bb70-f74d8fbfc2db" />
10    <meta name="robots" content="max-image-preview:large">
11    <meta name="format-detection" content="telephone=no">
12
13    <style>
14        .mar-leaderboard--top {
15            display: none;
16        }
17    </style>
18    
18<script>
19        window.doNotAdvertise = true;
20    </script>
20
21    	<meta property="fb:pages" content="" />
22	<meta name="title" content="User news from the Forestry Journal"/>
23	<meta name="description" content="User news from the Forestry Journal"/>
24	<meta name="keywords" content=""/>
25
26<script type="application/ld+json">
27    {
28        "@context": "http://schema.org",
29        "@type": "WebPage",
30        "headline": "User | Login Index",
31        "url": "https://www.forestryjournal.co.uk/user/login/?redirect_url=/user/account/"
32    }
33</script>
33
34
35
36
37
38
39
40
41
42    <link id="page_stylesheet_vars" href="/resources/responsive-static/build/mds/css/palette-9-slab-vars.css?r=vjoPdzgg" rel="stylesheet" type="text/css">
43
44    <link href="/resources/responsive-static/build/mds/css/header-footer.css?r=vjoPdzgg" rel="stylesheet" type="text/css">
45
46    <link id="page_stylesheet" href="/resources/responsive-static/build/mds/css/useridentity.css?r=vjoPdzgg" rel="stylesheet" type="text/css">
47
48    <link rel="shortcut icon" href="/resources/images/17396197/" type="image/vnd.microsoft.icon">
49    <link rel="icon" href="/resources/images/17396197/" type="image/vnd.microsoft.icon">
50    
50<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha384-1H217gwSVyLSIfaLxHbE7dRb3v4mYCKbpQvzx0cegeju1MVsGrX5xXxAvs/HgeFs" crossorigin="anonymous"></script>
vendor: 1 bytes, line 50
50
51<script src="https://code.jquery.com/jquery-migrate-3.6.0.js" integrity="sha384-ekzRTCLAU/LqHRBjnphRAxgZZvGdoP+TfkGGsX+tBJpRdM7r2/89ZZNzC/7YTJXX" crossorigin="anonymous"></script>
vendor: 1 bytes, line 51
51
52<script type="text/javascript" src="/resources/shared/responsive-sync/?r=vjoPdzgg"></script>
52
53
54<script type="text/javascript">
55    data_layer_helper.setIsArticle(false);
56    data_layer_helper.setCookieDomain('.forestryjournal.co.uk');
57    data_layer_helper.setModuleType('Newsquest\Modules\UserIdentityModule');
58    data_layer_helper.setLocalInfoFolder('');
59    data_layer_helper.setHomesData('', '', '', 'user');
60    data_layer_helper.setPrimaryDomain('www.forestryjournal.co.uk');
61    data_layer_helper.setPath('/user/');
62    data_layer_helper.setGoogleNetworkCode('154725070');
63    data_layer_helper.setArticleTimestamp('');
64    data_layer_helper.setPathOverride();
65
66
67    var extraTags = [];
68    
69        extraTags.push('user_level_anonymous');
70    
71
72    var data_layer = {
73        environment: {
74            is_test_site: 'no',
75            is_live_site: 'yes',
76            is_paywall_site: 'yes',
77            is_portable_screen: (data_layer_helper.isMobileScreen()) ? 'yes' : 'no',
78            is_desktop_screen: (data_layer_helper.isMobileScreen()) ? 'no' : 'yes',
79            is_mobile_device: data_layer_helper.getMobileDevice(),
80            is_tablet_device: data_layer_helper.getTabletDevice(),
81            server: 'webapp-857f48ddbd-69ttg',
82            platform: 'Martini'
83        },
84        site: {
85            id: '1121',
86            comments_subscriber_only: 'no',
87            viafoura_site_id: '00000000-0000-4000-8000-c97188d659f1',
88            comments_use_viafoura: 'yes',
89            centre_id: '14',
90            centre_name: '',
91            country: 'Scotland',
92            name: 'Forestry Journal',
93            name_with_prefix_capitalised_possessive: 'The Forestry Journal\'s',
94            name_with_prefix_lower_possessive: 'the Forestry Journal\'s',
95            domain: 'www.forestryjournal.co.uk',
96            editor_name: 'John McNee',
97            onboarding_enabled: 'no',
98            onboarding_flow_id: 'onboarding_disabled',
99            allowing_mr_replacement: '',
100            cookie_domain: '.forestryjournal.co.uk',
101            uses_cmp: 'yes',
102            short_domain: 'forestryjournal',
103            using_piano_id: 'yes',
104            enable_skimlinks: 'yes',
105            skimlinks_domain_id: '1680363',
106            disable_newsletters: 'no',
107            is_archant_site: 'no',
108            shc_merchant_name: '',
109            piano_application_group: 'Bespoke',
110            piano_site_name: '',
111            piano_site_name_possessive: 'Forestry Journal\'s',
112            piano_site_name_with_prefix_lower: 'the Forestry Journal',
113            piano_site_name_with_prefix_capitalised: 'The Forestry Journal',
114            piano_site_name_with_prefix_capitalised_possessive: 'The Forestry Journal\'s',
115            piano_site_name_with_prefix_lower_possessive: 'the Forestry Journal\'s',
116            piano_location_primary: '',
117            piano_location_primary_possessive: '',
118            piano_location_county: '',
119            piano_location_county_possessive: '',
120            piano_primary_sports_team: '',
121            piano_primary_sports_team_nickname: '',
122            piano_primary_sports_team_sport: '',
123            piano_primary_sports_team_possessive: '',
124            piano_primary_sports_team_nickname_possessive: '',
125            piano_self_service_cancellation_setting: 'None',
126            has_app: 'yes',
127            app_provider: 'pagesuite',
128            app_platform: 'pagesuite-cosmo',
129            app_store_url_ios: 'https://apps.apple.com/app/forestry-journal/id1234235397',
130            app_store_url_google_play: 'https://play.google.com/store/apps/details?id=com.pagesuite.droid.forestryjournal',
131            cloudflare_turnstyle_site_key: '',
132        },
133        page: {
134            module: 'Newsquest\Modules\UserIdentityModule',
135            referrer: data_layer_helper.getReferrerHostName(),
136            name: '(www) ' + data_layer_helper.getOmniturePath(),
137            title: document.title,
138            path: data_layer_helper.getOmniturePath(),
139            section: data_layer_helper.getPathFragment(0),
140            subsection: data_layer_helper.getPathFragment(1),
141            subsection_2: data_layer_helper.getPathFragment(2),
142            subsection_3: data_layer_helper.getPathFragment(3),
143            reference: qs.get('ref'),
144            layout: '',
145            ad_timing: data_layer_helper.getCookie('adtiming'),
146            template_namespace: 'standard',
147            template: '',
148            colour_scheme: '',
149            layout_template: '',
150            mds_font: 'slab',
151            user_used_app_last_24hours: '',
152            user_used_app_last_7days: '',
153            user_used_app_last_14days: '',
154            mds_colour_palette: 'palette-9',
155            feature_block_a_enabled: ($('[data-name="Feature Article Block A"]').length > 0) ? 'yes' : 'no',
156            feature_block_b_variant: (typeof $('[data-name="Feature Article Block B"]').data('variant') === 'undefined') ? '' : $('[data-name="Feature Article Block B"]').data('variant'),
157            is_article_list: 'no',
158            error_404: '',
159            top_stories_article_count: '',
160            interstitial_dedupe_top_stories: '',
161            interstitial_desktop_height: '',
162            interstitial_mobile_height: '',
163            interstitial_tablet_height: '',
164            interstitial_piano_module_id: '',
165            interstitial_using_recommendations: '',
166            interstitial_recommendation_header: '',
167            interstitial_article_count: '',
168            news_stories_article_count: '',
169            site_newspaper_archive_enabled: 'no',
170            site_newspaper_archive_number_of_pages: '',
171            site_newspaper_archive_start_year: 0,
172            article_originates_from_this_site: '',
173            article_originates_from_site: '',
174            article_originates_from_url: ''
175        },
176        user: {
177            id: '',
178            first_name: '',
179            advertising_experience: 'Ad-Full',
180            is_privacy_plus: 'no',
181            is_alist: 'no',
182            level: data_layer_helper.getCookie('nq_ul'),
183            seen_cmp: (data_layer_helper.getCookie('_sp_enable_dfp_personalized_ads') === 'true' || data_layer_helper.getCookie('_sp_enable_dfp_personalized_ads') === 'false') ? 'yes' : 'no',
184            given_consent: (data_layer_helper.getCookie('_sp_enable_dfp_personalized_ads') === 'true') ? 'yes' : 'no',
185            consent_string: data_layer_helper.getConsentString(),
186            type: 'anonymous',
187            parsely_type: 'Anonymous',
188            chartbeat_type: 'anon',
189            type_as_int: '1',
190            is_logged_in: 'no',
191            is_admin: 'no',
192            is_internal_admin: '',
193            has_full_admin_link_permissions: '',
194            has_registered: (data_layer_helper.getCookie('nqr') !== null) ? 'yes' : 'no',
195            comments_verified: '',
196            comments_verified_date: '',
197            user_email_is_verified: '',
198            user_email_is_verified_date: '',
199            mobile_number_is_verified: '',
200            mobile_number_is_verified_date: '',
201            user_needs_email_verification: '',
202            user_needs_mobile_verification: '',
203            user_too_many_requests: '',
204            age_decade:  '0' ,
205            gender:  'u' ,
206            is_known: data_layer_helper.getCookie('__siren') ? 'yes' : 'no',
207            hash: '',
208            lr_hash_1: '',
209            lr_hash_2: '',
210            lr_hash_3: '',
211            gender:  'u' ,
212            user_decade:  '0' ,
213            subscription_plan: '',
214            subscription_tier: 'null',
215            subscription_plan_and_frequency: ' - ',
216            commented: (data_layer_helper.isArticle() && qs.get('action') === 'success') ? 'yes' : 'no',
217            time_since_last_visit: 'not implemented (maybe drop)',
218            device: data_layer_helper.getDevice(),
219            using_ad_blocker_sourcepoint: data_layer_helper.getSourcepointAdbockStatus(),
220            admin_user_name: '',
221            is_admin_internal: '',
222            is_admin_external: '',
223            card_expired: '',
224            card_will_expire: '',
225            expires_urgency: '',
226            abandoned_cart: 'no',
227            subscription_expired: 'no',
228            is_archant_site: 'no',
229            signed_up_primary_news_newsletter: 'no',
230            signed_up_primary_sport_newsletter: 'no',
231            played_free_puzzles_last_7days: '',
232            played_paid_puzzles_last_7days: '',
233            commenter_badge: '',
234            upper_role: '',
235        },
236        analytics: {
237            hierachy: 'newsquest,,www.forestryjournal.co.uk,' + data_layer_helper.getPathFragment(3).replace(/\//,','),
238            link_filters: 'javascript:,forestryjournal.co.uk,fish4.co.uk,adsys.newsquest.co.uk,www.exchangeandmart.co.uk,www.communigate.co.uk,',
239            tracking_block: data_layer_helper.getTrackingFromCookie('tracking_block', ''),
240            tracking_block_index: data_layer_helper.getTrackingFromCookie('tracking_block_index', ''),
241            previous_page_name: data_layer_helper.getCookie('nq_prev_page'),
242            advert_id: '',
243            position_in_list: data_layer_helper.getTrackingFromCookie('o-prop30', ''),
244            featured_content: data_layer_helper.getTrackingFromCookie('o-ref', qs.get('ref')),
245            account: data_layer_helper.getAccount()
246        },
247        chartbeat: {
248            enabled: "no",
249            id: "",
250            domain: "",
251            sections: ''
252        },
253        parsely: {
254            enabled: "yes",
255            site_id: "forestryjournal.co.uk",
256            type: 'Anonymous'
257        },
258        piano: {
259            tags: data_layer_helper.getPianoTags({
260                      piano_domain: 'forestryjournal',
261                      piano_master: '',
262                      breaking_news: false,
263                      editorial_opinion: false,
264                      free_subscriber: false,
265                      free_subscriber: false,
266                      has_video: false,
267                      is_article: false,
268                      article_content_level : '',
269                      article_content_level_open_access: false,
270                      picture_gallery_id: false,
271                      user_is_newsquest: false,
272                      user_is_entra_authenticated: false,
273                      user_logged_in: false,
274                      is_live_article: false,
275                      why_free_subscriber: '',
276                      extra_tags: extraTags,
277                      is_covid_headline: false,
278                      is_covid_body: false,
279                      is_alist: false,
280                      audio_provider_bytecast: false
281                  }
282            ),
283            custom_variables: {
284                article_length: '',
285                application_group: 'Bespoke',
286                content_is_editorial_opinion: 'no',
287                base_url: 'https://www.forestryjournal.co.uk',
288                full_url: document.location.href,
289                from_discover: (document.referrer === "android-app://com.google.android.googlequicksearchbox/") ? 'yes' : 'no',
290                mds_font: 'slab',
291                mds_colour_palette: 'palette-9',
292                site_name: '',
293                site_name_possessive: 'Forestry Journal\'s',
294                site_name_with_prefix_capitalised: 'The Forestry Journal',
295                site_name_with_prefix_lower: 'the Forestry Journal',
296                site_name_with_prefix_capitalised_possessive: 'The Forestry Journal\'s',
297                site_name_with_prefix_lower_possessive: 'the Forestry Journal\'s',
298                location_primary: '',
299                location_primary_possessive: '',
300                location_county: '',
301                location_county_possessive: '',
302                site_has_primary_sports_team: 'no',
303                primary_sports_team: '',
304                primary_sports_team_nickname: '',
305                primary_sports_team_sport: '',
306                primary_sports_team_possessive: '',
307                primary_sports_team_nickname_possessive: '',
308                site_id: '1121',
309                content_level: '',
310                content_author: '',
311                content_id: '',
312                content_is_article: 'no',
313                content_primary_topic: '',
314                user_seen_consent_modal: ($.cookie('_sp_enable_dfp_personalized_ads') === 'true' || $.cookie('_sp_enable_dfp_personalized_ads') === 'false') ? 'yes' : 'no',
315                site_section: data_layer_helper.getPathFragment(0, true),
316                article_published_yyyy: '',
317                user_played_free_puzzles_last_7days: '',
318                user_played_paid_puzzles_last_7days: '',
319                anon_user_played_free_puzzles_last_7days: data_layer_helper.untrackedPuzzleCheck(),
320                home_delivery_phone_number: '0800 953 0227',
321                content_is_restricted: data_layer_helper.getRestrictedContent('', '', '', ''),
322                day_of_week: data_layer_helper.getDayOfWeek(),
323                user_card_expired: '',
324                user_card_will_expire: '',
325                user_expires_urgency: '',
326                user_used_app_last_24hours: '',
327                user_used_app_last_7days: '',
328                user_used_app_last_14days: '',
329                user_subscription_tier: 'null',
330                user_is_newsquest: 'no',
331                primary_news_newsletter_id: '1873',
332                primary_news_newsletter_name: 'the Morning Briefing',
333                primary_news_newsletter_description: 'The latest stories, in your inbox every morning.',
334                primary_sport_newsletter_id: '',
335                primary_sport_newsletter_name: '',
336                primary_sport_newsletter_description: '',
337                user_signed_up_primary_news_newsletter: 'no',
338                user_signed_up_primary_sport_newsletter: 'no',
339                newsletter_auto_promote: '',
340                newsletter_auto_promote_name: '',
341                newsletter_auto_promote_description: '',
342                newsletter_auto_promote_ID: '',
343                site_has_app: 'yes',
344                site_app_store_url_ios: 'https://apps.apple.com/app/forestry-journal/id1234235397',
345                site_app_store_url_google_play: 'https://play.google.com/store/apps/details?id=com.pagesuite.droid.forestryjournal',
346                subsets_experiment_id: '',
347                site_section1: data_layer_helper.getPathFragment(1, true), // GBL required
348                site_newspaper_archive_enabled: 'no',
349                site_newspaper_archive_number_of_pages: '',
350                site_newspaper_archive_start_year: 0,
351                article_originates_from_this_site: '',
352                article_originates_from_site: '',
353                article_originates_from_url: ''
354            },
355            native_variables: {
356                setContentCreated: '',
357                setContentIsNative:  'no',
358                setContentAuthor: '',
359                setContentSection: data_layer_helper.getPathFragment(0, true)
360            }
361        },
362        article: {
363            cscore:'',
364            showing_preview: '',
365            is_article: data_layer_helper.isArticle() ? 'yes' : 'no',
366            id : '',
367            length_type: '',
368            character_count: '',
369            author: ''.toLowerCase(),
370            e_var15: ''.toLowerCase(),
371            context: '',
372            content_level: '',
373            content_level_open_access: '',
374            content_level_combined: ',,no',
375            content_is_restricted: data_layer_helper.getRestrictedContent('', '', '', ''),
376            increment: (data_layer_helper.isArticle()) ? '+1' : '',
377            sponsor: '',
378            contributions: '0',
379            is_sponsored: 'no',
380            headline: '',
381            age: data_layer_helper.getArticleAge(),
382            upload_date: '',
383            publish_date: '',
384            update_date: '',
385            rating: '',
386            source: data_layer_helper.getSource(''),
387            subjects: (typeof articleSubjects === 'object') ? articleSubjects.join(',') : '',
388            context: '',
389            grapeshot_context: (typeof gs_channels !== 'undefined') ? gs_channels : '',
390            allow_comments: 'no',
391            total_comments: '',
392            originating_site_id: '',
393            parent_article_site_id: '',
394            parent_article_id: '',
395            originating_article_id: '',
396            parent_originating_site_id: '',
397            is_original_to_site: '',
398            is_cloned: '',
399            parent_article_url: '',
400            use_skimlinks: 'no',
401            content_primary_topic: '',
402            taxonomy: {
403                article_types: '',
404                topics: '',
405                sports: '',
406                sports_teams: '',
407                locations: '',
408                shared_content: '',
409                free_tags: '',
410                farming: ''
411            },
412            audio: {
413                has_audio: 'no',
414                provider: ''
415            },
416            article_comments_use_viafoura: ''
417        },
418        homes: {
419            search_bedrooms_minimum: '',
420            search_location: 'user',
421            search_price_minimum: '',
422            search_price_maximum: '',
423            list: '',
424            id: ''
425        },
426        video: {
427            exists: 'no',
428            auto_play_enabled: data_layer_helper.getAutoPlay('no')
429        },
430        contributions: {
431            allow_text: '',
432            allow_image: '',
433            user_contributions_number: '0',
434            has_user_contributions: 'no'
435        },
436        search: {
437            keywords: qs.get('search'),
438            results: ''
439        },
440        announcements: {
441            category: ''
442        },
443        config: {
444            google_analytics_id: '',
445            site_template_set: 'standard',
446            path: '/user/',
447            top_level_section: 'user',
448            polar_property_id: '',
449            gallery_show_advert_after: '5',
450            disable_outbrain_with_ad_light: 'no',
451            disable_outbrain: 'yes',
452        },
453        dfp: {
454            is_landing: 'no',
455            module_path: 'user',
456            weather_band: '',
457            weather_summary: ''.toLowerCase(),
458            id: data_layer_helper.getGoogleId(),
459            display_screen: data_layer_helper.isMobileScreen() ? 'mobile' : 'desktop',
460            can_show_billboard: (window.screen.width > 960) ? 'y' : 'n'
461        },
462        dates: {
463            date: (new Date()).toLocaleDateString('en-GB'),
464            hour: (new Date()).getHours(),
465            day: data_layer_helper.getDayOfWeek(),
466            weekend: ((new Date()).getDay() === 6 || (new Date()).getDay() === 0) ? 'Weekend' : 'Weekday'
467        },
468        memorials: {
469            contact_phone_number: '',
470            contact_email_address: '',
471            publications: JSON.parse('' || '[]'),
472            user: {
473                id: '',
474                email_verified: 'no',
475                type: ''
476            },
477            funeral_director: {
478                id: '',
479                person_urn: ''
480            }
481        }
482    }
483
484    data_layer_helper.storeCurrentPageName(data_layer.page.name);
485
486    window.dispatchEvent(new Event('data-layer-loaded'))
487
488      data_layer.piano.custom_variables.user_used_app_last_24hours = 'no';
489      data_layer.piano.custom_variables.user_used_app_last_7days = 'no';
490      data_layer.piano.custom_variables.user_used_app_last_14days = 'no';
491  if (data_layer.article.is_article !== 'yes') {
492      data_layer.piano.custom_variables.site_module = 'Newsquest\Modules\UserIdentityModule';
493      data_layer.piano.custom_variables.puzzles_landing_page = 'no';
494      data_layer.piano.custom_variables.puzzles_display_page = 'no';
495  }
496</script>
496
497 
498<script
499  src="https://assets.adobedtm.com/499440d21de9/54b957ecfb7e/launch-98090dfa3d73.min.js"
500  async
501></script>
501
502 
503
504<script>"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(){var t=function(){var t,e,o=[],n=window,r=n;for(;r;){try{if(r.frames.__tcfapiLocator){t=r;break}}catch(t){}if(r===n.top)break;r=r.parent}t||(!function t(){var e=n.document,o=!!n.frames.__tcfapiLocator;if(!o)if(e.body){var r=e.createElement("iframe");r.style.cssText="display:none",r.name="__tcfapiLocator",r.title="tcfapiLocator",e.body.appendChild(r)}else setTimeout(t,5);return!o}(),n.__tcfapi=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return o;"setGdprApplies"===n[0]?n.length>3&&2===parseInt(n[1],10)&&"boolean"==typeof n[3]&&(e=n[3],"function"==typeof n[2]&&n[2]("set",!0)):"ping"===n[0]?"function"==typeof n[2]&&n[2]({gdprApplies:e,cmpLoaded:!1,cmpStatus:"stub"}):o.push(n)},n.addEventListener("message",(function(t){var e="string"==typeof t.data,o={};if(e)try{o=JSON.parse(t.data)}catch(t){}else o=t.data;var n="object"===_typeof(o)&&null!==o?o.__tcfapiCall:null;n&&window.__tcfapi(n.command,n.version,(function(o,r){var a={__tcfapiReturn:{returnValue:o,success:r,callId:n.callId}};t&&t.source&&t.source.postMessage&&t.source.postMessage(e?JSON.stringify(a):a,"*")}),n.parameter)}),!1))};"undefined"!=typeof module?module.exports=t:t()}();</script>
504
505
506<script type = "text/javascript">
507( function () {
508
509    window._sp_ = {
510        config: {
511            baseEndpoint: 'https://a02342.forestryjournal.co.uk',
512            accountId: 52,
513            targetingParams:{
514                subscribed: false,
515                privacy: false
516            },
517            gdpr: { },
518            events: {
519                onMessageReady: function (message_type) {
520                    trackSPEvents('event76');
521                },
522                onMessageChoiceSelect: function (message_type, choice_id, choice_type_id) {
523                    console.log('message_type: ', message_type);
524                    console.log('choice_id: ', choice_id);
525                    console.log('choice_type_id: ', choice_type_id);
526                    if ('yes' === 'yes') {
527                        if (choice_type_id === 12) {
528                            trackSPEvents('event83'); //Consent Banner Reject All
529                            trackSPEvents('event82'); //Journalism Message Shown
530                        }
531                        if (choice_type_id === 11) {
532                            trackSPEvents('event78');
533                        }
534                        if (choice_type_id === 9) {
535                            trackSPEvents('event77');
536                        }
537                    } else {
538                        // these are the second argument in non-gate
539                        if (choice_type_id === 12) {
540                            trackSPEvents('event77');
541                        }
542
543                        if (choice_type_id === 11) {
544                            trackSPEvents('event78');
545                        }
546
547                        if (choice_type_id === 13) {
548		                    trackSPEvents('event83');
549                        }
550                    }
551                },
552                onPrivacyManagerActionStatus: function(message_type, status, actionType) {
553                    console.log('message_type: ' + message_type);
554                    console.log('status: ' + status);
555                    console.log('actionType: ' + actionType);
556                    if ('yes' === 'yes') {
557                        if (actionType === 11) {
558                            trackSPEvents('event79'); //Privacy Manager Accept
559                        }
560                        if (actionType === 9) {
561                            trackSPEvents('event68'); //Privacy Manager Redirect
562                        }
563                        if (actionType === 1) {
564                            trackSPEvents('event75'); //Forced tcf String Change
565                        }
566                    } else {
567                    // these are the second argument in non-gate
568                        if (actionType === 13) {
569                            trackSPEvents('event81'); //Privacy Manager Reject
570                        }
571                        if (actionType === 11) {
572                            trackSPEvents('event79'); //Privacy Manager Accept
573                        }
574                        if (actionType === 1) {
575                            trackSPEvents('event80'); //Privacy Manager Save & Exit
576                        }
577                    }
578                },
579                onPMCancel: function (message_type) {
580                    console.log('onPMCancel', message_type);
581                    trackSPEvents('event84'); //Privacy Manager Back
582                },
583            }
584        }
585    }
586
587    if (typeof window.__tcfapi === 'function') {
588        window.__tcfapi('addEventListener', 2, function (tcData, success) {
589            console.log('SP: Event Listen:', tcData, success);
590            if (success && tcData.eventStatus === 'useractioncomplete') {
591                setTcfCookie(tcData.purpose.consents, tcData.purpose.legitimateInterests);
592
593                var csnt = 'none';
594                if ($.cookie('_sp_enable_dfp_personalized_ads') === 'true') {
595                    csnt = 'yes';
596                } else if ($.cookie('_sp_enable_dfp_personalized_ads') === 'false') {
597                    csnt = 'no';
598                }
599                googletag.cmd.push(function() {
600                    // console.log('DFP: Cookie check - setting dfpcsnt to ', csnt);
601                    googletag.pubads().setTargeting('dfpcsnt', csnt);
602                });
603                // ready to start DFP
604                // console.log('PIANO: setting unrestricted via useractioncomplete');
605                // runPiano('unrestricted');
606                startAdvertising(tcData.listenerId);
607
608                var e = new Event('launch:cmp:choice-made');
609                window.dispatchEvent(e);
610            } else if (success && tcData.eventStatus === 'tcloaded') {
611                // tcloaded means a valid TCF v2.0 string is available
612                // console.log('PIANO: setting unrestricted via tcloaded');
613                // runPiano('unrestricted');
614                if (tcData.gdprApplies === false) {
615                    $.cookie('_sp_enable_dfp_personalized_ads', 'true', {domain: '.forestryjournal.co.uk', path: '/', expires: 100});
616                }
617                startAdvertising(tcData.listenerId);
618
619            } else if (success && tcData.eventStatus === 'useractionnotcomplete') {
620                // do nothing - this means the user has not made a choice yet
621            } else if (success && tcData.eventStatus === 'cmpuishown') {
622                // do nothing - this means the CMP UI has been shown
623            } else if (!success) {
624                // $.cookie('_sp_enable_dfp_personalized_ads', 'true', {domain: '.forestryjournal.co.uk', path: '/', expires: 100});
625                // startAdvertising();
626            } else {
627                // console.log('PIANO: setting restricted');
628                // runPiano('restricted');
629            }
630        });
631    }
632
633    
634
635    document.addEventListener('click', function (e) {
636        const option = e.target.closest('.gdpr-option-v2');
637
638        if (!option) return;
639
640        e.preventDefault();
641        sendEvent76 = false;
642
643        const id = option.dataset.v2Id;
644        const isGate = option.dataset.isGate;
645
646        if (isGate === 'yes') {
647            trackSPEvents('event87');
648            _sp_.gdpr.loadPrivacyManagerModal(id);
649        } else {
650            trackSPEvents('event77');
651            _sp_.gdpr.loadPrivacyManagerModal(id);
652        }
653    });
654
655    function getTcfData() {
656        if (typeof window.__tcfapi !== 'function') {
657            console.warn('TCF API unavailable');
658            return;
659        }
660        window.__tcfapi('addEventListener', 2, function(data, success) {
661            if (!data.purpose || !data.purpose.consents || !data.purpose.legitimateInterests) {
662                // console.log('DFP: No TCF data found, not setting cookies');
663                return;
664            }
665            setTcfCookie(data.purpose.consents, data.purpose.legitimateInterests);
666        }, [755]);
667    }
668    getTcfData();
669
670    function setTcfCookie(data, legitimateInterests) {
671        var consents = [];
672        $.each(data, function(id, consent)  {
673            var c = (consent === true) ? 'yes' : 'no';
674            consents.push(c)
675        });
676        // console.log('DFP: consents length: ', consents.length);
677        if (consents.length !== 10) {
678            // consents = consents.fill('no', consents.length, 10);
679            for (var i = consents.length; i < 10; i++) {
680                consents[i] = 'no';
681            }
682        }
683        // console.log('DFP: Found consents to store in cookie:', consents);
684        $.cookie('prev-tcf-v2', consents.join(','), {domain: '.forestryjournal.co.uk', path: '/', expires: 100});
685
686        var consentEvent4 = 'none';
687        if (typeof data[4] !== 'undefined') {
688            consentEvent4 = data[4] ? 'true' : 'false';
689        }
690        $.cookie('_sp_enable_dfp_personalized_ads', consentEvent4, {domain: '.forestryjournal.co.uk', path: '/', expires: 100});
691
692        var legitInterest = 'none';
693        if (legitimateInterests && typeof legitimateInterests[2] !== 'undefined') {
694            legitInterest = legitimateInterests[2] ? 'true' : 'false';
695        }
696
697        $.cookie('_sp_legitimate_interests', legitInterest , {domain: '.forestryjournal.co.uk', path: '/', expires: 100});
698    }
699
700    var sendEvent76 = true;
701
702    function trackSPEvents(events) {
703        if (events === 'event76' && !sendEvent76) {
704            return;
705        } else if (events === 'event76') {
706            sendEvent76 = false;
707        }
708
709        if (typeof window.s !== 'object') {
710            // console.log('DFP: No window.s object found, trying again in 1 second');
711            window.setTimeout(function () { trackSPEvents(events)} , 1000);
712            return;
713        }
714
715        // console.log("ADB: Tracking %s", events);
716        // Re-create the Omniture object so the data can be tracked.
717        var s = window.s;
718
719        if (events.indexOf('event70') !== -1) {
720            // console.log('DFP: Events passed, added evars');
721            s.eVar35 = 'enabled';
722            s.prop35 = 'enabled';
723        }
724
725        s.events = events;
726        s.linkTrackEvents = events;
727        s.linkTrackVars = "eVar2,eVar3,eVar4,eVar5,eVar6,evar7,evar8,evar9,eVar16,eVar19,eVar26,eVar35,eVar43,eVar67,prop35";
728        s.suppressPageView = true;
729        s.tl(true,'o','Ad Block');
730    }
731
732    function startAdvertising(id)
733    {
734        if (typeof window.doNotAdvertise !== 'undefined' && window.doNotAdvertise === true) {
735            return;
736        }
737
738        // console.log("DFP: Is the page fully loaded?", window.googleReady);
739        if (window.googleReady !== true) {
740            window.setTimeout(function () {
741                // console.log('DFP: Google not fully loaded yet, pausing quarter of a second before trying again');
742                startAdvertising(id);
743            }, 250);
744            return;
745        }
746
747        // Ensure that we never run this code twice
748        if (window.advertisingStart === true) {
749            return;
750        }
751        // console.log('DFP: Running advertisement');
752        window.advertisingStart = true;
753
754        var googletag = window.googletag;
755        // init google objects and array
756        (function() {
757            var gads = document.createElement('script');
758            gads.async = true;
759            gads.type = 'text/javascript';
760            gads.src = 'https://securepubads.g.doubleclick.net/tag/js/gpt.js';
761            var node = document.getElementsByTagName('script')[0];
762            node.parentNode.insertBefore(gads, node);
763        })();
764
765        // launch the exco slideshow player
766        launchExcoSlideshow();
767
768        // load facebook etc
769        loadSocials();
770
771        // Checking our decision to use headerbidding (shorterned as prebid) is correct
772        // via system logic, and that we have the simplified consent to do so
773        if (usePrebid && $.cookie('_sp_enable_dfp_personalized_ads') === 'true') {
774            var e = new Event('launch:sourcepoint:consentaccepted');
775            window.dispatchEvent(e);
776
777            // AP code initialisation
778            // the script is loaded via launch, once we have detected a consent signal via the datalayer.
779            fetchAp();
780
781            var site = 'desktop';
782            var _site = 'desktop';
783
784            // load IAS scripts and set up vars
785            (function() {
786                var ias = document.createElement('script');
787                ias.async = true;
788                ias.type = 'text/javascript';
789                ias.src = 'https://cdn.adsafeprotected.com/iasPET.1.js';
790                var node = document.getElementsByTagName('script')[0];
791                node.parentNode.insertBefore(ias, node);
792            })();
793
794            // load the prebid script
795            (function() {
796                var pbs = document.createElement('script');
797                pbs.async = true;
798                pbs.type = 'text/javascript';
799                pbs.src = 'https://micro.rubiconproject.com/prebid/dynamic/11022.js?group=newsquest';
800                var node = document.getElementsByTagName('script')[0];
801                node.parentNode.insertBefore(pbs, node);
802            })();
803
804            // tell google to actually get the bids from all relevant vendors when loaded
805            googletag.cmd.push(function () {
806                fetchHeaderBids();
807            });
808        }
809
810        // Outbrain
811        if (
812            (window.data_layer.user.advertising_experience === 'Ad-Free' || window.data_layer.config.disable_outbrain === 'yes') ||
813            (window.data_layer.user.advertising_experience === 'Ad-Light' && window.data_layer.config.disable_outbrain_with_ad_light === 'yes')
814        ) {
815            // console.log("No Outbrain script loading due to page settings");
816        } else {
817            // console.log("Loading Outbrain");
818            var ob = document.createElement('script');
819            ob.async = true;
820            ob.type = 'text/javascript';
821            ob.src = 'https://widgets.outbrain.com/outbrain.js';
822            var node = document.getElementsByTagName('script')[0];
823            node.parentNode.insertBefore(ob, node);
824        }
825
826
827        // remove the listener
828        if (id !== null) {
829            window.__tcfapi('removeEventListener', 2, function (success) { }, id);
830        }
831    }
832
833    /**
834     * Wait until we have advertising consent to show this advertising
835     * based replacement for the single image on our article pages
836     * This logic is based on excoSlidshowPlayerID that only appears on the page
837     * if a user is NOT a subscriber (including privacy plus) and the page has the
838     * correct information to show it (doesn't have a video, not in sport etc)
839     */
840    function launchExcoSlideshow() {
841        const slideShowPlayerId = window.excoSlideshowPlayerId;
842        // if we do not have a player id, we do not need to do anything
843        if (!slideShowPlayerId) {
844            return;
845        }
846
847        // this is exco's supplied code, modified for our use
848        (function (d, s, n) {
849            fjs = d.getElementsByTagName(s)[0];
850            js = d.createElement(s);
851            js.className = n;
852            js.src = '//player.ex.co/player/' + slideShowPlayerId;
853            js.setAttribute('programmatic', 'true');
854	        js.onload = function () {
855                const playerApi = ExCoPlayer.connect(slideShowPlayerId);
856                playerApi.init({});
857
858                playerApi.on('player-load', function(data) {
859                    $('.mar-article-image').remove();
860                    if (window.screen.width > 800) {
861                        $('.article-hero').attr('style', 'order: 1');
862                    }
863                    window.hide_overlay_for_exco = true;
864                });
865            };
866            fjs.parentNode.insertBefore(js, fjs);
867        }(document, 'script', 'exco-player'));
868    }
869
870    function loadSocials()
871    {
872        const socials = [
873            'https://platform.twitter.com/widgets.js',
874            'https://connect.facebook.net/en_US/all.js#xfbml=1',
875            'https://www.tiktok.com/embed.js',
876        ];
877
878        socials.forEach((social) => {
879            var script = document.createElement('script');
880            script.src = social;
881            script.async = true;
882            document.getElementsByTagName('head')[0].appendChild(script);
883        });
884    }
885
886
887})();
888
889</script>
vendor: 1 bytes, line 889
889
890<script src="https://a02342.forestryjournal.co.uk/unified/wrapperMessagingWithoutDetection.js"></script>
890
891
892<script>
893window.usePiano = true;
894window.selectedOfferId = null;
895window.selectedTermId = null;
896</script>
vendor: 1 bytes, line 896
896
897<script>
898document.cookie = "__adblocker=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";
899var setNptTechAdblockerCookie = function(adblocker) {
900    var d = new Date();
901    d.setTime(d.getTime() + 60 * 60 * 24 * 2 * 1000);
902    document.cookie = "__adblocker=" + (adblocker ? "true" : "false") + "; expires=" + d.toUTCString() + "; path=/";
903}
904var script = document.createElement("script");
905script.setAttribute("async", true);
906script.setAttribute("src", "//www.npttech.com/advertising.js");
907script.setAttribute("onerror", "setNptTechAdblockerCookie(true);");
908document.getElementsByTagName("head")[0].appendChild(script);
909</script>
909
910
911<script>
912// window.pdl = window.pdl || {};
913// window.pdl.requireConsent = 'v2';
914
915// Store entry point unless it's a user or subscribe page
916// to redirect after subscription
917const excludedPaths = ['/user/', '/subscribe/'];
918
919const shouldExclude = excludedPaths.some(path =>
920  window.location.pathname.includes(path)
921);
922
923if (!shouldExclude) {
924  sessionStorage.setItem(
925    'last_piano_page_interacted_with',
926    window.location.pathname
927  );
928}
929
930tp = window.tp || [];
931
932function runPiano(restrictedMode) {
933    // console.log('Running Piano with restricted mode:', restrictedMode);
934    // tp.push(['init', function() {
935    //      console.log('Piano purpose map, before calling setAllPurposes()', tp.consent.getByPurpose());
936    // }]);
937    // if (restrictedMode === 'restricted') {
938    //     // If we're in restricted mode, we need to set some specific parameters
939    //     tp.push(['init', function() {
940    //         tp.consent.setAllPurposes('opt-out')
941    //     }]);
942    // } else {
943    //     tp.push(['init', function() {
944    //         tp.consent.setAllPurposes('opt-in')
945    //     }]);
946    // }
947    // tp.push(['init', function() {
948    //     console.log('Piano purpose map, after calling setAllPurposes()', tp.consent.getByPurpose());
949    // }]);
950    // init Piano ID
951    tp.push(['init', function() {
952        tp.pianoId.init();
953    }]);
954
955    const isGooglebot = window.isRobot.googleBot();
956
957    const isArticle = (data_layer.article.is_article === 'yes');
958
959    const isCl3 = (parseInt(data_layer.article.content_level, 10) === 3);
960
961    if (isGooglebot) {
962        // we don't load Piano from all non-article pages
963        if (!isArticle) {
964            return;
965        }
966
967        // If we are on an article, we do not load piano on CL0, 1, or 2
968        if (!isCl3) {
969            return;
970        }
971    }
972    Object.keys(data_layer.piano.custom_variables).forEach(function (k) {
973        var v = data_layer.piano.custom_variables[k];
974
975        if (v != '') {
976            tp.push(["setCustomVariable", k, v]);
977        }
978    });
979
980    Object.keys(data_layer.piano.native_variables).forEach(function (k) {
981        var v = data_layer.piano.native_variables[k];
982        if (v != '') {
983            tp.push([k, v]);
984        }
985    });
986
987    tp.push(['setTags', data_layer.piano.tags]);
988
989   (function(src){
990        var a=document.createElement("script");
991        a.type = "text/javascript";
992        a.async=true;
993        a.src=src;
994        var b=document.getElementsByTagName("script")[0];
995        b.parentNode.insertBefore(a, b)
996    })("//experience.tinypass.com/xbuilder/experience/load?aid=BY2E0Kpxpu");
997}
998
999// Init Piano
1000const debug = document.cookie
1001    .split('; ')
1002    .find(row => row.startsWith('debug='))
1003    ?.split('=')[1];
1004
1005tp.push(["setDebug", debug === '1']);
1006
1007tp.push(["setApplePayMerchantId", 'merchant.nq.subssites.piano']);
1008
1009tp.push(["setUsePianoIdUserProvider", true ]);
1010
1011tp.push(["addHandler", "loginRequired", function(params) {
1012    // If they're already signed in, we don't need to do anything special.
1013    if (tp.user.isUserValid()) {
1014        return;
1015    }
1016    if (typeof window._overridePianoDefault !== 'undefined' && window._overridePianoDefault !== true) {
1017        console.log("TPL Called")
1018        tp.pianoId.show({
1019            screen: 'login',
1020            displayMode: 'modal',
1021            loggedIn: (data) => {
1022                pianoId.loggedIn();
1023            },
1024            loggedOut: () => {
1025                console.log('TP-TJ: user logged out');
1026            },
1027            registrationSuccess: () => {
1028                pianoId.registered();
1029            },
1030            width: '500px',
1031            height: '460px',
1032        });
1033    }
1034}]);
1035
1036tp.push(["addHandler", "checkoutSelectTerm", function (termDetails) {
1037    if (typeof termDetails.termId !== 'undefined') {
1038        window.selectedTermId = termDetails.termId;
1039    }
1040}]);
1041
1042tp.push(["addHandler", "showTemplate", function (templateParams) {
1043    showPianoTarget(templateParams);
1044}]);
1045
1046tp.push(["addHandler", "showOffer", function (offerParams) {
1047    window.shownOffer = true;
1048
1049    // Store some data we might need later.
1050    if (typeof offerParams.offerId !== 'undefined') {
1051        window.selectedOfferId = offerParams.offerId;
1052    }
1053
1054    showPianoTarget(offerParams);
1055}]);
1056
1057function handleFullWidthBanner(selector) {
1058    if (selector === '#po-overlay-articlegate-full-width-full-article-scroll-below') {
1059        document.querySelector(selector).classList.add(selector.replace('#', ''));
1060    }
1061    document.querySelector(selector).style.minHeight = "254px";
1062    document.querySelector('#subscription-content').style.display = 'none';
1063    document.querySelectorAll('.send-us-your-news-cta').forEach((el) => { el.style.display = 'none'; });
1064    document.querySelectorAll('.mega-news-block').forEach((el) => { el.style.display = 'none'; });
1065
1066    const block = document.querySelector(selector);
1067    const containerBlock = block.parentElement;
1068    const containerBlockHeight = 254; // to prevent abrupt jumping
1069
1070    if (!block) { return; }
1071
1072    block.style.display = 'block';
1073
1074    const blockRect = block.getBoundingClientRect();
1075    const startTop = blockRect.top + window.scrollY;
1076    const blockHeight = blockRect.height;
1077    const screenWidth = window.screen.width;
1078
1079    let lastState = ''; // 'top', 'bottom', 'default'
1080
1081    function getScrollbarWidth() {
1082        return window.innerWidth - document.documentElement.clientWidth;
1083    }
1084
1085    function updatePosition() {
1086        const scrollY = window.scrollY;
1087        const viewportHeight = window.innerHeight;
1088        const bottomTrigger = startTop + blockHeight - viewportHeight;
1089
1090        let newState = 'default';
1091
1092        if (scrollY > startTop && screenWidth >= 768) {
1093            newState = 'top';
1094        } else if (scrollY < bottomTrigger && screenWidth >= 768) {
1095            newState = 'bottom';
1096        } else if (scrollY < bottomTrigger + 90 && screenWidth < 768) {
1097            newState = 'bottom-mobile';
1098        }
1099
1100        const scrollbarWidth = getScrollbarWidth();
1101
1102        if (newState !== lastState) {
1103            switch (newState) {
1104                case 'top':
1105                    block.style.position = 'fixed';
1106                    block.style.top = '0';
1107                    block.style.bottom = 'auto';
1108                    block.style.marginLeft = '0';
1109                    block.style.marginRight = '0';
1110                    containerBlock.style.minHeight = `${containerBlockHeight}px`;
1111                    break;
1112
1113                case 'bottom':
1114                    block.style.position = 'fixed';
1115                    block.style.bottom = '0';
1116                    block.style.top = 'auto';
1117                    block.style.marginLeft = '0';
1118                    block.style.marginRight = '0';
1119                    block.style.width = `calc(100vw - ${scrollbarWidth}px)`;
1120                    containerBlock.style.minHeight = 'unset';
1121                    break;
1122
1123                case 'bottom-mobile':
1124                    block.style.position = 'fixed';
1125                    block.style.bottom = '90px';
1126                    block.style.top = 'auto';
1127                    block.style.marginLeft = 'calc(-100vw + 100%)';
1128                    block.style.marginRight = 'calc(-100vw + 100%)';
1129                    containerBlock.style.minHeight = 'unset';
1130                    break;
1131
1132                default:
1133                    block.style.position = '';
1134                    block.style.top = '';
1135                    block.style.bottom = '';
1136                    block.style.width = `calc(100vw - ${scrollbarWidth}px)`;
1137                    block.style.marginLeft = '-100vw';
1138                    block.style.marginRight = '-100vw';
1139                    containerBlock.style.minHeight = 'unset';
1140                    break;
1141            }
1142
1143            lastState = newState;
1144        }
1145
1146        requestAnimationFrame(updatePosition);
1147    }
1148
1149    updatePosition();
1150    window.addEventListener('resize', updatePosition);
1151}
1152
1153function trackLocation(forceValidLocation = false) {
1154    var currentLocation = window.location.pathname;
1155
1156    let valid = false;
1157
1158    if (currentLocation.indexOf('puzzles') > -1) {
1159        valid = true;
1160    }
1161
1162    if (currentLocation.indexOf('pagesuite') > -1) {
1163        valid = true;
1164    }
1165
1166    var articleMatch = currentLocation.match(/(\d+)\.[^\/]+\/(r\/)?$/);
1167    if (articleMatch != null) {
1168        valid = true;
1169    }
1170
1171    if (forceValidLocation) {
1172        valid = true;
1173    }
1174
1175    if (currentLocation.indexOf('subscribe') > -1) {
1176        valid = false;
1177    }
1178
1179    if (!valid) {
1180        return;
1181    }
1182
1183    $.cookie('last-piano-page-interacted-with', currentLocation, {path: '/', domain: window.data_layer.site.cookie_domain});
1184}
1185
1186function trackPianoWithNewRelic(templateName) {
1187    if (this.newrelic && typeof this.newrelic === 'object') {
1188        newrelic.setCustomAttribute('user_was_shown_piano_experience', templateName);
1189    }
1190}
1191
1192function handleOfferShow(params) {
1193    console.log('Piano params', params);
1194
1195    // If on the subscription page and the URL has a term ID and offer ID, show the relevant offer.
1196    if (typeof location.pathname !== 'undefined' && location.pathname === '/subscribe/') {
1197        var offerId = location.search.match(/offer_id=([A-Z0-9]+)/);
1198        if (offerId !== null && offerId.length > 1) {
1199            offerId = offerId[1];
1200        }
1201        var termId = location.search.match(/term_id=([A-Z0-9]+)/);
1202        if (termId !== null && termId.length > 1) {
1203            termId = termId[1];
1204        }
1205        if (offerId !== null && termId !== null) {
1206            tp.offer.show({'termId': termId, 'offerId': offerId});
1207        }
1208    }
1209
1210    // we are only tracking
1211    var templateId = params.templateId;
1212    var variantId = params.templateVariantId;
1213    if (params.containerSelector !== '#po-inline-articlegate-fullarticle' &&
1214        params.containerSelector !== '#po-overlay-articlegate-full-width-full-article-scroll-below' &&
1215        params.containerSelector !== '#po-inline-articlegate-partialarticle' &&
1216        params.containerSelector !== '#po-overlay-articlegate-full-width-scroll-below'
1217    ) {
1218        $.get('/ws/piano/templatename/', {template_id: templateId, variant_id: variantId}, function (response) {
1219            trackPianoSimplified(params, response.name);
1220        });
1221        return;
1222    }
1223
1224
1225    $.get('/ws/piano/templatename/', {template_id: templateId, variant_id: variantId}, function (response) {
1226        trackPiano(params, response.name);
1227    });
1228}
1229
1230function trackPiano(params, templateName) {
1231    trackPianoWithNewRelic(templateName);
1232
1233    if (typeof params.activeMeters === 'string') {
1234        activeMeters = JSON.parse(params.activeMeters);
1235    } else {
1236        activeMeters = params.activeMeters;
1237    }
1238
1239    var s = window.s;
1240    if (!s || !s.pageName) {
1241        // console.log("ADB: Setting s from backup");
1242        s = window.backupAdobe;
1243        window.s = s;
1244    }
1245
1246    // this would call when CL3 is a hard gate
1247    if (!activeMeters && data_layer.article.content_level === '3') {
1248        s.eVar59 = templateName;
1249        s.eVar58 = data_layer.article.content_level;
1250        s.events = "event91";
1251        s.linkTrackVars="eVar58,eVar2,eVar3,eVar4,eVar5,eVar6,eVar15,eVar16,eVar19,eVar25,eVar26,eVar28,eVar43,eVar59,eVar61,eVar62,eVar79,eVar104,eVar106,eVar107,eVar108,eVar118,prop63,list3,events";
1252        s.linkTrackEvents="event91";
1253        s.tl(document, 'o', 'Metered Access Notice');
1254        s.events = '';
1255        return;
1256    }
1257
1258    if (!activeMeters) {
1259        return;
1260    }
1261
1262    var meterData = activeMeters[0];
1263
1264    var meterName = meterData.meterName.toLowerCase();
1265
1266    // track event 5
1267    if (meterName.indexOf('cl1') !== -1 || meterName.indexOf('cl2') !== -1 || meterName.indexOf('cl3') !== -1 || params.containerSelector === '#po-inline-articlegate-partialarticle' || params.containerSelector === '#po-overlay-articlegate-full-width-scroll-below') {
1268        s.eVar58 = data_layer.article.content_level;
1269        s.eVar80 = meterData.meterName + ',' +  meterData.views + ',' + meterData.totalViews + ',' + meterData.viewsLeft + ',' + meterData.maxViews;
1270        s.eVar59 = templateName;
1271        s.events = "event5";
1272        s.linkTrackVars="eVar58,eVar2,eVar3,eVar4,eVar5,eVar6,eVar16,eVar19,eVar25,eVar26,eVar28,eVar43,eVar59,eVar61,eVar62,prop63,eVar80,eVar79,eVar118,list3, events";
1273        s.linkTrackEvents="event5";
1274    } else {
1275        s.eVar80 = meterData.meterName + ',' +  meterData.views + ',' + meterData.totalViews + ',' + meterData.viewsLeft + ',' + meterData.maxViews;
1276        s.eVar59 = templateName;
1277        s.linkTrackVars="eVar2,eVar3,eVar4,eVar5,eVar6,eVar16,eVar19,eVar25,eVar26,eVar28,eVar43,eVar59,eVar61,eVar62,prop63,eVar80,eVar79,eVar118,list3, events";
1278    }
1279    s.tl(document, 'o', 'Metered Access Notice');
1280    s.events = '';
1281
1282}
1283
1284/**
1285 * Just track the template name in 78 for non-article-interrupts/gates
1286 */
1287function trackPianoSimplified(params, templateName)
1288{
1289    trackPianoWithNewRelic(templateName);
1290
1291    var s = window.s;
1292    if (!s || !s.pageName) {
1293        // console.log("ADB: Setting s from backup");
1294        s = window.backupAdobe;
1295        window.s = s;
1296    }
1297    s.eVar78 = templateName;
1298    s.events = 'event90';
1299    s.linkTrackEvents="event90";
1300    s.linkTrackVars="eVar2,eVar3,eVar4,eVar5,eVar6,eVar16,eVar19,eVar25,eVar26,eVar28,eVar43,eVar59,eVar61,eVar62,prop63,eVar80,eVar79,eVar118,list3,eVar78, events";
1301    s.tl(document, 'o', 'Piano Template');
1302}
1303
1304function raiseLaunchEvent(name) {
1305    var e = new Event('launch:piano:' + name);
1306    window.dispatchEvent(e);
1307}
1308
1309function removePianoToast() {
1310    setTimeout(() => {
1311        document.getElementById('po-overlay-toast-left').remove()
1312    }, 30000)
1313}
1314
1315function showPianoTarget(params) {
1316    handleOfferShow(params);
1317    trackLocation();
1318
1319    if ($(params.containerSelector).length > 0) {
1320        const displayType = $(params.containerSelector).attr('data-display');
1321
1322        if (displayType) {
1323            $(params.containerSelector).addClass(`shown-${displayType}`);
1324        } else {
1325            $(params.containerSelector).addClass('shown').show();
1326        }
1327
1328        if ($(params.containerSelector).hasClass('piano--block-level') || $(params.containerSelector).hasClass('piano--inside-block')) {
1329            $(params.containerSelector).show();
1330        }
1331
1332        if (
1333            params.containerSelector === '#po-overlay-articlegate-full-width-scroll-below' ||
1334            params.containerSelector === '#po-overlay-articlegate-full-width-full-article-scroll-below'
1335        ) {
1336            handleFullWidthBanner(params.containerSelector);
1337        }
1338
1339        if ($(params.containerSelector) === '#po-inline-subscribe-page') {
1340            $(params.containerSelector).show();
1341        }
1342
1343        if (['#po-inline-blocksystem-target-e'].includes(params.containerSelector)) {
1344            $('#po-inline-blocksystem-target-e').show();
1345            $('.piano-promo-container').show();
1346        }
1347
1348        if (params.containerSelector === '#po-overlay-toast-left') {
1349            removePianoToast()
1350        }
1351
1352        if (params.containerSelector === '#po-overlay-toast-main-navigation') {
1353            removePianoToast()
1354        }
1355
1356        if (params.containerSelector === '#po-inline-articlewall-partialarticle-closable') {
1357            $('#po-inline-articlegate-partialarticle').css('display', 'none');
1358        }
1359
1360        if (params.containerSelector === '#po-inline-articlewall-fullarticle-closable') {
1361            $('#po-inline-articlegate-fullarticle').css('display', 'none');
1362        }
1363
1364        if (params.containerSelector === '#po-overlay-articlegate-full-width-full-article-scroll-below-closable') {
1365            $('#po-overlay-articlegate-full-width-full-article-scroll-below').css('display', 'none');
1366        }
1367    }
1368}
1369
1370tp.push(["addHandler", "checkoutComplete", function(conversion) {
1371    var s = window.s;
1372    s.events = s.apl(s.events, "event4", ",", 1); // Set the subscription counter event.
1373    s.events = s.apl(s.events, "purchase", ",", 1); // Set the purchase event.
1374    s.products = "Subscription : Metered Access;" + conversion.termId + ";1;"+conversion.chargeAmount;
1375    s.linkTrackEvents = "event4,purchase";
1376    s.purchaseID = conversion.termConversionId;
1377    s.pageName = '(www) /subscribe/complete/';
1378    // wipe out errors
1379    s.eVar31 = '';
1380    s.linkTrackVars="eVar2,eVar3,eVar5,eVar6,eVar7,eVar8,eVar9,eVar10,eVar15,eVar16,eVar17,eVar18,eVar19,eVar20,eVar22,eVar23,eVar24,eVar25,eVar26,eVar61,eVar62,events,products,purchaseID";
1381
1382    s.tl(true, 'o', 'Subscription');
1383
1384    $.cookie('resourceConverted', conversion.rid, {path: '/', domain: window.data_layer.site.cookie_domain});
1385    $.cookie('pianoConverted', '1', {path: '/', domain: window.data_layer.site.cookie_domain});
1386    raiseLaunchEvent('checkoutComplete');
1387
1388    // Clean Session Storage
1389    sessionStorage.removeItem('nq_selected_offer_id');
1390    sessionStorage.removeItem('nq_selected_term_id');
1391    sessionStorage.removeItem('nq_adobe_tracking_article_dimensions');
1392    sessionStorage.removeItem('nq_adobe_tracking_visiting_dimensions');
1393
1394    // Show Onboarding modal after subscription
1395    const lastPage = sessionStorage.getItem('last_piano_page_interacted_with');
1396    const baseUrl = lastPage || window.location.href;
1397
1398    const url = new URL(baseUrl, window.location.origin);
1399    url.searchParams.set('show-onboarding', 'yes');
1400
1401    setTimeout(() => {
1402        window.location.href = url.pathname + url.search;
1403    }, 2000);
1404}]);
1405
1406tp.push(["addHandler", "checkoutPaymentError", function(errorData) {
1407    var s = window.s;
1408    s.pageName = '(www) /subscribe/error/';
1409    s.eVar31 = errorData.message;
1410    s.tl(true, 'o', 'CheckoutPaymentError');
1411
1412    raiseLaunchEvent('checkoutPaymentError');
1413}]);
1414
1415tp.push(["addHandler", "checkoutError", function(errorData) {
1416    var s = window.s;
1417    s.pageName = '(www) /subscribe/error/';
1418    s.eVar31 = errorData.message;
1419    s.tl(true, 'o', 'CheckoutError');
1420    raiseLaunchEvent('checkoutError');
1421}]);
1422
1423tp.push(["addHandler", "startCheckout", function(options) {
1424    sessionStorage.setItem("nq_selected_offer_id", options.offerId);
1425    sessionStorage.setItem("nq_selected_term_id", options.termId);
1426
1427    if (!tp.user.isUserValid()) {
1428        window.location = '/user/create-account/subscribe/';
1429        return;
1430    }
1431
1432    var s = window.s;
1433    s.eVar2 = '(www) /subscribe/payment/';
1434    s.pageName = '(www) /subscribe/payment/';
1435    const storedAdobeArticleDimensions = sessionStorage.getItem('nq_adobe_tracking_article_dimensions');
1436    const storedAdobeVisitingDimensions = sessionStorage.getItem('nq_adobe_tracking_visiting_dimensions');
1437    if (storedAdobeVisitingDimensions) {
1438        const storedAdobeVisitingDimensionsObj = JSON.parse(storedAdobeVisitingDimensions);
1439        s.eVar10 = storedAdobeVisitingDimensionsObj.eVar10;
1440        s.eVar22 = storedAdobeVisitingDimensionsObj.eVar22;
1441        s.eVar23 = storedAdobeVisitingDimensionsObj.eVar23;
1442        s.eVar24 = storedAdobeVisitingDimensionsObj.eVar24;
1443    }
1444    if (storedAdobeArticleDimensions) {
1445        const storedAdobeArticleDimensionsObj = JSON.parse(storedAdobeArticleDimensions);
1446        s.eVar10 = storedAdobeArticleDimensionsObj.eVar10;
1447        s.eVar15 = storedAdobeArticleDimensionsObj.eVar15;
1448        s.eVar22 = storedAdobeArticleDimensionsObj.eVar22;
1449        s.eVar23 = storedAdobeArticleDimensionsObj.eVar23;
1450        s.eVar24 = storedAdobeArticleDimensionsObj.eVar24;
1451        s.eVar25 = storedAdobeArticleDimensionsObj.eVar25;
1452    }
1453    // wipe out errors
1454    s.eVar31 = '';
1455    s.events = '';
1456    raiseLaunchEvent('startCheckout');
1457    s.linkTrackVars="eVar10,eVar15,eVar22,eVar23,eVar24,eVar25";
1458    s.t();
1459}]);
1460
1461tp.push(["addHandler", "checkoutClose", function(conversion) {
1462    raiseLaunchEvent('checkoutClose');
1463
1464    // Did they abandon the cart? If so: was anything in their cart?
1465    if (typeof conversion.state === 'undefined' || conversion.state !== 'close') {
1466        return;
1467    }
1468    if (window.selectedOfferId === null || window.selectedTermId === null) {
1469        return;
1470    }
1471    $.post('/ws/piano/abandoned-cart/', {offer_id: window.selectedOfferId, term_id: window.selectedTermId});
1472}]);
1473
1474tp.push(["addHandler", "meterExpired", function(meterData){
1475    var msg = "<div><b>meterName:</b> " + meterData.meterName
1476        + "&nbsp; | &nbsp;<b>views:</b> " + meterData.views
1477        + "&nbsp; | &nbsp;<b>totalViews:</b> " + meterData.totalViews
1478        + "&nbsp; | &nbsp;<b>viewsLeft:</b> " + meterData.viewsLeft
1479        + "&nbsp; | &nbsp;<b>maxViews:</b> " + meterData.maxViews
1480        + "&nbsp; | &nbsp;<b>callback:</b> " + meterData.callback + '</div>';
1481    if ($.cookie('nq-show-piano-viewer') === 'yes') {
1482        $('#piano-meter-value').html(msg);
1483        $('#piano-meter-display').show();
1484        $('#piano-meter-display-content').append(msg);
1485    }
1486    var cVal = window.location.href;
1487
1488    trackLocation(true);
1489
1490    console.log("Piano Meter Expired:", meterData.meterName);
1491    if (meterData.meterName === 'CL1 Meter') {
1492        console.log("Piano: Setting meter expired cookie");
1493        $.cookie('isMeterExpired', 'yes', {path: '/', domain: window.data_layer.site.cookie_domain, expires: 1});
1494    }
1495
1496    raiseLaunchEvent('meterExpired');
1497
1498}]);
1499
1500tp.push(["addHandler", "meterActive", function(meterData){
1501    var msg = "<div><b>meterName:</b> " + meterData.meterName
1502        + "&nbsp; | &nbsp;<b>views:</b> " + meterData.views
1503        + "&nbsp; | &nbsp;<b>totalViews:</b> " + meterData.totalViews
1504        + "&nbsp; | &nbsp;<b>viewsLeft:</b> " + meterData.viewsLeft
1505        + "&nbsp; | &nbsp;<b>maxViews:</b> " + meterData.maxViews
1506        + "&nbsp; | &nbsp;<b>callback:</b> " + meterData.callback + '</div>';
1507    if ($.cookie('nq-show-piano-viewer') === 'yes') {
1508        $('#piano-meter-value').html(msg);
1509        $('#piano-meter-display').show();
1510        $('#piano-meter-display-content').append(msg);
1511    }
1512
1513    console.log("Piano Meter running total:", meterData.meterName,  meterData.totalViews, meterData.maxViews, meterData);
1514    if (meterData.meterName === 'CL1 Meter' && meterData.totalViews >= meterData.maxViews) {
1515        $.cookie('isMeterExpired', 'yes', {path: '/', domain: window.data_layer.site.cookie_domain, expires: 1});
1516    } else {
1517        $.cookie('isMeterExpired', 'no', {path: '/', domain: window.data_layer.site.cookie_domain, expires: 1});
1518    }
1519}]);
1520
1521
1522tp.push(["setCxenseSiteId", "2478428342924650590"]);
1523
1524
1525runPiano('unrestricted');
1526
1527</script>
1527
1528
1529
1530
1531    <link rel="apple-touch-icon" href="/resources/images/10308247/">
1532    <link rel="apple-touch-icon" sizes="72x72" href="/resources/images/10308246/">
1533    <link rel="apple-touch-icon" sizes="114x114" href="/resources/images/10308248/">
1534
1535
1536    <!-- Add iconify -->
1537    
1537<script src="https://code.iconify.design/1/1.0.7/iconify.min.js" integrity="sha384-jQq64HqdQD5xg0PPkpkCOW3x8Nsfx5UT1qWOpoJxLYy6Ef+5i+8xPoAj/I3B+ZMm" crossorigin="anonymous"></script>
1537
1538</head>
1539<body class="sticky-footer" data-cache-buster="vjoPdzgg" data-template="" data-template-colour="Blue" data-namespace="standard">
1540    <!--
1541  ##+ +##  ##: `#####.  #######  ###  ###      ######  `#####.  #######      ###  ,##  +#####
1542  +## ###' ##  #######  ######## ### ###       ######  #######  ########     ###  ,##  ######:
1543  .## #### ## ###   ### ###  ### ######        ##,    ###   ### ###  ###     ###  ,##  ##`
1544   ##,#+##:## ###   ### #######  ######        #####+ ###   ### #######      ###  ,##  +#####
1545   ####`####+ ###   ### ######   #######       #####+ ###   ### ######       ###  ,##     ####
1546   #### .###. '##   ##' ### ###  ### ,##:      ##,    '##   ##' ### ###      ###  ### '##  +##
1547   :###  ###   #######  ### `##+ ###  ###      ##,     #######  ### `##+     `#######  ######+
1548    ##:  ###    #####   ###  ### ###  ,###     ##,      #####   ###  ###       #####    ####+
1549
1550Developers, designers, testers - interested in working for us?
1551Contact this guy....https://uk.linkedin.com/in/hillsimon
1552-->
1553
1554
1555    <div style="height: 0px"><div id="DFP_out_of_page"></div></div>
1556
1557    <div id="paywallWindowOverlay"></div>
1558
1559
1560
1561    <div id="takeover">
1562        <div id="martini-config" class="layout">
1563            <div id="header-content">
1564                <!-- standard - header-2a.html --> <header id="site-header" class="site-header site-header--2a " >
1565    <div class="site-brand container-inner-width">
1566        <div class="site-brand__container">
1567        <a href="/">
1568            <img src="/resources/images/small_site_logo/" alt="Forestry Journal" class="site-brand__brand-image"/>
1569        </a>
1570        </div>
1571        <div class="simple-header-top-navigation">
1572    <div class="simple-header-top-navigation__links">
1573
1574        <div class="simple-header-top-navigation__links--primary-links header-primary-links">
1575            
1576            <a href="/subscribe/" aria-label="subscribe button" class="mar-btn mar-btn--promo-primary">
1577                Subscribe
1578            </a>
1579            
1580
1581            
1582            <ul class="list-style-none top-nav-overflow">
1583                <li><a  href="/pagesuite/" class="mar-btn mar-btn--promo-secondary">Digital Edition</a></li> <li><a  href="/puzzles/" class="mar-btn mar-btn--promo-primary">Puzzles</a></li> 
1584            </ul>
1585            
1586        </div>
1587
1588        
1589        
1590        <div class="simple-header-top-navigation__links--classifieds">
1591            
1592        </div>
1593        
1594        
1595
1596    </div>
1597    
1598    <div class="simple-header-top-navigation__links--account">
1599        
1600        <a id="user-login-not-loggedin" href="/user/login/?redirect_url=/user/account/" class="simple-header-top-navigation__user-login mar-btn" title="User Account">
1601            <div aria-label="User Account Button" id="headerUserAccountButton">
1602                <svg xmlns="http://www.w3.org/2000/svg " width="14" height="16" viewBox="0 0 10 14" fill="none">
1603<circle cx="5" cy="3.85718" r="3" fill="black"/>
1604<ellipse cx="5" cy="10.2857" rx="5" ry="2.85714" fill="black"/>
1605</svg>
1606            </div>
1607        </a>
1608        
1609    </div>
1610    
1611
1612    <button aria-expanded="false" aria-label="Open the menu" class="simple-header-top-navigation__mega-menu-btn primary-nav__menu--more-btn">
1613        <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M3 6h18M3 12h18M3 18h18"/></svg>
1614    </button>
1615
1616</div>
1617    </div>
1618    <div id="mega-menu" class="mega-menu" style="display: none;">
1619    <div class="mega-menu__container mega-menu__wrapper">
1620        <div class="mega-menu__cancel-button">
1621            <i aria-expanded="true" aria-hidden="true" aria-label="Close the menu" class="mega-menu__cancel-button--icon">
1622                <span class="iconify" data-icon="eva:close-fill" data-inline="false"></span>
1623                <div>Close</div>
1624            </i>
1625        </div>
1626
1627    
1628        <div class="mega-menu-subscribe-banner">
1629            <span>Stay ahead with a digital subscription</span>
1630            <a href="/subscribe/">Subscribe</a>
1631        </div>
1632    
1633
1634    
1635        <div class="mega-menu__features expanded-sub-nav">
1636        <div class="mega-menu__features--links">
1637            
1638            <a href="https://www.facebook.com/ForestryJournal" target="_blank" class="col link-item">Facebook</a>
1639            
1640
1641                <a href="https://www.instagram.com/forestryjournal/" target="_blank" class="col link-item">Instagram</a>
1642            
1643
1644                <a href="https://www.tiktok.com/@forestryjournal" target="_blank" class="col link-item">TikTok</a>
1645            
1646
1647                <a href="https://youtube.com/channel/UCSd5JelZa577UgQX2NAJn7w" target="_blank" class="col link-item">YouTube</a>
1648            
1649
1650                <a href="https://www.youtube.com/playlist?list=PLLA2NI1m0uewP-EfMceM1pIq2fda-H-8S" target="_blank" class="col link-item">Watch the Forestry Briefing</a>
1651            
1652
1653                <a href="https://www.linkedin.com/showcase/forestry-journal-&amp;-essentialarb/" target="_blank" class="col link-item">LinkedIn</a>
1654            
1655
1656                <a href="https://www.forestryjournal.co.uk/newsletters/" target="_blank" class="col link-item">Newsletters</a>
1657            
1658
1659                <a href="https://www.newsquestrewards.co.uk/" target="_blank" class="col link-item">Reader Rewards</a>
1660            
1661            </div>
1662            <hr class="divider none">
1663        </div>
1664    
1665
1666        <div class="mega-menu__search">
1667          <form method="get" action="/search/">
1668              <label class="mega-menu__search--title" for="searchbar-input">Search</label>
1669              <div class="mega-menu__search--bar">
1670                  <input id="searchbar-input" class="searchbar-input" type="text" name="search" placeholder="Search Forestry Journal">
1671                  <button class="searchbar-btn mira-search-button" type="submit"><span class="iconify" data-icon="fe:search" data-inline="false"></span></button>
1672              </div>
1673          </form>
1674        </div>
1675
1676        <div class="mega-menu__main-list link-list">
1677      <div class="mega-menu__main-list--list-item">
1678                <div>
1679                    <div>
1680                        <a href="/news/">
1681                            <h3><span class="mega-menu__main-list--parent-link">News</span></h3>
1682                        </a>
1683                    </div>
1684        
1685                    <div class="mega-menu__main-list--child-links">
1686                      <div class="child-item">
1687                          <a href="/news/equipment/">Equipment</a>
1688                      </div>
1689                  
1690
1691                      <div class="child-item">
1692                          <a href="/news/grants/">Grants</a>
1693                      </div>
1694                  
1695
1696                      <div class="child-item">
1697                          <a href="/news/people/">People</a>
1698                      </div>
1699                  
1700
1701                      <div class="child-item">
1702                          <a href="/news/plant-health/">Plant Health</a>
1703                      </div>
1704                  
1705
1706                      <div class="child-item">
1707                          <a href="/news/politics/">Politics</a>
1708                      </div>
1709                  
1710
1711                      <div class="child-item">
1712                          <a href="/news/vacancies/">Vacancies</a>
1713                      </div>
1714                    </div>
1715        
1716                </div>
1717                <div class="divider"></div>
1718            </div>
1719      
1720
1721            <div class="mega-menu__main-list--list-item">
1722                <div>
1723                    <div>
1724                        <a href="/situations-vacant/">
1725                            <h3><span class="mega-menu__main-list--parent-link">Jobs</span></h3>
1726                        </a>
1727                    </div>
1728        
1729                    <div class="mega-menu__main-list--child-links">
1730                      <div class="child-item">
1731                          <a href="/situations-vacant/otheragriculturalvacancies/">Other Agricultural Vacancies</a>
1732                      </div>
1733                    </div>
1734        
1735                </div>
1736                <div class="divider"></div>
1737            </div>
1738      
1739
1740            <div class="mega-menu__main-list--list-item">
1741                <div>
1742                    <div>
1743                        <a href="/opinion/">
1744                            <h3><span class="mega-menu__main-list--parent-link">Opinion</span></h3>
1745                        </a>
1746                    </div>
1747        
1748                    <div class="mega-menu__main-list--child-links">
1749                      <div class="child-item">
1750                          <a href="/opinion/voices-of-forestry/">Voices of Forestry</a>
1751                      </div>
1752                  
1753
1754                      <div class="child-item">
1755                          <a href="/opinion/letters/">Letters</a>
1756                      </div>
1757                    </div>
1758        
1759                </div>
1760                <div class="divider"></div>
1761            </div>
1762      
1763
1764            <div class="mega-menu__main-list--list-item">
1765                <div>
1766                    <div>
1767                        <a href="/features/">
1768                            <h3><span class="mega-menu__main-list--parent-link">Features</span></h3>
1769                        </a>
1770                    </div>
1771        
1772                    <div class="mega-menu__main-list--child-links">
1773                      <div class="child-item">
1774                          <a href="/features/foresters-diary/">Forester's Diary</a>
1775                      </div>
1776                  
1777
1778                      <div class="child-item">
1779                          <a href="/features/women-in-forestry/">Women In Forestry</a>
1780                      </div>
1781                  
1782
1783                      <div class="child-item">
1784                          <a href="/features/bites-from-the-blog/">Bites From The Blog</a>
1785                      </div>
1786                  
1787
1788                      <div class="child-item">
1789                          <a href="/features/tree-of-the-month/">Tree Of The Month</a>
1790                      </div>
1791                  
1792
1793                      <div class="child-item">
1794                          <a href="/features/voice/">Voice</a>
1795                      </div>
1796                    </div>
1797        
1798                </div>
1799                <div class="divider"></div>
1800            </div>
1801      
1802
1803            <div class="mega-menu__main-list--list-item">
1804                <div>
1805                    <div>
1806                        <a href="/machinery/">
1807                            <h3><span class="mega-menu__main-list--parent-link">Machinery</span></h3>
1808                        </a>
1809                    </div>
1810        
1811                    <div class="mega-menu__main-list--child-links">
1812                      <div class="child-item">
1813                          <a href="/machinery/itesfromthelog/">Bites from the Blog</a>
1814                      </div>
1815                  
1816
1817                      <div class="child-item">
1818                          <a href="/machinery/equipment-reviews/">Equipment</a>
1819                      </div>
1820                  
1821
1822                      <div class="child-item">
1823                          <a href="/machinery/vehicle-reviews/">Vehicle Reviews</a>
1824                      </div>
1825                    </div>
1826        
1827                </div>
1828                <div class="divider"></div>
1829            </div>
1830      
1831
1832            <div class="mega-menu__main-list--list-item">
1833                <div>
1834                    <div>
1835                        <a href="/buyersguides/">
1836                            <h3><span class="mega-menu__main-list--parent-link">Buyers Guides</span></h3>
1837                        </a>
1838                    </div>
1839        
1840                </div>
1841                <div class="divider"></div>
1842            </div>
1843      
1844
1845            <div class="mega-menu__main-list--list-item">
1846                <div>
1847                    <div>
1848                        <a href="/events/">
1849                            <h3><span class="mega-menu__main-list--parent-link">Events</span></h3>
1850                        </a>
1851                    </div>
1852        
1853                    <div class="mega-menu__main-list--child-links">
1854                      <div class="child-item">
1855                          <a href="/events/apf-show/">APF Show</a>
1856                      </div>
1857                  
1858
1859                      <div class="child-item">
1860                          <a href="/events/apf-catalogue/">APF Catalogue</a>
1861                      </div>
1862                  
1863
1864                      <div class="child-item">
1865                          <a href="/events/arb-show/">ARB Show</a>
1866                      </div>
1867                  
1868
1869                      <div class="child-item">
1870                          <a href="/events/elmia-wood/">Elmia Wood</a>
1871                      </div>
1872                  
1873
1874                      <div class="child-item">
1875                          <a href="/events/swedish-forestry-expo/">Swedish Forestry Expo</a>
1876                      </div>
1877                    </div>
1878        
1879                </div>
1880                <div class="divider"></div>
1881            </div>
1882      
1883
1884            <div class="mega-menu__main-list--list-item">
1885                <div>
1886                    <div>
1887                        <a href="/essential-arb/">
1888                            <h3><span class="mega-menu__main-list--parent-link">essentialARB</span></h3>
1889                        </a>
1890                    </div>
1891        
1892                    <div class="mega-menu__main-list--child-links">
1893                      <div class="child-item">
1894                          <a href="/essential-arb/tree-gang/">Tree Gang</a>
1895                      </div>
1896                  
1897
1898                      <div class="child-item">
1899                          <a href="/essential-arb/tales-from-the-trees/">Tales from the Trees</a>
1900                      </div>
1901                  
1902
1903                      <div class="child-item">
1904                          <a href="/essential-arb/a-view-from-the-nursery/">A View From The Nursery</a>
1905                      </div>
1906                  
1907
1908                      <div class="child-item">
1909                          <a href="/essential-arb/women-in-arb/">Women In Arb</a>
1910                      </div>
1911                  
1912
1913                      <div class="child-item">
1914                          <a href="/essential-arb/arb-confidential/">Arb Confidential</a>
1915                      </div>
1916                    </div>
1917        
1918                </div>
1919                <div class="divider"></div>
1920            </div>
1921      
1922
1923            <div class="mega-menu__main-list--list-item">
1924                <div>
1925                    <div>
1926                        <a href="/advertise/">
1927                            <h3><span class="mega-menu__main-list--parent-link">Advertise</span></h3>
1928                        </a>
1929                    </div>
1930        
1931                </div>
1932                <div class="divider"></div>
1933            </div>
1934      
1935
1936            <div class="mega-menu__main-list--list-item">
1937                <div>
1938                    <div>
1939                        <a href="/subscriptions/">
1940                            <h3><span class="mega-menu__main-list--parent-link">Subscriptions</span></h3>
1941                        </a>
1942                    </div>
1943        
1944                    <div class="mega-menu__main-list--child-links">
1945                      <div class="child-item">
1946                          <a href="/subscriptions/free-sample-issue/">Free Sample Issue</a>
1947                      </div>
1948                  
1949
1950                      <div class="child-item">
1951                          <a href="/subscriptions/subscription-order-form/">Subscription Order Form</a>
1952                      </div>
1953                  
1954
1955                      <div class="child-item">
1956                          <a href="/subscriptions/digital-edition/">Digital Edition</a>
1957                      </div>
1958                  
1959
1960                      <div class="child-item">
1961                          <a href="/subscriptions/app/">App</a>
1962                      </div>
1963                    </div>
1964        
1965                </div>
1966                <div class="divider"></div>
1967            <
1967/div>
1968        </div>
1969    </div>
1970
1971    <div class="mega-menu__sticky">
1972        <ul class="list-style-none mega-menu__sticky--list">
1973            <div class="mega-menu__sticky--primary-links">
1974                
1975                <li>
1976                <a href="/subscribe/">
1977                    <button class="mar-btn--promo-primary">
1978                        Subscribe
1979                    </button>
1980                </a></li>
1981            
1982                <li><a  href="/pagesuite/" class="mar-btn mar-btn--promo-secondary">Digital Edition</a></li> <li><a  href="/puzzles/" class="mar-btn mar-btn--promo-primary">Puzzles</a></li> 
1983            </div>
1984            <li><a class="mar-nav--promo-link" href="/classified-ads/">Classifieds</a></li> <li><a class="mar-nav--promo-link" href="/directories/">Directories</a></li> <li><a class="mar-nav--promo-link" href="/media-partners/">Media Partners</a></li> <li><a class="mar-nav--promo-link" href="/media-partners/apf/">APF Catalogue</a></li> <li><a class="mar-nav--promo-link" href="/puzzles/">Puzzles</a></li> <li><a class="mar-nav--promo-link" href="/contact/">Contact Us</a></li> 
1985        </ul>
1986    </div>
1987</div>
1988
1989</header>
1990            </div>
1991
1992            <div id="redesign-content">
1993                <div id="module-content" class="content">
1994                    <div class="piano--block-level block-bottom-margin" id="po-inline-banner-top-hero-content"></div>
1995
1996
1997                    <!-- standard - PianoIdLogin.html --> <div class="piano-form-container login-page block block-bottom-margin mar-my-5" id="form-container">
1998    <div id="form-container__header">
1999        <h1 class="heading login-heading mar-mb-3">Sign in</h1>
2000        <div class="heading-container">
2001            <p>Not registered?</p>
2002            <a class="mar-btn mar-btn--promo-secondary button-lite" id="create_account"  href="/user/create-account/">
2003                Create an account
2004            </a>
2005        </div>
2006    </div>
2007    <form class="piano-form-container__form" id="login_form" data-redirect-url="/user/account/">
2008        <div class="form-input">
2009            <label for="email">Email</label>
2010            <input id="email" type="email" class="piano-form-elements form-control" name="email">
2011            <span class="form-input__error">Please enter a valid email address</span>
2012        </div>
2013
2014        <div>
2015            <div class="form-input mar-mt-1">
2016                <label for="password">Password</label>
2017                <div class="password-container">
2018                    <input class="piano-form-elements form-control" id="password" name="password" pattern="[a-z0-9]{8,}" type="password">
2019                    <div id="toggle-password" class="toggle-password">
2020                        <img class="iconify eye-open" src="/resources/responsive-static/images/password_toggle.svg" alt="Toggle password o
2020pen" />
2021                        <span display="none" height="25" class="iconify eye-closed" data-icon="formkit:eyeclosed" data-inline="false"></span>
2022                    </div>
2023                    <span class="form-input__error mar-mb-1">Password must be at least 8 characters long</span>
2024                </div>
2025            </div>
2026            <div class="row-flex mar-mt-2">
2027                <div class="form-check">
2028                    <input type="checkbox" name="remember_me" id="remember_me" checked>
2029                    <label class="label-light" for="remember_me">Keep me logged in</label>
2030                </div>
2031                <a href="/user/login/forgotten-password/" class="forgot-password">Forgot password?</a>
2032            </div>
2033        </div>
2034        <button id="login_sign_in" type="submit" class="cta-button mar-btn mar-btn--light mar-mt-2" aria-label="Sign In">Sign in</button>
2035        <div class="socials mar-mt-2">
2036            <div class="social-text mar-mb-2">or sign in with a social account:</div>
2037            <div class="socials__button-container">
2038                <button class="facebook-button social-button" type="button" id="facebook_button" aria-label="Sign in with a Facebook account">
2039                    <img src="/resources/responsive-static/mds/images/icons/icon-facebook.svg" height="50" width="50" alt="Facebook Logo">
2040                </button>
2041                <button class="google-button social-button" type="button" id="google_button" aria-label="Sign in with a Google account">
2042                    <img src="/resources/responsive-static/mds/images/icons/icon-google.svg" height="50" width="50" alt="Google Logo">
2043                </button>
2044            </div>
2045        </div>
2046    </form>
2047</div>
2048                </div>
2049            </div>
2050
2051            <footer class="site-footer" aria-label="site-footer">
2052    <div class="container-inner-width">
2053        <div class="links-grid" aria-label="site-footer-links">
2054            <section class="get-in-touch-section">
2055                <h2>Get in Touch</h2>
2056                <a href="/contact/">Contact Us</a><a href="/advertising/">Advertise</a><a href="/send-us-your-news/">Send Us Your News</a>
2057            </section>
2058            <section class="follow-us-section">
2059                <h2>Follow Us</h2>
2060<a
2061                        class="footer__social-media--link"
2062                        href="https://www.facebook.com/ForestryJournal"
2063                        title="Like Us on Facebook"
2064                        role="link"
2065                        data-media-type="facebook"
2066                    >
2067                        <i class="footer__social-media--icon iconify"></i>
2068                        Like Us on Facebook
2069                    </a>
2070
2071
2072                    <a
2073                        class="footer__social-media--link"
2074                        href="https://twitter.com/Forestry_UK"
2075                        title="Follow us on Twitter"
2076                        role="link"
2077                        data-media-type="twitter"
2078                    >
2079                        <i class="footer__social-media--icon iconify"></i>
2080                        Follow us on Twitter
2081                    </a>
2082
2083
2084                    <a
2085                        class="footer__social-media--link"
2086                        href="https://www.linkedin.com/showcase/forestry-journal-&-essentialarb/"
2087                        title="Follow us on LinkedIn"
2088                        role="link"
2089                        data-media-type="linkedin"
2090                    >
2091                        <i class="footer__social-media--icon iconify"></i>
2092                        Follow us on LinkedIn
2093                    </a>
2094
2095
2096                    <a
2097                        class="footer__social-media--link"
2098                        href="https://www.instagram.com/forestryjournal/"
2099                        title="Follow us on Instagram"
2100                        role="link"
2101                        data-media-type="instagram"
2102                    >
2103                        <i class="footer__social-media--icon iconify"></i>
2104                        Follow us on Instagram
2105                    </a>
2106            </section>
2107            <section class="useful-links-section">
2108                <h2>Useful Links</h2>
2109                <div class="useful-links">
2110                    <section>
2111                        <a href="/subscribe/">Subscriptions</a><a href="/newsletters/">Newsletters</a>
2112                    </section>
2113                    <section>
2114                        <a href="/archive/" style="display: inline-block">Archive</a> | <a href="/misc/sitemap/" style="display: inline-block">Sitemap</a><a href="/gdpr/" class="gdpr-option-v2" data-v2-id="1170586" data-is-gate="yes" rel="nofollow">
2114Manage Consent</a><a href="https://www.newsquest.co.uk/legal/ai-notice/" target="_blank">AI Notice</a>
2115                    </section>
2116                </div>
2117            </section>
2118            <section class="ipso-terms">
2119                <img class="ipso-logo" src="/resources/responsive-static/mds/images/ipso-regulated.png" alt="IPSO Regulated image" />
2120                <p class="ipso-copy">This website and associated newspapers adhere to the Independent Press Standards Organisation's
2121    Editors' Code of Practice. If you have a complaint about the editorial content which relates to
2122    inaccuracy or intrusion, then please <a class="footer__ipso-terms--link" href="/contact">
2123    contact the editor here</a>.
2124    If you are dissatisfied with the response provided you can
2125    <a class="footer__ipso-terms--link" href="https://www.ipso.co.uk/contact-us/" target="_block">contact IPSO here</a></p>
2126            </section>
2127        </div>
2128        <div class="notice" aria-label="site-footer-notice">
2129            <img src="/resources/responsive-static/mds/images/newsquest.png" alt="Newsquest" style="width: 193px"/>
2130            <p><strong>&copy; 2001-2026. The Forestry Journal</strong> is owned and operated by Newsquest Media Group Ltd, an audited local newspaper network.</p>
2131            <p>Visit <a href="https://www.newsquest.co.uk/" target="_blank">newsquest.co.uk</a> to view our <a href="https://www.newsquest.co.uk/our-policies/" target="_blank">policies</a>, <a href="https://www.newsquest.co.uk/legal/" target="_blank" >terms</a> and <a href="https://www.newsquest.co.uk/legal/" target="_blank" >legal agreements</a>.</p>
2132            <p>The Echo Building, 18 Albert Road, Bournemouth, England BH1 1BZ. Registered in England & Wales | 01676637</p>
2133        </div>
2134    </div>
2135</footer>
2136
2137
2138            <div id="fb-root"></div>
2139
2140
2141        </div>
2142    </div>
2143
2144
2145
2146    <div class="mar-modal-container mar-modal-container--animate mar-modal-container--animate-out visually-hidden">
2147    <div class="mar-modal-overlay" data-uses-js="close-modal"></div>
2148
2149    <div aria-label="Pop up dialog" class="mar-modal" tabindex="-1" role="dialog">
2150        <div class="mar-modal__header">
2151            <h3 class="mar-modal__title">Modal headline</h3>
2152
2153            <div class="mar-modal__close" data-uses-js="close-modal">
2154<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2155    <path fill-rule="evenodd" clip-rule="evenodd" d="M7.60714 6L11.6518 10.0446C11.7589 10.1518 11.8438 10.2768 11.9062 10.4196C11.9688 10.5625 12 10.7143 12 10.875C12 11.1786 11.8884 11.442 11.6652 11.6652C11.442 11.8884 11.1696 12 10.8482 12C10.6875 12 10.5357 11.9688 10.3929 11.9062C10.25 11.8438 10.1339 11.7589 10.0446 11.6518L6 7.60714L1.95536 11.6518C1.84821 11.7589 1.72321 11.8438 1.58036 11.9062C1.4375 11.9688 1.28572 12 1.125 12C0.821427 12 0.558037 11.8884 0.334821 11.6652C0.111606 11.442 0 11.1786 0 10.875C0 10.7143 0.0312497 10.5625 0.09375 10.4196C0.15625 10.2768 0.241071 10.1518 0.348214 10.0446L4.36607 6L0.348214 1.95536C0.241071 1.84821 0.15625 1.72768 0.09375 1.59375C0.0312497 1.45982 0 1.3125 0 1.15179C0 0.830355 0.111606 0.558037 0.334821 0.334821C0.558037 0.111606 0.821427 0 1.125 0C1.28572 0 1.4375 0.0312497 1.58036 0.09375C1.72321 0.15625 1.84821 0.241071 1.95536 0.348214L6 4.39286L10.0446 0.348214C10.1339 0.241071 10.25 0.15625 10.3929 0.09375C10.5357 0.0312497 10.6875 0 10.8482 0C11.1696 0 11.442 0.111606 11.6652 0.334821C11.8884 0.558037 12 0.830355 12 1.15179C12 1.3125 11.9688 1.45982 11.9062 1.59375C11.8438 1.72768 11.7589 1.84821 11.6518 1.95536L7.60714 6Z" fill="#9DA0A4"/>
2156</svg>
2157
2158
2159                <span>Close</span>
2160            </div>
2161        </div>
2162
2163        <div class="mar-modal__body">Automatically injected HTML goes here</div>
2164
2165        <div class="mar-modal__actions">
2166<!-- standard - Buttons.html --> 
2167    
2168<button
2169    type="button"
2170    data-uses-js="modal-submit"
2171    
2172    class=" mar-btn
2173    mar-btn--light
2174    mar-btn--md
2175    
2176    
2177    "
2178>
2179    Submit
2180</button>
2181    
2182
2183
2184
2185<!-- standard - Buttons.html --> 
2186    
2187<button
2188    type="button"
2189    data-uses-js="modal-cancel"
2190    
2191    class=" mar-btn
2192    mar-btn--outline
2193    mar-btn--md
2194    
2195    
2196    "
2197>
2198    Cancel
2199</button>
2200    
2201
2202
2203        </div>
2204    </div>
2205</div>
2206
2207</body>
2208
2209<div id="outbrain-holder">
2210    <div id="DFP_standard_mpu_3"></div>
2211    <div id="DFP_standard_mpu_4"></div>
2212    <div id="DFP_standard_mpu_5"></div>
2213    <div id="DFP_standard_mpu_6"></div>
2214    <div id="DFP_standard_mpu_7"></div>
2215</div>
2216<script>
2217
2218const elementToObserve = document.querySelector("#outbrain-holder");
2219
2220// create a new instance of `MutationObserver` named `observer`,
2221// passing it a callback function
2222const observer = new MutationObserver(function(e) {
2223    $.each(e, function(j, obs) {
2224        $.each(obs.removedNodes, function (i, node) {
2225            var id = $(node).attr('id');
2226            addAdSlot(id, id.replace('DFP_', ''));
2227        });
2228    });
2229});
2230
2231// call `observe()` on that MutationObserver instance,
2232// passing it the element to observe, and the options object
2233observer.observe(elementToObserve, {subtree: true, childList: true});
2234</script>
2234
2235
2236<script>
2237window.domComplete = performance.now();
2238</script>
2238
2239
2240<script type="text/javascript">
2241path = document.location.href.split("/");
2242var prop30 = qs.get('lp');
2243var prop43 = qs.get('ref');
2244var pType="Newsquest\Modules\UserIdentityModule"
2245
2246if (pType === 'BlockArticleModule' || pType === 'NationalNewsModule' || pType === 'BlockWhatsOnModule') {
2247    pType = 'ArticleModule';
2248}
2249for(x=4; x<7; x++)
2250{
2251    if (typeof path[x] == 'undefined')
2252    {
2253        path[x] = '';
2254    }
2255    if(path[x] == "" || (pType == "ArticleModule" && path[x].match(/[0-9]+\./)) || (path[x].indexOf('?') > -1))
2256    {
2257        path[x] = path[x-1];
2258    }
2259    else
2260    {
2261        path[x] = path[x-1] + "/" + path[x];
2262    }
2263    path[x] = path[x].replace(/\/undefined/g,"");
2264}
2265sitename = path[2].split(".");
2266
2267pathN= unescape(document.location.pathname.toString());
2268matches = pathN.match(/(\w+)\.(in|near|compare)\.([\,a-zA-Z0-9\ _-]+)[\/]?$/);
2269detailMatches = pathN.match(/(\w+)\.detail\.(.*)$/);
2270if (detailMatches !== null && detailMatches.length > 1)
2271{
2272    matches = detailMatches;
2273}
2274
2275if (matches !== null && matches.length > 1)
2276{
2277    var subfolder = '';
2278    path[3] = 'li';
2279    path[4] = 'li/'+subfolder;
2280    path[5] = 'li/'+subfolder+'/'+matches[1];
2281    path[6] = 'li/'+subfolder+'/'+matches[1];
2282}
2283if (pathN === '/')
2284{
2285    path[3] = 'homepage';
2286    path[4] = 'homepage';
2287    path[5] = 'homepage';
2288    path[6] = 'homepage';
2289}
2290
2291
2292function filterArray(arr) {
2293    var retArr = [];
2294    $.each(arr, function(i, part) {
2295        if (part !== '') {
2296            retArr.push(part);
2297        }
2298    });
2299
2300    return retArr;
2301}
2302</script>
2302
2303
2304
2305<script type="text/javascript">
2306var known = $.cookie('__siren') ? '1' : '0' ;
2307</script>
2307
2308
2309<script type="text/javascript">
2310
2311var known = $.cookie('__siren') ? '1' : '0' ;
2312var ref = document.referrer;
2313var parser = document.createElement('a');
2314parser.href = ref;
2315
2316// values in the below MUST be strings
2317var targeting = {
2318    'context': '',
2319    
2320    'domain': 'www.forestryjournal.co.uk',
2321    'isLanding': 'no',
2322    'top_path': 'user',
2323    'weather': ''.toLowerCase(),
2324    'jbsjs': ''.toLowerCase(),
2325    'site_search': '',
2326    'bmd_cat': '',
2327    'wt': '',
2328    'cmpid': qs.get('cmpid'),
2329    'refdm': parser.hostname,
2330    'k': known,
2331    'g':  'u' ,
2332    'a':  '0' ,
2333    'topic': '',
2334    'publication': '',
2335    'primary_tag_future_use': '',
2336    'site': (isMobile()) ? 'mobile': 'desktop',
2337    'r': data_layer.user.subscription_plan !== ''
2338        ? '2'       // 2 = subscribed
2339        : data_layer.user.is_logged_in == 'yes'
2340            ? '1'   // 1 = registered
2341            : '0',  // 0 = anonymous
2342};
2343
2344if (!usePrebid) {
2345    targeting.adrq = 'adl';
2346}
2347
2348if (data_layer.video.exists === 'yes') {
2349    targeting.ptype = 'video';
2350}
2351
2352if ($.cookie('isMeterExpired') === 'yes' && window.data_layer.article.is_article) {
2353    var articleContentLevel = parseInt(window.data_layer.article.content_level, 10) || 0; // account for NaN
2354    if (articleContentLevel !== 0 && window.data_layer.article.content_level_open_access === 'no') {
2355        targeting.ao = 'y';
2356    }
2357}
2358
2359if ($.cookie('_sp_enable_dfp_personalized_ads') === 'true') {
2360    targeting.dfpcsnt = 'yes';
2361} else if ($.cookie('_sp_enable_dfp_personalized_ads') === 'false') {
2362    targeting.dfpcsnt = 'no';
2363} else {
2364    targeting.dfpcsnt = 'none';
2365}
2366
2367if (typeof MobileDetect !== "undefined") {
2368    targeting.canbb = (window.screen.width > 960) ? 'y' : 'n';
2369}
2370
2371if (typeof module_targeting === "object") {
2372    targeting = addToTargeting(targeting, module_targeting);
2373}
2374
2375// $.each(apData, function (k, v) {
2376//     targeting[k] = v;
2377// });
2378
2379// if (typeof gs_channels !== 'undefined') {
2380//     targeting.gs_channels = gs_channels;
2381// }
2382
2383targeting = addToTargeting(targeting, data_layer_helper.homesData);
2384
2385targeting.article_id = '';
2386var googleSiteName = 'www.forestryjournal.co.uk';
2387var googlePath = '/user/';
2388
2389var googleNetworkCode = 154725070;
2390
2391var googleChildNetworkCode = 22694024870;
2392var googleId = '/'+googleNetworkCode + ',' + googleChildNetworkCode + '/' + googleSiteName+googlePath;
2393
2394if (googleId.charAt(googleId.length - 1) === '/') {
2395    googleId = googleId.slice(0, -1);
2396}
2397
2398var googletag = googletag || {};
2399googletag.cmd = googletag.cmd || [];
2400
2401googletag.cmd.push(function () {
2402    var _YB = _YB || {
2403        ab: function () {
2404            return _YB.dool ? "b" : "a" + Math.floor(Math.random() * 10);
2405        },
2406        dool: Math.random() >= 0.1,
2407    };
2408    var yb_ab;
2409    if (Math.random() <= 0.9) {
2410        yb_ab = _YB.ab();
2411    } else {
2412        yb_ab = "c";
2413    }
2414    googletag.pubads().setTargeting("yb_ab", yb_ab);
2415});
2416
2417googletag.cmd.push(function() {
2418    googletag.pubads().set("adsense_background_color", "FFFFFF");
2419    googletag.pubads().setTargeting('rfs', "0");
2420    $.each(targeting, function (key, value) {
2421
2422        // No real value so exclude
2423        if (value === 0 || value === '' || value === null) {
2424            return;
2425        }
2426        googletag.pubads().setTargeting(key, value);
2427    });
2428
2429});
2430
2431if (isMobile() && '' === 'top') {
2432    $('.desktop-standard-leaderboard').remove();
2433    $('.mobile-top-leaderboard').show();
2434    $('#DFP_top_leaderboard_mobile').attr('id', 'DFP_top_leaderboard');
2435} else {
2436    $('.mobile-top-leaderboard').remove();
2437}
2438// Ads
2439var adUnits = [];
2440
2441hideAdsByScreensize();
2442
2443if (blackListAds.length > 0) {
2444    removeBlacklistAds(blackListAds);
2445}
2446
2447$.each(unfilteredAdUnits, function (i, unit) {
2448    removeWhitelistAds(unit);
2449});
2450
2451// set up a holder for all the adverts so we can do things with them later
2452var dfpHolder = {};
2453// the set up code
2454googletag.cmd.push(function() {
2455    $.each(adUnits, function(i, data) {
2456
2457        // check if the dom exists
2458        if ($('#'+data.domName).length === 0) {
2459            return;
2460        }
2461
2462        var dfp = null;
2463
2464        if (data.slotType === 'standard')
2465        {
2466            // get the correct sizes, using the alternate_sizes if they exist and we are on a mobile site
2467            var sizes = data.sizes;
2468            if (data.alternate_mobile_size && isMobile()) {
2469                sizes = data.alternate_mobile_size;
2470            }
2471            // push this ad slot through
2472            dfp = googletag.defineSlot(googleId, sizes, data.domName)
2473                .addService(googletag.pubads())
2474                .setTargeting("position", data.positionName)
2475                .setCollapseEmptyDiv(data.collapseContainer);
2476            // check if we have an array of targets, and assign them as a companion if we do
2477            if (data.targets instanceof Array && data.targets.length > 0 ) {
2478                dfp.setTargeting('companion', data.targets);
2479            }
2480
2481        }
2482        else if (data.slotType === 'outofpage')
2483        {
2484            dfp = googletag.defineOutOfPageSlot(googleId, data.domName)
2485                .addService(googletag.pubads())
2486                .setTargeting("position", data.positionName)
2487                .setCollapseEmptyDiv(data.collapseContainer);
2488            // check if we have an array of targets, and assign them as a companion if we do
2489            if (data.targets instanceof Array && data.targets.length > 0 ) {
2490                dfp.setTargeting('companion', data.targets);
2491            }
2492        }
2493
2494        // store
2495        dfpHolder[data.domName] = dfp;
2496
2497    });
2498
2499    if (adLight === true) {
2500        googletag.pubads().setCategoryExclusion('adlight');
2501        // var adlightexplanation = '<div class="adlight-explanation">I\'m a subscriber <a href="#" class="adlight-explanation-link">Why am I seeing this advert?</a></div>';
2502        // if ($('#DFP_premium_mpu').length > 0) {
2503        //     $('#DFP_premium_mpu').before(adlightexplanation);
2504        // }
2505
2506        // if ($('#DFP_standard_mpu_1').length > 0) {
2507        //     $('#DFP_standard_mpu_1').before(adlightexplanation);
2508        // }
2509
2510        // var imageIds = [11497497, 11497535, 11497536, 11497541, 11497542, 11497545, 11497546, 11497547];
2511        // var imageId = imageIds[Math.floor(Math.random() * imageIds.length)];
2512        // $('.adlight-explanation-link').click(function(e) {
2513        //     e.preventDefault();
2514        //     $('#adlight-explanation-modal-image').attr('src', '/resources/images/' + imageId + '/').show();
2515        //     $('#adlight-explanation-modal').modal();
2516        // });
2517    }
2518
2519    // send the request
2520    googletag.pubads().enableSingleRequest();
2521
2522    googletag.enableServices();
2523
2524    googletag.pubads().addEventListener('slotVisibilityChanged', function(event) {
2525        if (event.slot.getResponseInformation().creativeTemplateId === 828288 ||
2526            event.slot.getResponseInformation().creativeTemplateId === 12383216 ) {
2527            console.log('DFP: Magic template id detected, not refreshing');
2528            return;
2529        }
2530        var slotName = '';
2531        $.each(dfpHolder, function (a, e) {
2532            if (e == event.slot) {
2533                slotName = a;
2534            }
2535        });
2536        if (typeof window.advertisingTimer !== 'undefined') {
2537            var perc = event.inViewPercentage;
2538            window.advertisingTimer.timer(slotName, perc);
2539        }
2540    });
2541});
2542
2543// the display code
2544$.each(adUnits, function(i, data) {
2545
2546    // check if the dom exists
2547    if ($('#'+data.domName).length === 0) {
2548        return;
2549    }
2550
2551    if (data.domName === 'DFP_interstitial_mpu') {
2552        if (!inter.checkVisit()) {
2553            return;
2554        }
2555    }
2556
2557    // are we manually loading it?
2558    if ($('#'+data.domName).attr('data-manual-loading') === "yes") {
2559        return;
2560    }
2561    // for mobile, we check if the dom element has the data-delay-loading attribute set to "1"
2562    else if ($('#'+data.domName).attr('data-delay-loading') === "yes") {
2563
2564        // load it
2565        $('#'+data.domName).appear();
2566        $(document.body).on('appear', '#'+data.domName, function(e, allElement) {
2567
2568            // don't call it many times
2569            if ($(this).attr('data-processed') === 'yes') {
2570                return;
2571            }
2572
2573            $(this).attr('data-processed', 'yes');
2574
2575            // display the google ad
2576            googletag.display(data.domName);
2577            googletag.pubads().refresh([dfpHolder[data.domName]]);
2578        });
2579        return;
2580    }
2581    googletag.cmd.push(function() {
2582        googletag.display(data.domName);
2583    });
2584});
2585window.googleComplete = performance.now();
2586window.googleReady = true;
2587
2588// METHODS
2589function addToTargeting(targeting, data) {
2590    if (!data) {
2591        return targeting;
2592    }
2593    $.each(data, function (key, value) {
2594        if (!value) {
2595            return;
2596        }
2597        targeting[key] = value;
2598    });
2599    return targeting;
2600}
2601
2602function addAdSlot(slotName, slot, initHidden) {
2603    console.log("Add ad slot called for %s %s", slotName, slot);
2604    // check if item already exists
2605    if (typeof window.dfpHolder[slotName] !== 'undefined') {
2606        return;
2607    }
2608
2609    if (window.adLight === true) {
2610        return;
2611    }
2612    window.googletag.cmd.push(function() {
2613        var dfp = googletag.defineSlot(window.googleId, [[300,250]], slotName)
2614            .setTargeting('position', [slot])
2615            .addService(googletag.pubads());
2616        window.dfpHolder[slotName] = dfp;
2617
2618        if (!initHidden) {
2619            googletag.pubads().refresh([dfp]);
2620
2621            return;
2622        }
2623    });
2624}
2625
2626function hideAdsByScreensize() {
2627    if (window.screen.width < 728 && $('#BlockArticleContainer').length > 0) {
2628        if ('1121' === '1147') {
2629            $('#DFP_out_of_page').remove();
2630        } else {
2631            $('#DFP_premium_mpu').remove();
2632        }
2633        $('#DFP_on_scroll').remove();
2634    } else if (window.screen.width < 728 &&
2635        ( $(".article-grid__uber[data-top-stories-articles='7'][data-news-list-articles='9']").length > 0 ||
2636        $(".article-grid__uber[data-top-stories-articles='7'][data-news-list-articles='12']").length > 0  ||
2637        $(".article-grid__uber[data-top-stories-articles='7'][data-news-list-articles='18']").length > 0  ||
2638        $(".article-grid__uber[data-top-stories-articles='7'][data-news-list-articles='24']").length > 0 )
2639    ) {
2640        const adElement = document.querySelector('#high_vis_container');
2641        $('.omnicard[data-position="5"]').after(adElement);
2642    }
2643
2644    if ('1121' === '1147' && window.screen.width > 450) {
2645        $('#DFP_bottom_leaderboard').remove();
2646    }
2647
2648    if ('1121' === '1147' && window.screen.width < 728) {
2649        $('#DFP_top_leaderboard').remove();
2650    }
2651
2652    if ('1121' === '1147') {
2653        $('#DFP_teads').remove();
2654        $('#DFP_out_of_page').remove();
2655    }
2656
2657    if ($('#comments-in-page').length === 1 && window.screen.width > 450) {
2658        $('#DFP_top_leaderboard').parent().remove();
2659        $('#DFP_bottom_leaderboard').parent().remove();
2660        // $('#DFP_standard_mpu_1').parent().remove();
2661    }
2662}
2663
2664function removeBlacklistAds(blackListAds) {
2665    $.each(blackListAds, function(i, name) {
2666        removeAdContainer(name);
2667    });
2668}
2669
2670function removeWhitelistAds(unit) {
2671    // VAST (video) ad units never get displayed in here.
2672    if (unit.isVast) {
2673        return;
2674    }
2675
2676    // if we have an ad-light experience
2677    if (whiteList === true) {
2678        if (typeof whiteListAds[unit.positionName] === 'undefined') {
2679            removeAdContainer(unit.domName)
2680            return;
2681        }
2682    }
2683
2684    adUnits.push(unit);
2685}
2686
2687function removeAdContainer(name) {
2688    const element = document.getElementById(name);
2689    // doesn't exist? exit
2690    if(!element) {
2691        return;
2692    }
2693
2694    const parent = element.parentElement;
2695    if (parent && parent.classList.contains('block-bottom-margin')) {
2696        // if immediate parent contains block-bottom-margin as a class, remove the parent as well
2697        parent.classList.remove('block-bottom-margin');
2698    }
2699    if (parent && parent.classList.contains('mar-leaderboard--top')) {
2700        // in case of leaderboard, remove as has min-height
2701        parent.remove();
2702        return;
2703    }
2704
2705    if (parent && parent.classList.contains('mar-leaderboard--bottom')) {
2706        // in case of article ad container, remove as has min-height
2707        parent.remove();
2708        return;
2709    }
2710
2711    element.remove();
2712}
2713</script>
2713
2714
2715
2716<script src="/resources/responsive-static/build/mds/js/global.js?cb=vjoPdzgg"></script>
2716
2717
2718
2719
2720
2721
2722<script src="/__siren/"></script>
2722
2723
2724
2725
2726<script type="text/javascript">
2727    var s_account="newsquestgroupprod";
2728</script>
2728
2729
2730<script type="text/javascript" src="/resources/responsive-static/vendor/adobe/VisitorAPI.js?cb=vjoPdzgg"></script>
vendor: 1 bytes, line 2730
2730
2731<script type="text/javascript" src="/resources/responsive-static/vendor/adobe/omniture.js?cb=vjoPdzgg"></script>
2731
2732
2733<script type="text/javascript">
2734
2735function getOmniturePath() {
2736    var path = '';
2737    if ($('#gallery-base-url').length === 1) {
2738        path = $('#gallery-base-url').val();
2739    }
2740    else {
2741        path = window.location.pathname;
2742    }
2743    return path;
2744}
2745
2746function getPositionFromCookie() {
2747    const cookieName = 'tracking_block_index';
2748
2749    const ref = document.cookie
2750        .split('; ')
2751        .find(row => row.startsWith(`${cookieName}=`))
2752        ?.slice(cookieName.length + 1);
2753
2754    document.cookie = `${cookieName}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${window.data_layer.site.cookie_domain}`;
2755
2756    return ref ? decodeURIComponent(ref) : undefined;
2757}
2758function getRefFromCookie() {
2759    const cookieName = 'tracking_block';
2760
2761    const ref = document.cookie
2762        .split('; ')
2763        .find(row => row.startsWith(`${cookieName}=`))
2764        ?.split('=')[1];
2765
2766    // Remove the cookie
2767    document.cookie = `${cookieName}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${window.data_layer.site.cookie_domain}`;
2768
2769    return ref;
2770}
2771
2772function getOmnitureTrackingFromCookie(key, preExistingValue) {
2773    var ref = $.cookie('o-' + key);
2774    if(typeof(ref) === 'undefined') {
2775    	ref  = preExistingValue
2776    } else {
2777    	ref = decodeURIComponent(ref);
2778    	$.removeCookie('o-' + key, {
2779            path: '/',
2780            domain: window.data_layer.site.cookie_domain,
2781        });
2782    }
2783    return ref;
2784}
2785
2786function getValidatedAPList() {
2787
2788    var validList = [1100, 1101, 1002, 1006, 1010, 1014, 1018, 1022, 1200, 1202, 1205, 1300, 1602, 1605, 1608, 1612, 1616, 1500, 1503, 1507, 1509, 1512, 1402, 1406, 1409, 1412, 1416, 14331, 14333, 14335, 14336, 14339, 14342, 14344, 14345, 14346, 14350, 14351, 14353, 14359, 14366, 14370, 14371, 14377, 14388, 14394, 14396, 14399, 14407, 14221, 14423, 15679, 15681, 15682, 15683, 15684, 15686, 15687, 15688, 15975];
2789
2790    var data = getAudienceProjectTargetingData();
2791    if (!data || !data.ap_x) {
2792        return '';
2793    }
2794
2795    validData = [];
2796    $.each(data.ap_x, function(i, td) {
2797        if ($.inArray(parseInt(td, 10), validList) !== -1) {
2798            validData.push(td);
2799        }
2800    });
2801
2802    return validData.join(',');
2803}
2804
2805path = document.location.href.split("/");
2806
2807var qs = new URLSearchParams(window.location.search);
2808
2809var prop30 = qs.get('lp');
2810var prop43 = qs.get('ref');
2811var pType="Newsquest\Modules\UserIdentityModule"
2812
2813if (pType === 'BlockArticleModule' || pType === 'NationalNewsModule' || pType === 'BlockWhatsOnModule') {
2814    pType = 'ArticleModule';
2815}
2816
2817for(x=4; x<7; x++)
2818{
2819    if (typeof path[x] == 'undefined')
2820    {
2821        path[x] = '';
2822    }
2823    if(path[x] == "" || (pType == "ArticleModule" && path[x].match(/[0-9]+\./)) || (path[x].indexOf('?') > -1))
2824    {
2825        path[x] = path[x-1];
2826    }
2827    else
2828    {
2829        path[x] = path[x-1] + "/" + path[x];
2830    }
2831    path[x] = path[x].replace(/\/undefined/g,"");
2832}
2833pathN= unescape(document.location.pathname.toString());
2834matches = pathN.match(/(\w+)\.(in|near|compare)\.([\,a-zA-Z0-9\ _-]+)[\/]?$/);
2835detailMatches = pathN.match(/(\w+)\.detail\.(.*)$/);
2836if (detailMatches !== null && detailMatches.length > 1)
2837{
2838    matches = detailMatches;
2839}
2840
2841if (matches !== null && matches.length > 1)
2842{
2843    var subfolder = '';
2844    path[3] = 'li';
2845    path[4] = 'li/'+subfolder;
2846    path[5] = 'li/'+subfolder+'/'+matches[1];
2847    path[6] = 'li/'+subfolder+'/'+matches[1];
2848}
2849if (pathN === '/')
2850{
2851    path[3] = 'homepage';
2852    path[4] = 'homepage';
2853    path[5] = 'homepage';
2854    path[6] = 'homepage';
2855}
2856
2857
2858/* You may give each page an identifying name, server, and channel on
2859the next lines. */
2860s.pageName="(www) "+getOmniturePath();
2861s.pageName = s.pageName.toLowerCase();
2862s.server="martini";
2863s.channel="";
2864s.pageType="";
2865s.prop1= qs.get('search');
2866s.prop2="";
2867s.prop3=document.title;
2868s.prop4="";
2869s.prop5="Newsquest\Modules\UserIdentityModule"; /* get from Martini */
2870s.prop6=path[3].toLowerCase();
2871s.prop7=path[4].toLowerCase();
2872s.prop8=path[5].toLowerCase();
2873s.prop9=path[6].toLowerCase();
2874s.prop10="";
2875
2876s.prop16=path[2].toLowerCase();
2877s.prop17="";
2878s.prop18="Martini";
2879s.prop19="1";
2880s.prop20 = s.getPreviousValue(s.pageName, 'gpv_pn');
2881s.prop42 = "";
2882s.prop53 = 'standard';
2883s.prop54 = '';
2884s.prop55 = '';
2885s.prop56 = "";
2886s.prop57 = ($('[data-name="Feature Article Block A"]').length > 0) ? 'Enabled' : 'Disabled';
2887s.prop58 = document.querySelector('[data-name="Feature Article Block B"]')?.dataset.variant;
2888s.prop59 = getRefFromCookie();
2889s.prop60 = getPositionFromCookie();
2890s.prop73 = document.cookie.split('; ').find(row => row.startsWith('adtiming='))?.split('=')[1] || null;
2891
2892var eVar67 = [];
2893
2894if ($.cookie('consentUUID')) {
2895    eVar67.push('yes');
2896} else {
2897    eVar67.push('no');
2898}
2899if ($.cookie('_sp_enable_dfp_personalized_ads') === 'true') {
2900    eVar67.push('yes');
2901} else if ($.cookie('_sp_enable_dfp_personalized_ads') === 'false') {
2902    eVar67.push('no');
2903} else {
2904    eVar67.push('none');
2905}
2906
2907if ($.cookie('_sp_legitimate_interests') === 'true') {
2908    eVar67.push('yes');
2909} else if ($.cookie('_sp_legitimate_interests') === 'false') {
2910    eVar67.push('no');
2911} else {
2912    eVar67.push('none');
2913}
2914
2915//if ($.cookie('euconsent')) {
2916//    eVar67.push($.cookie('euconsent'));
2917//} else {
2918//    eVar67.push('none');
2919//}
2920
2921s.eVar67 = eVar67.join(',');
2922// console.log('ADB: setting eVar67 to %s', eVar67.join(','));
2923
2924if ($.cookie('prev-tcf-v2')) {
2925    // console.log('ADB: Setting eVar68 to ', $.cookie('prev-tcf-v2'));
2926    s.eVar68 = $.cookie('prev-tcf-v2');
2927}
2928
2929if (typeof iabNames !== 'undefined') {
2930    s.prop29 = iabNames.join(',');
2931} else if (typeof iabIds !== 'undefined') {
2932    s.prop29 = iabIds.join(',');
2933}
2934
2935if (s.prop20 && s.prop20 !== 'no value') {
2936    s.prop21 = s.getPercentPageViewed();
2937} else {
2938    s.prop21 = '';
2939}
2940
2941if (typeof __siren !== 'undefined') {
2942    s.eVar27 = __siren;
2943}
2944
2945s.prop22 = s.getDaysSinceLastVisit('s_lv');
2946
2947
2948s.prop43=getOmnitureTrackingFromCookie('ref', prop43);
2949s.prop25 = ''
2950
2951s.prop27 = '';
2952
2953s.prop30 = getOmnitureTrackingFromCookie('prop30', prop30);
2954s.linkInternalFilters="javascript:,forestryjournal.co.uk,fish4.co.uk,adsys.newsquest.co.uk,www.exchangeandmart.co.uk,www.communigate.co.uk,"
2955s.eVar61=(new Date()).toLocaleDateString("en-GB");
2956/* s.eVar62=(new Date()).toLocaleDateString("en-GB"); */
2957
2958
2959
2960
2961
2962
2963/* Article-site-cloning data */
2964s.eVar90 = window.data_layer.article.parent_originating_site_id;
2965s.eVar91 = window.data_layer.article.originating_article_id;
2966s.eVar92 = window.data_layer.article.is_original_to_site;
2967s.eVar95 = window.data_layer.site.using_piano_id;
2968s.eVar106 = '';
2969
2970s.eVar109 = '';
2971
2972/* Uber block article counts */
2973s.eVar93 = window.data_layer.page.top_stories_article_count + ':' + window.data_layer.page.interstitial_article_count + ':' + window.data_layer.page.news_stories_article_count;
2974
2975/* Conversion Variables */
2976s.campaign=""
2977s.state=""
2978s.zip=""
2979s.events=""
2980s.products=""
2981s.purchaseID=""
2982s.eVar14=""
2983try {
2984    s.list3=getValidatedAPList();
2985} catch (e) {
2986    // do nothing
2987}
2988
2989
2990
2991
2992// Initial fotorama tracking.
2993var moduleType = null;
2994if (s.prop5 === 'ArticleModule' || s.prop5 == 'PropertyModuleReplacement' || s.prop5 === 'BlockArticleModule') {
2995    moduleType = 'article';
2996} else if (s.prop5 === 'PictureGalleryModule') {
2997    moduleType = 'gallery';
2998}
2999
3000if ($('#comments-in-page').length === 1) {
3001    moduleType = 'comments';
3002}
3003
3004if (moduleType === 'article' || moduleType === 'gallery' || moduleType === 'comments') {
3005    var imagePath = '';
3006
3007    if ($('.fotorama').length > 0) {
3008        // Get the first Fotorama image.
3009        try {
3010            var el = $('.fotorama').data('fotorama').data[0].html;
3011            var url = $(el).find('div').css('background-image');
3012            imagePath = url.replace('url(','').replace(')','').replace(/\"/gi, "");
3013        } catch (e) {
3014        }
3015    } else {
3016        // If there's just one image (i.e. it's not a gallery), find its path.
3017        var imagePathSingle = $('#mainImage').attr('src');
3018        if (typeof imagePathSingle !== 'undefined') {
3019            imagePath = imagePathSingle.split('.')[0] + '/';
3020        }
3021    }
3022    var imageParts = imagePath.split('/');
3023    if (imageParts.length > 1) {
3024        s.eVar37 = imageParts[imageParts.length - 2];
3025        s.prop37 = imageParts[imageParts.length - 2];
3026        s.events = s.apl(s.events, 'event7', ',', 2);
3027    }
3028    s.eVar36 = moduleType;
3029    s.prop36 = moduleType;
3030}
3031
3032
3033
3034// Education pages.
3035if (s.prop5 === 'ResponsiveEducationModule') {
3036    // School profile page.
3037    if ($('#eduOverview').length > 0) {
3038        s.eVar40 = $('#eduOverview').data('school-status');
3039        s.prop40 = s.eVar40;
3040        s.prop41 = 'edu-' + $('#eduOverview').data('school-urn');
3041        s.prop46 = $('#town').text();
3042    }
3043
3044    // Comparison page.
3045    if ($('#eduComparisonTable').length > 0) {
3046        s.list1 = '';
3047    }
3048
3049    // Results page.
3050    if ($('.school-results').length > 0) {
3051        s.list1 = '';
3052
3053        // Track the search criteria.
3054        s.prop44 = '';
3055        s.prop45 = "".toLowerCase();
3056        s.prop46 = "".toLowerCase();
3057        s.prop49 = '';
3058        s.prop50 = '';
3059        s.prop51 = '';
3060        s.eVar2 = s.prop50;
3061
3062        var newSearch = false;
3063        if (newSearch) {
3064            s.events = s.apl(s.events, 'event17', ',', 1);
3065        }
3066    }
3067}
3068
3069// Notices Module
3070if (s.prop5 === 'NewsquestModulesNoticesModule') {
3071    // Notices Find page.
3072    if (s.pageName.includes('notices/find')) {
3073        s.pageName = '(www) /notices/find/';
3074        s.eVar50 = '';
3075        const noticesURL = new URL(window.location.href);
3076        const noticesParams = new URLSearchParams(noticesURL.search);
3077
3078        s.eVar1 = noticesParams.has('keyword') ? noticesParams.get('keyword') : 'None';
3079        s.eVar51 = noticesParams.has('sort') ? noticesParams.get('sprt') : 'best';
3080        s.eVar52 = noticesParams.has('p') ? (parseInt(noticesParams.get('p'), 10) + 1) : 1;
3081        s.eVar53 = noticesParams.has('type') ? noticesParams.get('type') : 'All';
3082        s.eVar54 = noticesParams.has('nearby') ? noticesParams.get('nearby') : 'no';
3083        s.eVar55 = noticesParams.has('daterange') ? noticesParams.get('daterange') : 'last-month';
3084
3085        if (noticesParams.has('sort')) {
3086            switch (noticesParams.get('sort')) {
3087                case 'date_asc':
3088                    s.eVar51 = 'oldest';
3089                    break;
3090                case 'date_desc':
3091                    s.eVar51 = 'newest';
3092                    break;
3093                case 'best_match':
3094                    s.eVar51 = 'best';
3095                    break;
3096                default:
3097                    s.eVar51 = noticesParams.get('sort');
3098                    break;
3099            }
3100        }
3101
3102        // Concatenate all search params into eVar44
3103        if (noticesParams.size > 0) {
3104            const searchParams = new URL(window.location.href).searchParams;
3105            s.eVar44 = '';
3106            searchParams.forEach((value, key) => {
3107                s.eVar44 += `${key}=${value},`;
3108            });
3109        } else {
3110            s.eVar44 = '';
3111        }
3112
3113        // Adobe Search Event triggering
3114        const setNoticePaginationClicked = (value) => {
3115            localStorage.setItem("isNoticePaginationClicked", value);
3116        };
3117
3118        const noticeSearchInput = document.getElementById("notices-search");
3119        const noticeSearchBtn = document.getElementById("notice-search-find");
3120        const noticePaginationBtns = document.querySelectorAll('.notice-find__pagination .pagination-btn');
3121        const noticePaginationBtnPrev = document.querySelector('.pagination-btn-previous svg');
3122        const noticePaginationBtnNext = document.querySelector('.pagination-btn-next svg');
3123
3124        noticeSearchInput?.addEventListener('change', () => setNoticePaginationClicked('false'));
3125        noticeSearchBtn?.addEventListener('click', () => setNoticePaginationClicked('false'));
3126
3127        noticePaginationBtns.forEach(btn => {
3128            btn.addEventListener('click', () => setNoticePaginationClicked('true'));
3129        });
3130
3131        noticePaginationBtnPrev?.addEventListener('click', () => setNoticePaginationClicked('true'));
3132        noticePaginationBtnNext?.addEventListener('click', () => setNoticePaginationClicked('true'));
3133
3134        if (localStorage.getItem("isNoticePaginationClicked") === 'false') {
3135            s.events = s.apl(s.events, 'event1', ',', 1);
3136        }
3137    }
3138
3139    if (/notices\/funeral-directors\/(\d+)\.([a-zA-Z0-9-?]+)?/.test(s.pageName)) {
3140        s.pageName = '(www) /notices/funeral-director/';
3141        s.eVar41 = '';
3142    }
3143}
3144
3145if (s.prop5 === 'NewsquestModulesNoticeModule') {
3146    s.eVar41 = '';
3147    const type = window.announcement_data?.details?.type || '';
3148    const subCategory = window.announcement_data?.details?.sub_category || '';
3149    s.eVar40 = type !== 'Tribute' ? type : `${type} - ${subCategory}`;
3150    s.eVar42 = window.announcement_data?.details?.id || '';
3151    s.eVar107 = '';
3152    s.eVar119 = '';
3153    s.eVar120 = '';
3154    s.eVar2 = "(www) /notice/";
3155}
3156
3157//New Property module
3158if (s.prop5 === 'ResponsivePropertyModule') {
3159    /*
3160        Use prop42 for single and list pages, for list pages use hyphen separate lists of id's
3161    */
3162    
3163    
3164    //Property's all over the place (homepage, searches etc - HOM-133
3165
3166    //Property Detail - HOM-131, HOM-134, HOM-130
3167
3168    //Contact us submissions - HOM-137
3169    if($('#propertyModule.agent-details').length > 0) {
3170        //Add a click handler for a.contact-detail
3171    }
3172
3173
3174}
3175
3176// is their a video tag on the page?
3177if ($('.exco-embed').length > 0) {
3178    console.log('VID: setting tracking for event50');
3179    s.events = s.apl(s.events, 'event50', ',', 1);
3180}
3181
3182var foundAutoPlayVid = false;
3183$('.jw-outer').each(function (a, domEle) {
3184    if ($(this).data('multimedia-block') === 'no' && !foundAutoPlayVid) {
3185        console.log('VID: setting tracking for event51');
3186        s.events = s.apl(s.events, 'event51', ',', 1);
3187        foundAutoPlayVid = true;
3188    }
3189});
3190
3191
3192
3193
3194
3195
3196
3197s.eVar66 = 'Ad-Full';
3198s.eVar114 = '';
3199
3200
3201
3202    // var eVar65Copy = s.getValOnce(s.eVar65, "ev65", 0);
3203    // if (eVar65Copy !== '' && s.prop20.indexOf("/my/subscription/activate/") > -1) {
3204    //     s.events = s.apl(s.events, "event4", ",", 1); // Set the subscription counter event.
3205    //     s.events = s.apl(s.events, "purchase", ",", 1); // Set the purchase event.
3206    //     s.products = "Subscription : Metered Access;" + eVar65Copy + ";1;";
3207    //     s.purchaseID = "";
3208    // }
3209
3210
3211if(qs.get('action') === 'success' && (s.prop5 === 'ArticleModule' || s.prop5 === 'BMDModule' || s.prop5 === 'BlockArticleModule')) {
3212    s.events=s.apl(s.events,'event9',',',2)
3213}
3214/* Hierarchy Variables */
3215s.hier1="newsquest," + "" + ",www.forestryjournal.co.uk," + path[6].replace(/\//,",");
3216
3217if (typeof MartiniFotorama !== 'undefined') {
3218    MartiniFotorama.loadOmniture(s);
3219}
3220s.prop39 = "0";
3221
3222
3223
3224// Tracking usage of Bytecast audio embeds in articles.
3225s.eVar82 = 'no';
3226s.eVar83 = '';
3227
3228    console.log('ADB: starting');
3229    console.log('Google Bot Browser: ', window.isRobot.googleBot()); //TODO Remove this log after QA
3230
3231// Tracking of Commenting Registration FLow
3232if (s.prop5 !== 'BlockArticleModule') {
3233    const storedAdobeDimensions = sessionStorage.getItem('nq_adobe_tracking_article_dimensions');
3234    if (storedAdobeDimensions) {
3235        const storedAdobeDimensionObj = JSON.parse(storedAdobeDimensions);
3236        s.eVar10 = storedAdobeDimensionObj.eVar10;
3237        s.eVar15 = storedAdobeDimensionObj.eVar15;
3238        s.eVar22 = storedAdobeDimensionObj.eVar22;
3239        s.eVar23 = storedAdobeDimensionObj.eVar23;
3240        s.eVar24 = storedAdobeDimensionObj.eVar24;
3241        s.eVar25 = storedAdobeDimensionObj.eVar25;
3242        s.eVar28 = storedAdobeDimensionObj.eVar28;
3243        s.eVar60 = storedAdobeDimensionObj.eVar60;
3244        s.eVar104 = storedAdobeDimensionObj.eVar104;
3245        s.eVar106 = storedAdobeDimensionObj.eVar106;
3246        s.eVar107 = storedAdobeDimensionObj.eVar107;
3247        s.eVar108 = storedAdobeDimensionObj.eVar108;
3248        s.prop63 = storedAdobeDimensionObj.prop63;
3249    }
3250}
3251
3252if (window.location.href.includes("/user/create-account/commenting/")) {
3253    s.eVar2 = '(www) /user/create-account/commenting/';
3254}
3255
3256/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
3257if (qs.get('callback') !== 'in' && !window.isRobot.googleBot()) {
3258    var s_code=s.t();
3259    var backupAdobe = s;
3260
3261    if(s_code)document.write(s_code)
3262}
3263
3264// Storing the visiting dimensions
3265if (s.eVar10 || s.eVar22 || s.eVar23 || s.eVar24) {
3266    const adobeTrackingVisitingDimensions = {
3267        eVar10: s.eVar10,
3268        eVar22: s.eVar22,
3269        eVar23: s.eVar23,
3270        eVar24: s.eVar24,
3271    }
3272    sessionStorage.setItem('nq_adobe_tracking_visiting_dimensions', JSON.stringify(adobeTrackingVisitingDimensions));
3273}
3274
3275//--></script>
3275
3276<!-- End SiteCatalyst code version: H.19.3. -->
3277
3278
3279
3280
3281    
3281<script src="/resources/responsive-static/build/mds/js/piano-id-login.js?cb=vjoPdzgg"></script>
3281
3282
3283
3284<script>
3285    if ('' !== '') {
3286        setTimeout(function() {
3287            data_layer_helper.loadScript(
3288                "/resources/responsive-static/build/mds-next/js/.js?cb=vjoPdzgg",
3289                true,
3290                null,
3291                "module"
3292            )
3293        }, 500);
3294    }
3295</script>
3295
3296
3297
3298</html>

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.