PageSourceSearch

https://www.vegasmeansbusiness.com/includes/public/managed/v_c8155…/common/virtuals/js/shared_header.js

js vegasmeansbusiness.com collected 2026-09-25 04:17:06 UTC 2,204 bytes, 48 lines download raw bytes

1// This file will be run in the header on every page.
2// It should be used for content that relates
3// to your site as a whole, it should not be used for
4// plugin-specific js
5
6require(["site_gtm", "sv_load!plugins_dynamic_content"], function(gtm, dynamicContent) {
7	// site_gtm triggers the init of the library, binding dom events
8	// then we track the primary pageview
9	// if dynamic content is active, pass the user object with the pageview
10	if (dynamicContent) { 
11		function getUserFields(fields, dcUser){
12			let user = {};
13			fields.some(function(field) {
14				if (dcUser?.[field]) user[field] = dcUser[field];
15			});
16			return user;
17		}
18		let user = getUserFields(["created", "type", "personas", "page_views"], dynamicContent.getUser());
19		gtm.sendEvents({
20			tClient_pageview : { dynamic_content: user },
21			tCore_pageview : {}
22		});
23	} else {
24		gtm.sendEvents({
25			tClient_pageview : {},
26			tCore_pageview : {}
27		});
28	}
29});
30
31// map sections to Google Translate languages and homepages
32var sectionMapping = {
33	main :				{ 'lang' : 'en', 	'homepage' : '/', 'blog' : 'blog_primary_articles' },
34	main_french_ca :	{ 'lang' : 'fr-ca',	'homepage' : '/fr-ca/', 'blog' : 'blog_primary_articles_fr_ca' },
35	main_german :		{ 'lang' : 'de', 	'homepage' : '/de/', 'blog' : 'blog_primary_articles_de' },
36	main_italian :		{ 'lang' : 'it', 	'homepage' : '/it/', 'blog' : 'blog_primary_articles_it' },
37	main_japanese :		{ 'lang' : 'ja', 	'homepage' : '/ja/', 'blog' : 'blog_primary_articles_ja' },
38	main_korean :		{ 'lang' : 'ko', 	'homepage' : '/ko/', 'blog' : 'blog_primary_articles_ko' },
39	main_portuguese :	{ 'lang' : 'pt', 	'homepage' : '/pt/', 'blog' : 'blog_primary_articles_pt' },
40	main_spanish : 		{ 'lang' : 'es', 	'homepage' : '/es/', 'blog' : 'blog_primary_articles_es' },
41	main_chinese :		{ 'lang' : 'zh', 	'homepage' : '/zh/', 'blog' : 'blog_primary_articles_zh' },
42	main_canadian :		{ 'lang' : 'en-ca', 'homepage' : '/ca/' },
43	main_english_uk :	{ 'lang' : 'en-uk', 'homepage' : '/uk/' },
44	main_english_au :	{ 'lang' : 'en-au',	'homepage' : '/au/' },
45	main_spanish_mx :	{ 'lang' : 'es-mx',	'homepage' : '/es/', 'blog' : 'blog_primary_articles_es' }
46};
47
48var site_sections = Object.keys(sectionMapping);

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.